diff options
author | Steven Knight <knight@baldmt.com> | 2004-07-13 06:13:18 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-07-13 06:13:18 (GMT) |
commit | 7d581805c37a57144abb0f4961cd1c8edd1a20a0 (patch) | |
tree | 62dbd0e4ee82caf4bf3202b8aa8e53be76a9f49a /test/BuildDir-errors.py | |
parent | bca352fe3610e87a72088bc11bac22db27ed36f7 (diff) | |
download | SCons-7d581805c37a57144abb0f4961cd1c8edd1a20a0.zip SCons-7d581805c37a57144abb0f4961cd1c8edd1a20a0.tar.gz SCons-7d581805c37a57144abb0f4961cd1c8edd1a20a0.tar.bz2 |
Make exception handling thread-safe by using sys.exc_info() instead of sys.exc_{type,value}.
Diffstat (limited to 'test/BuildDir-errors.py')
-rw-r--r-- | test/BuildDir-errors.py | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/test/BuildDir-errors.py b/test/BuildDir-errors.py index 4941a64..967384c 100644 --- a/test/BuildDir-errors.py +++ b/test/BuildDir-errors.py @@ -132,22 +132,16 @@ os.chmod(dir, os.stat(dir)[stat.ST_MODE] & ~stat.S_IWUSR) test.run(chdir = 'ro-src', arguments = ".", status = 2, - stderr = None) -test.fail_test(not test.match_re_dotall(test.stderr(), """\ -scons: \\*\\*\\* Cannot duplicate `src.file\\.in' in `build': Permission denied. Stop. -scons: internal stack trace: - File .* -""")) + stderr = """\ +scons: *** Cannot duplicate `%s' in `build': Permission denied. Stop. +""" % (os.path.join('src', 'file.in'))) test.run(chdir = 'ro-src', arguments = "-k .", status = 2, - stderr = None) -test.fail_test(not test.match_re_dotall(test.stderr(), """\ -scons: \\*\\*\\* Cannot duplicate `src.file\.in' in `build': Permission denied. -scons: internal stack trace: - File .* -""")) + stderr = """\ +scons: *** Cannot duplicate `%s' in `build': Permission denied. +""" % (os.path.join('src', 'file.in'))) f.close() @@ -163,10 +157,9 @@ BuildDir('build', 'src2') test.run(chdir = 'duplicate', arguments = ".", status = 2, - stderr = None) -test.fail_test(test.stderr() != """ + stderr = """ scons: *** 'build' already has a source directory: 'src1'. -File \"SConstruct\", line 2, in ? +File "SConstruct", line 2, in ? """) test.pass_test() |