diff options
author | Steven Knight <knight@baldmt.com> | 2005-08-11 02:40:21 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2005-08-11 02:40:21 (GMT) |
commit | 4f9b67c3139189bd317599560017695b3781d67c (patch) | |
tree | 47efff348cf3446332113e96adac321c7e4478f7 /test/option--debug.py | |
parent | 8edcfef5f563ebf1ca3922b97ca4cbae927af279 (diff) | |
download | SCons-4f9b67c3139189bd317599560017695b3781d67c.zip SCons-4f9b67c3139189bd317599560017695b3781d67c.tar.gz SCons-4f9b67c3139189bd317599560017695b3781d67c.tar.bz2 |
Print stacktrace for UserErrors when --debug=stacktrace is used. (Chad Austin)
Diffstat (limited to 'test/option--debug.py')
-rw-r--r-- | test/option--debug.py | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/test/option--debug.py b/test/option--debug.py index 2ded69a..bc383e8 100644 --- a/test/option--debug.py +++ b/test/option--debug.py @@ -285,49 +285,4 @@ test.must_match('file16.out', "file16.in\n") test.must_match('file17.out', "file17.in\n") test.must_match('file18.out', "file18.in\n") -############################ -# test --debug=stacktrace - -test.write('SConstruct', """\ -def kfile_scan(node, env, target): - raise "kfile_scan error" - -kscan = Scanner(name = 'kfile', - function = kfile_scan, - skeys = ['.k']) - -env = Environment() -env.Append(SCANNERS = [kscan]) - -env.Command('foo', 'foo.k', Copy('$TARGET', '$SOURCE')) -""") - -test.write('foo.k', "foo.k\n") - -test.run(status = 2, stderr = "scons: *** kfile_scan error\n") - -test.run(arguments = "--debug=stacktrace", - status = 2, - stderr = None) - -stderr = test.stderr() - -lines = [ - "scons: *** kfile_scan error", - "scons: internal stack trace:", - 'raise "kfile_scan error"', -] - -missing = [] -for line in lines: - if string.find(stderr, line) == -1: - missing.append(line) - -if missing: - print "STDERR is missing the following lines:" - print "\t" + string.join(lines, "\n\t") - print "STDERR =====" - print stderr - test.fail_test(1) - test.pass_test() |