diff options
author | Steven Knight <knight@baldmt.com> | 2003-04-30 02:15:28 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-04-30 02:15:28 (GMT) |
commit | 7ff542f3fb5b361087ef2738a82b5d849e005d45 (patch) | |
tree | 873be91d38fa785b3b901b84bf152382c4225565 /test/builderrors.py | |
parent | 7ed00239dd9a8e9609063688f2b6287f8fc7372d (diff) | |
download | SCons-7ff542f3fb5b361087ef2738a82b5d849e005d45.zip SCons-7ff542f3fb5b361087ef2738a82b5d849e005d45.tar.gz SCons-7ff542f3fb5b361087ef2738a82b5d849e005d45.tar.bz2 |
Fix the spawn() functions. (Anthony Roach)
Diffstat (limited to 'test/builderrors.py')
-rw-r--r-- | test/builderrors.py | 15 |
1 files changed, 15 insertions, 0 deletions
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() |