adjust sbsv2 tests for configs that have errors (and hence no build data)
authortimkelly
Fri, 27 Aug 2010 09:34:09 -0500
changeset 1900 346e4625dacb
parent 1899 d1e402149e7f
child 1901 33bf7adf7871
adjust sbsv2 tests for configs that have errors (and hence no build data)
builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/SBSv2QueryTests.java
--- a/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/SBSv2QueryTests.java	Thu Aug 26 20:49:15 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/SBSv2QueryTests.java	Fri Aug 27 09:34:09 2010 -0500
@@ -36,7 +36,7 @@
 	
 	private long startTime;
 	
-	//private final String SDK_ID1 = "Nokia_Symbian3_SDK_v0.9"; // SDK with additional aliases and products
+	//private final String SDK_ID1 = "s3"; // SDK with additional aliases and products
 	private final String SDK_ID1 = "K_92_WK12";
 	
 	@Override
@@ -85,7 +85,13 @@
 				System.out.println("Config " + sbsv2Context.getSBSv2Alias() + " had error, cannot fully test: " + sbsv2Context.getConfigQueryData().getConfigurationErrorMessage());
 			}
 			
-			assertTrue(sbsv2Context.getConfigQueryData().getTargettypes().size() > 0);
+			if (sbsv2Context.getConfigQueryData().getConfigurationErrorMessage() == null || 
+				sbsv2Context.getConfigQueryData().getConfigurationErrorMessage().length() == 0 ){
+				// If there is an error in a configuration we know there won't be any target types
+				assertTrue(sbsv2Context.getConfigQueryData().getTargettypes().size() > 0);
+			} else {
+				assertFalse(sbsv2Context.getConfigQueryData().getTargettypes() == null);
+			}
 		}
 	}