Only test at most 8 build contexts from an SDK.
authorEd Swartz <ed.swartz@nokia.com>
Fri, 04 Dec 2009 15:53:08 -0600
changeset 637 ced8425c3871
parent 636 f96e62c11eac
child 638 5bdd98f18bd3
Only test at most 8 build contexts from an SDK.
project/com.nokia.carbide.cpp.epoc.engine.tests/src/com/nokia/carbide/cpp/epoc/engine/tests/TestsPlugin.java
--- a/project/com.nokia.carbide.cpp.epoc.engine.tests/src/com/nokia/carbide/cpp/epoc/engine/tests/TestsPlugin.java	Fri Dec 04 15:36:34 2009 -0600
+++ b/project/com.nokia.carbide.cpp.epoc.engine.tests/src/com/nokia/carbide/cpp/epoc/engine/tests/TestsPlugin.java	Fri Dec 04 15:53:08 2009 -0600
@@ -63,17 +63,18 @@
 	}
 
 	/**
-	 * Get build configurations for the first non-empty SDK we find
-	 * @return
+	 * Get some build configurations for the first non-empty SDK we find.
+	 * @return a list of contexts, no more than 8.
 	 */
 	public static List<ISymbianBuildContext> getUsableBuildConfigs() {
 		for (ISymbianSDK sdk : SDKCorePlugin.getSDKManager().getSDKList()) {
 			List<ISymbianBuildContext> contexts = sdk.getUnfilteredBuildConfigurations();
-			if (contexts.size() > 0)
-				return contexts;
+			if (contexts.size() > 0) {
+				return contexts.subList(0, Math.min(contexts.size(), 8));
+			}
 		}
 		TestCase.fail("No installed SDKs provide build configurations");
-		return Collections.EMPTY_LIST;
+		return Collections.emptyList();
 	}
 
 }