Fix problems returning the appropriate exit status on build errors.
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sun, 5 Jan 2003 13:11:27 +0000 (13:11 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sun, 5 Jan 2003 13:11:27 +0000 (13:11 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@534 fdb21ef1-2011-0410-befe-b5e4ea1792b1

etc/TestSCons.py
src/CHANGES.txt
src/engine/SCons/Script/__init__.py
test/sconsign.py

index c97fd482baeca80f022b5d0fe433b987329fcdef..4b392d476da4edbbd78f97b4cf6a6612d4a4d2a6 100644 (file)
@@ -34,7 +34,7 @@ if os.name == 'posix':
     def _failed(self, status = 0):
         if self.status is None:
             return None
-        if os.WIFSIGNALED(status):
+        if os.WIFSIGNALED(self.status):
             return None
         return _status(self) != status
     def _status(self):
index b9c63242b26d08304d01daa62fd94401997f5134..7cb4eb926f6a06235d39cb715613c6c28efce72c 100644 (file)
@@ -28,6 +28,9 @@ RELEASE 0.10 - XXX
   - Don't create duplicate source files in a BuildDir when the -n
     option is used.
 
+  - Fix SCons not exiting with the appropriate status on build errors
+    (and probably in other situations).
+
   From Steve Leblanc:
 
   - Add a Clean() method to support removing user-specified targets
index 093b82cefcdc61a5c1c1ca2560b6aaadbc545974..93f4795e843051fe1d9192f0727245e659e5aad9 100644 (file)
@@ -88,6 +88,7 @@ class BuildTask(SCons.Taskmaster.Task):
                 print "Command execution time: %f seconds"%(finish_time-start_time)
 
     def do_failed(self):
+        global exit_status
         if ignore_errors:
             SCons.Taskmaster.Task.executed(self)
         elif keep_going_on_error:
index 6d88f7976aa7071cb120aa9da3b1c4a450dad825..3841ff56590dcc491f7d4fff173771178933fc8d 100644 (file)
@@ -90,10 +90,10 @@ scons: warning: Ignoring corrupt .sconsign file: sub1..sconsign
 stdout = test.wrap_stdout('build1\("sub1/foo.out", "foo.in"\)\n')
 
 test.write(sub1__sconsign, 'not:a:sconsign:file')
-test.run(arguments = '.', stderr=stderr, stdout=stdout, status=2)
+test.run(arguments = '.', stderr=stderr, stdout=stdout)
 
 test.write(sub1__sconsign, '\0\0\0\0\0\0\0\0\0\0\0\0\0\0')
-test.run(arguments = '.', stderr=stderr, stdout=stdout, status=2)
+test.run(arguments = '.', stderr=stderr, stdout=stdout)
 
 
 test.pass_test()