commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbe...@apache.org
Subject svn commit: r948887 - /commons/sandbox/gsoc/2010/scxml-js/trunk/build.js
Date Thu, 27 May 2010 16:28:37 GMT
Author: jbeard
Date: Thu May 27 16:28:36 2010
New Revision: 948887

URL: http://svn.apache.org/viewvc?rev=948887&view=rev
Log:
Fixed bug in build script so that unit test scripts are used with corresponding generated
javascript.

Modified:
    commons/sandbox/gsoc/2010/scxml-js/trunk/build.js

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/build.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/build.js?rev=948887&r1=948886&r2=948887&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/build.js (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/build.js Thu May 27 16:28:36 2010
@@ -54,8 +54,8 @@ require.def("build",
 			//enums
 			//we keep backward links of these
 			var backends = {
-	//			"switch" : true,
-	//			"table" : true,
+				"switch" : true,
+				"table" : true,
 				"state" : true
 			}
 
@@ -72,7 +72,7 @@ require.def("build",
 			var scxmlTests = {
 				KitchenSink :"test/kitchen_sink/KitchenSink.xml",
 				KitchenSink_performance :"test/kitchen_sink/KitchenSink_performance.xml",
-	//			KitchenSink_executableContent :"test/kitchen_sink/KitchenSink_executableContent.xml"
+				KitchenSink_executableContent :"test/kitchen_sink/KitchenSink_executableContent.xml"
 			}
 
 
@@ -89,12 +89,11 @@ require.def("build",
 					path : "test/kitchen_sink/scripts/unitTest.js",
 					scxmlTest : scxmlTests.KitchenSink		//back-link
 				},
-				/*
 				{ 
 					path : "test/kitchen_sink/scripts/unitTest_executableContent.js",
 					scxmlTest : scxmlTests.KitchenSink_executableContent		//back-link
 				}
-				*/
+				
 			]
 
 			//gets populated at run-time
@@ -269,7 +268,9 @@ require.def("build",
 						var testScriptPath = testScript.path;
 						var testScriptRelativePath = "../" + testScriptPath;
 
-						scriptsGenerated.forEach(function(generatedScript){
+						scriptsGenerated.
+							filter(function(s){return scxmlTests[s.scxmlTest] == testScript.scxmlTest}).
+							forEach(function(generatedScript){
 
 							var testHtml = htmlGenFn(generatedScript.name,testScriptRelativePath);
 
@@ -408,7 +409,6 @@ require.def("build",
 						bSel.start();
 
 						htmlUnitTestsGenerated.forEach(function(htmlTest){
-
 							//ensure we are not testing an ie html test
 							//on a non-ie browser
 							if(htmlTest.ie == bSpec.ie){
@@ -468,6 +468,7 @@ require.def("build",
 
 				},
 
+
 				runUnitTestsWithRhino : function(){
 
 					this.genJavaScript();
@@ -480,7 +481,10 @@ require.def("build",
 
 					unitTestScripts.forEach(function(unitTestScript){
 
-						scriptsGenerated.filter(function(s){return !s.ie}).forEach(function(generatedScript){
+						scriptsGenerated.	
+							filter(function(s){return scxmlTests[s.scxmlTest] == unitTestScript.scxmlTest}).
+							filter(function(s){return !s.ie}).
+							forEach(function(generatedScript){
 
 							load(generatedScript.path);
 



Mime
View raw message