summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-04-30 02:15:28 (GMT)
committerSteven Knight <knight@baldmt.com>2003-04-30 02:15:28 (GMT)
commit7ff542f3fb5b361087ef2738a82b5d849e005d45 (patch)
tree873be91d38fa785b3b901b84bf152382c4225565
parent7ed00239dd9a8e9609063688f2b6287f8fc7372d (diff)
downloadSCons-7ff542f3fb5b361087ef2738a82b5d849e005d45.zip
SCons-7ff542f3fb5b361087ef2738a82b5d849e005d45.tar.gz
SCons-7ff542f3fb5b361087ef2738a82b5d849e005d45.tar.bz2
Fix the spawn() functions. (Anthony Roach)
-rw-r--r--src/CHANGES.txt2
-rw-r--r--src/engine/SCons/Action.py5
-rw-r--r--src/engine/SCons/Platform/posix.py5
-rw-r--r--src/engine/SCons/Platform/win32.py1
-rw-r--r--test/builderrors.py15
5 files changed, 23 insertions, 5 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index c088d58..04afab8 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -88,6 +88,8 @@ RELEASE 0.14 - XXX
- Support Import('*') to import everything that's been Export()ed.
+ - Fix an undefined exitvalmap on Win32 systems.
+
From David Snopek:
- Contribute the "Autoscons" code for Autoconf-like checking for
diff --git a/src/engine/SCons/Action.py b/src/engine/SCons/Action.py
index 764d527..1260850 100644
--- a/src/engine/SCons/Action.py
+++ b/src/engine/SCons/Action.py
@@ -45,11 +45,6 @@ _null = _Null
print_actions = 1;
execute_actions = 1;
-exitvalmap = {
- 2 : 127,
- 13 : 126,
-}
-
default_ENV = None
def rfile(n):
diff --git a/src/engine/SCons/Platform/posix.py b/src/engine/SCons/Platform/posix.py
index fd78de4..03c8698 100644
--- a/src/engine/SCons/Platform/posix.py
+++ b/src/engine/SCons/Platform/posix.py
@@ -40,6 +40,11 @@ import sys
import SCons.Util
+exitvalmap = {
+ 2 : 127,
+ 13 : 126,
+}
+
def escape(arg):
"escape shell special characters"
slash = '\\'
diff --git a/src/engine/SCons/Platform/win32.py b/src/engine/SCons/Platform/win32.py
index 4f7b05b..39c0ba8 100644
--- a/src/engine/SCons/Platform/win32.py
+++ b/src/engine/SCons/Platform/win32.py
@@ -37,6 +37,7 @@ import os.path
import string
import sys
import tempfile
+from SCons.Platform.posix import exitvalmap
import SCons.Util
diff --git a/test/builderrors.py b/test/builderrors.py
index 568ed0d..4eb6bfa 100644
--- a/test/builderrors.py
+++ b/test/builderrors.py
@@ -25,6 +25,7 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
+import string
import sys
import TestSCons
@@ -105,4 +106,18 @@ test.fail_test(test.read(['three', 'f1.out']) != "three/f1.in\n")
test.fail_test(test.read(['three', 'f2.out']) != "three/f2.in\n")
test.fail_test(os.path.exists(test.workpath('f3.out')))
+test.write('SConstruct', """
+env=Environment()
+if env['PLATFORM'] == 'posix':
+ from SCons.Platform.posix import fork_spawn
+ env['SPAWN'] = fork_spawn
+env['ENV']['PATH'] = ''
+env.Command(target='foo.out', source=[], action='not_a_program')
+""")
+
+test.run(status=2, stderr=None)
+err = test.stderr()
+test.fail_test(string.find(err, 'Exception') != -1 or \
+ string.find(err, 'Traceback') != -1)
+
test.pass_test()