[Commits] (heikki) If the tests fail in one mode, report immediately and don't try to run tests in other mode. This also fixes the case where tests fail in first mode, but succeed in second mode and we were reporting that as success.

commits at osafoundation.org commits at osafoundation.org
Wed Aug 25 13:28:52 PDT 2004


Commit by: heikki
Modified files:
hardhat/buildscripts/newchandler.py 1.26 1.27

Log message:
If the tests fail in one mode, report immediately and don't try to run tests in other mode. This also fixes the case where tests fail in first mode, but succeed in second mode and we were reporting that as success.

ViewCVS links:
http://cvs.osafoundation.org/index.cgi/hardhat/buildscripts/newchandler.py.diff?r1=text&tr1=1.26&r2=text&tr2=1.27

Index: hardhat/buildscripts/newchandler.py
diff -u hardhat/buildscripts/newchandler.py:1.26 hardhat/buildscripts/newchandler.py:1.27
--- hardhat/buildscripts/newchandler.py:1.26	Tue Aug 24 10:38:34 2004
+++ hardhat/buildscripts/newchandler.py	Wed Aug 25 13:28:51 2004
@@ -102,9 +102,11 @@
              [hardhatScript, "-o", os.path.join(outputDir, buildVersion), distOption, buildVersionEscaped])
             hardhatutil.dumpOutputList(outputList, log)
             
-            ret = Do(hardhatScript, releaseMode, workingDir, outputDir, 
+            ret = doTests(hardhatScript, releaseMode, workingDir, outputDir, 
               cvsVintage, buildVersion, log)
             CopyLog(os.path.join(workingDir, logPath), log)
+            if ret != 'success':
+                break
 
         changes = "-first-run"
     else:
@@ -143,9 +145,11 @@
 
         # do tests
         for releaseMode in ('debug', 'release'):   
-            ret = Do(hardhatScript, releaseMode, workingDir, outputDir, 
+            ret = doTests(hardhatScript, releaseMode, workingDir, outputDir, 
               cvsVintage, buildVersion, log)
             CopyLog(os.path.join(workingDir, logPath), log)
+            if ret != 'success':
+                break
 
     return ret + changes 
 
@@ -155,7 +159,7 @@
     'chandler',
 )
 
-def Do(hardhatScript, mode, workingDir, outputDir, cvsVintage, buildVersion, log):
+def doTests(hardhatScript, mode, workingDir, outputDir, cvsVintage, buildVersion, log):
 
     testDir = os.path.join(workingDir, "chandler")
     os.chdir(testDir)
@@ -190,7 +194,7 @@
             CopyLog(os.path.join(workingDir, logPath), log)
         log.write("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n")
 
-    return "success"  # end of Do( )
+    return "success"  # end of doTests( )
 
 def changesInCVS(moduleDir, workingDir, cvsVintage, log, filename):
     changesAtAll = False



More information about the Commits mailing list