--- a/project/com.nokia.carbide.cpp.project.core.tests/src/com/nokia/carbide/cpp/project/core/tests/MissingSdkTest.java Wed Dec 09 08:31:57 2009 -0600
+++ b/project/com.nokia.carbide.cpp.project.core.tests/src/com/nokia/carbide/cpp/project/core/tests/MissingSdkTest.java Wed Dec 09 08:32:42 2009 -0600
@@ -30,6 +30,7 @@
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
+import com.nokia.carbide.cpp.internal.api.sdk.SBSv2Utils;
import com.nokia.carbide.cpp.internal.api.sdk.SDKManagerInternalAPI;
import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext;
import com.nokia.carbide.cpp.project.core.ProjectCorePlugin;
@@ -48,23 +49,30 @@
}
public void testMissingSdk () throws Exception {
- File devicesFile = SDKCorePlugin.getSDKManager().getDevicesXMLFile();
- assertNotNull("Devices.xml file is NULL!", devicesFile);
- assertTrue(devicesFile.toString() + "file doesn't exist", devicesFile.exists());
- File backupFile = new File(devicesFile.toString() + ".backup");
+
+ File devicesFile = null;
+ File backupFile = null;
+ if (SBSv2Utils.enableSBSv1Support()) {
+ devicesFile = SDKCorePlugin.getSDKManager().getDevicesXMLFile();
+ assertNotNull("Devices.xml file is NULL!", devicesFile);
+ assertTrue(devicesFile.toString() + " file doesn't exist", devicesFile.exists());
+ backupFile = new File(devicesFile.toString() + ".backup");
+ }
try {
ISDKManager sdkManager = SDKCorePlugin.getSDKManager();
List<ISymbianSDK> sdkList = sdkManager.getSDKList();
assertNotNull(sdkList);
- if (backupFile.exists()) {
- backupFile.delete();
+ if (devicesFile != null && backupFile != null) {
+ if (backupFile.exists()) {
+ backupFile.delete();
+ }
+ backupFile.createNewFile();
+
+ // backup devices.xml
+ copyFile(devicesFile, backupFile);
}
- backupFile.createNewFile();
-
- // backup devices.xml
- copyFile(devicesFile, backupFile);
IProject project = null;
ISymbianSDK lastSdkFound = null;