--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.cpp.sdk.core.test/Data/var/group1/epoc32/tools/variant/barney.var Mon May 11 09:15:26 2009 -0500
@@ -0,0 +1,13 @@
+VARIANT barney
+
+EXTENDS flintstone500
+
+VARIANT_HRH /epoc32/include/feature_settings.hrh
+
+BUILD_INCLUDE prepend /epoc32/include/config/flintstone500/barney
+
+ROM_INCLUDE prepend /epoc32/include/config/flintstone500/barney
+ROM_INCLUDE prepend /epoc32/rom/config/flintstone500/barney
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.cpp.sdk.core.test/Data/var/group1/epoc32/tools/variant/default.var Mon May 11 09:15:26 2009 -0500
@@ -0,0 +1,10 @@
+VARIANT default
+
+VARIANT_HRH /epoc32/include/feature_settings.hrh
+
+BUILD_INCLUDE set /epoc32/include
+
+ROM_INCLUDE set /epoc32/include
+ROM_INCLUDE prepend /epoc32/include/internal
+ROM_INCLUDE prepend /epoc32/rom/include
+ROM_INCLUDE prepend /epoc32/rom
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.cpp.sdk.core.test/Data/var/group1/epoc32/tools/variant/dino79.var Mon May 11 09:15:26 2009 -0500
@@ -0,0 +1,12 @@
+VARIANT dino79
+
+EXTENDS flintstone500
+
+VARIANT_HRH /epoc32/include/feature_settings.hrh
+
+BUILD_INCLUDE prepend /epoc32/include/config/flintstone500/dino79
+
+ROM_INCLUDE prepend /epoc32/include/config/flintstone500/dino79
+ROM_INCLUDE prepend /epoc32/rom/config/flintstone500/dino79
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.cpp.sdk.core.test/Data/var/group1/epoc32/tools/variant/flintstone500.var Mon May 11 09:15:26 2009 -0500
@@ -0,0 +1,14 @@
+VARIANT flintstone500
+
+EXTENDS variants
+
+VIRTUAL
+
+VARIANT_HRH /epoc32/include/feature_settings.hrh
+
+BUILD_INCLUDE prepend /epoc32/include/config/flintstone500
+
+ROM_INCLUDE prepend /epoc32/include/config/flintstone500
+ROM_INCLUDE prepend /epoc32/rom/config/flintstone500
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.cpp.sdk.core.test/Data/var/group1/epoc32/tools/variant/fred99nhd.var Mon May 11 09:15:26 2009 -0500
@@ -0,0 +1,13 @@
+VARIANT fred99nhd
+
+EXTENDS flintstone500
+
+VARIANT_HRH /epoc32/include/feature_settings.hrh
+
+BUILD_INCLUDE prepend /epoc32/include/config/flintstone500/fred99nhd
+
+ROM_INCLUDE prepend /epoc32/include/config/flintstone500/fred99nhd
+ROM_INCLUDE prepend /epoc32/rom/config/flintstone500/fred99nhd
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.cpp.sdk.core.test/Data/var/group1/epoc32/tools/variant/variants.var Mon May 11 09:15:26 2009 -0500
@@ -0,0 +1,20 @@
+VARIANT variants
+
+EXTENDS default
+
+VIRTUAL
+
+VARIANT_HRH /epoc32/include/feature_settings.hrh
+
+BUILD_INCLUDE prepend /epoc32/include/config
+
+ROM_INCLUDE prepend /epoc32/include/config
+ROM_INCLUDE prepend /epoc32/rom/config
+
+
+ROM_INCLUDE prepend /epoc32/rom/include/language/osext
+ROM_INCLUDE prepend /epoc32/rom/include/core/tools
+ROM_INCLUDE prepend /epoc32/rom/include/core/osext
+ROM_INCLUDE prepend /epoc32/rom/include/core/os
+ROM_INCLUDE prepend /epoc32/rom/include/core/mw
+ROM_INCLUDE prepend /epoc32/rom/include/core/app
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.cpp.sdk.core.test/Data/var/group1/epoc32/tools/variant/wilma88.var Mon May 11 09:15:26 2009 -0500
@@ -0,0 +1,13 @@
+VARIANT wilma88
+
+EXTENDS flintstone500
+
+VARIANT_HRH /epoc32/include/feature_settings.hrh
+
+BUILD_INCLUDE prepend /epoc32/include/config/flintstone500/wilma88
+
+ROM_INCLUDE prepend /epoc32/include/config/flintstone500/wilma88
+ROM_INCLUDE prepend /epoc32/rom/config/flintstone500/wilma88
+
+
+
--- a/core/com.nokia.carbide.cpp.sdk.core.test/src/com/nokia/carbide/cpp/sdk/core/test/AllTests.java Mon May 11 08:24:35 2009 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core.test/src/com/nokia/carbide/cpp/sdk/core/test/AllTests.java Mon May 11 09:15:26 2009 -0500
@@ -28,6 +28,7 @@
suite.addTestSuite(SDKCreationTest.class);
suite.addTestSuite(MacroStoreLoaderTest.class);
suite.addTestSuite(BSFCatalogTest.class);
+ suite.addTestSuite(SBVCatalogTest.class);
suite.addTestSuite(DevicesLoaderTest.class);
suite.addTestSuite(SymbianContextTest.class);
suite.addTestSuite(TestSDKChangeListener.class);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.cpp.sdk.core.test/src/com/nokia/carbide/cpp/sdk/core/test/SBVCatalogTest.java Mon May 11 09:15:26 2009 -0500
@@ -0,0 +1,234 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+package com.nokia.carbide.cpp.sdk.core.test;
+
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.*;
+
+import com.nokia.carbide.cpp.internal.sdk.core.model.SBVCatalogFactory;
+import com.nokia.carbide.cpp.sdk.core.ISBVCatalog;
+import com.nokia.carbide.cpp.sdk.core.ISBVPlatform;
+
+
+public class SBVCatalogTest extends TestCase {
+
+ private IPath sdkPath;
+ private IPath sdkIncludePath;
+ private ISBVCatalog catalog;
+
+ private void setupForSDK(IPath relativeSdkPath) throws Exception {
+ if (Platform.isRunning()) {
+ URL url = FileLocator.find(TestPlugin.getDefault().getBundle(), relativeSdkPath, null);
+ URL fileURL = FileLocator.toFileURL(url);
+ sdkPath = new Path(fileURL.getPath());
+ } else {
+ sdkPath = relativeSdkPath;
+ }
+ sdkIncludePath = sdkPath.append("epoc32/include");
+
+ catalog = SBVCatalogFactory.createCatalog(sdkPath, sdkIncludePath);
+ assertNotNull(catalog);
+ }
+
+ public void testSDKScan() throws Exception {
+ setupForSDK(new Path("Data"));
+ assertEquals(0, catalog.getPlatforms().length);
+ assertNull(catalog.findPlatform("ARMV5"));
+ }
+
+ /**
+ * Test the catalog for new-style BSFs
+ * @throws Exception
+ */
+ public void testSBVCatalog() throws Exception {
+ setupForSDK(new Path("Data/var/group1"));
+ ISBVPlatform[] platforms = catalog.getPlatforms();
+ assertEquals(6, platforms.length);
+
+ assertEquals("barney", platforms[0].getName());
+ assertEquals("default", platforms[1].getName());
+ assertEquals("dino79", platforms[2].getName());
+ assertEquals("flintstone500", platforms[3].getName());
+ assertEquals("fred99nhd", platforms[4].getName());
+ assertEquals("wilma88", platforms[5].getName());
+ }
+
+ /**
+ * Test new-style Nokia BSF support, which establishes a hierarchy of BSF platforms
+ * and also supports additional levels of system include paths.
+ * @throws Exception
+ */
+// public void testNewStyleBSFSDK1() throws Exception {
+// setupForSDK(new Path("Data/var/group1"));
+// ISBVPlatform[] platforms = catalog.getPlatforms();
+// assertEquals(12, platforms.length);
+//
+// IBSFPlatform platform;
+// platform = catalog.findPlatform("ARM11");
+// assertNotNull(platform);
+// assertEquals("arm11", platform.getName());
+// assertEquals("ARMV5_ABIV1", platform.getCustomizedPlatformName());
+// assertNull(platform.getCustomizedPlatform()); // built-in
+// assertEquals(ETristateFlag.UNSPECIFIED, platform.getCompileWithParent());
+//
+// assertFalse(platform.isVariant());
+// assertFalse(platform.isVirtualVariant());
+// assertEquals(2, platform.getCustomizationOptions().size());
+// assertEquals("-Ono_known_library --enum_is_int --fpmode ieee_no_fenv --export_all_vtbl --no_vfe --APCS /inter --dllimport_runtime -O3 -Otime",
+// platform.getCustomizationOptions().get("INVARIANT_OPTIONS"));
+// assertEquals(ETristateFlag.UNSPECIFIED, platform.getCompileWithParent());
+//
+// // no custom include dirs for this level
+// assertNull(platform.getSystemIncludePath());
+// assertEquals(0, platform.getSystemIncludePaths().length);
+//
+// //////
+//
+// platform = catalog.findPlatform("variant");
+// assertNotNull(platform);
+// assertEquals("variant", platform.getName());
+// assertEquals("ARMV5", platform.getCustomizedPlatformName());
+// assertNull(platform.getCustomizedPlatform()); // built-in
+// assertFalse(platform.isVariant());
+// assertTrue(platform.isVirtualVariant());
+// assertEquals(ETristateFlag.ENABLED, platform.getCompileWithParent());
+//
+// assertEquals(0, platform.getCustomizationOptions().size());
+//
+// // no custom include dirs
+// assertNull(platform.getSystemIncludePath());
+// assertEquals(0, platform.getSystemIncludePaths().length);
+//
+// //////
+//
+// platform = catalog.findPlatform("config");
+// assertNotNull(platform);
+// assertEquals("config", platform.getName());
+// // lowercase since it found the real platform
+// assertEquals("variant", platform.getCustomizedPlatformName());
+//
+// IBSFPlatform cust = platform.getCustomizedPlatform();
+// assertNotNull(cust);
+// assertEquals("variant", cust.getName());
+//
+// assertTrue(platform.isVariant());
+// assertFalse(platform.isVirtualVariant());
+// assertEquals(ETristateFlag.UNSPECIFIED, platform.getCompileWithParent());
+//
+// assertEquals(0, platform.getCustomizationOptions().size());
+//
+// // now it has an include dir
+// assertEquals(sdkIncludePath.append("config"), platform.getSystemIncludePath());
+//
+// // and the full list has only this entry
+// IPath[] systemIncludePaths = platform.getSystemIncludePaths();
+// assertEquals(1, systemIncludePaths.length);
+// assertEquals(sdkIncludePath.append("config"), systemIncludePaths[0]);
+//
+// IBSFPlatform[] built = catalog.getAdditionalBuiltPlatforms("ncx51");
+// assertEquals(5, built.length);
+// assertTrue(findPlatform(built, "m_product"));
+// assertTrue(findPlatform(built, "r_product"));
+// assertTrue(findPlatform(built, "s_product"));
+// assertTrue(findPlatform(built, "a_product"));
+// assertTrue(findPlatform(built, "dev51"));
+//
+// built = catalog.getAdditionalBuiltPlatforms("armv5");
+// assertEquals(7, built.length);
+// assertTrue(findPlatform(built, "s_product"));
+// assertTrue(findPlatform(built, "ncx51"));
+// assertTrue(findPlatform(built, "config"));
+// assertFalse(findPlatform(built, "variant")); // virtuals not built
+// }
+
+ /**
+ * @param built
+ * @param string
+ * @return
+ */
+ private boolean findPlatform(ISBVPlatform[] platforms, String string) {
+ for (ISBVPlatform platform : platforms)
+ if (platform.getName().equalsIgnoreCase(string))
+ return true;
+ return false;
+ }
+
+ /**
+ * Test new-style Nokia BSF support, which establishes a hierarchy of BSF platforms
+ * and also supports additional levels of system include paths.
+ * @throws Exception
+ */
+// public void testNewStyleBSFSDK2() throws Exception {
+// setupForSDK(new Path("Data/bsf/NewStyleBSFSDK"));
+// IBSFPlatform[] platforms = catalog.getPlatforms();
+// assertEquals(12, platforms.length);
+//
+// IBSFPlatform platform;
+// platform = catalog.findPlatform("r_product");
+// assertNotNull(platform);
+// assertEquals("r_product", platform.getName());
+// assertEquals("ncx51", platform.getCustomizedPlatformName());
+// assertNotNull(platform.getCustomizedPlatform()); // built-in
+// assertEquals(ETristateFlag.UNSPECIFIED, platform.getCompileWithParent());
+//
+// assertTrue(platform.isVariant());
+// assertFalse(platform.isVirtualVariant());
+// assertEquals(0, platform.getCustomizationOptions().size());
+// assertEquals(ETristateFlag.UNSPECIFIED, platform.getCompileWithParent());
+//
+// // now it has an include dir
+// assertEquals(sdkIncludePath.append("config").append("ncx51").append("r_product"), platform.getSystemIncludePath());
+//
+// // and the full list entries from deepest to shallowest
+// IPath[] systemIncludePaths = platform.getSystemIncludePaths();
+// assertEquals(3, systemIncludePaths.length);
+// assertEquals(sdkIncludePath.append("config").append("ncx51").append("r_product"), systemIncludePaths[0]);
+// assertEquals(sdkIncludePath.append("config").append("ncx51"), systemIncludePaths[1]);
+// assertEquals(sdkIncludePath.append("config"), systemIncludePaths[2]);
+//
+// IBSFPlatform[] built = catalog.getAdditionalBuiltPlatforms("r_product");
+// assertEquals(0, built.length);
+//
+// built = catalog.getAdditionalBuiltPlatforms("variant");
+// assertEquals(7, built.length);
+// // spot test
+// assertTrue(findPlatform(built, "config"));
+// assertTrue(findPlatform(built, "r_product"));
+//
+// }
+
+// /** The #getReleasePlatform() API should point to the first non-variant platform in the
+// * BSF tree. Before (boog 5132) it was going all the way to the root.
+// * @throws Exception
+// */
+// public void testReleasePlatformBug5132() throws Exception {
+// setupForSDK(new Path("Data/bsf/S60_50_BSFs"));
+//
+// assertEquals("armv6", catalog.getReleasePlatform("armv6"));
+// assertEquals("ARMV5", catalog.getReleasePlatform("config"));
+// assertEquals("ARMV5", catalog.getReleasePlatform("variant"));
+// assertEquals("arm9e", catalog.getReleasePlatform("arm9e"));
+// assertEquals("ARMV5", catalog.getReleasePlatform("t_product"));
+// assertEquals("arm11", catalog.getReleasePlatform("arm11"));
+// assertEquals("gccev6t2", catalog.getReleasePlatform("gccev6t2"));
+//
+// }
+}
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SymbianSDK.java Mon May 11 08:24:35 2009 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SymbianSDK.java Mon May 11 09:15:26 2009 -0500
@@ -263,7 +263,7 @@
ISDKManager sdkMgr = SDKCorePlugin.getSDKManager();
if (sdkMgr.getBSFScannerEnabled()){
buildTargets.addAll(getBSFPlatformContexts());
- //buildTargets.addAll(getBinaryVariationPlatformContexts()); // Symbian Binary Variation (.var)
+ buildTargets.addAll(getBinaryVariationPlatformContexts()); // Symbian Binary Variation (.var)
}
return buildTargets;