X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=test%2Foption--debug.py;h=05839127bbd449e245cf415398fdada572ba4e13;hb=0eea5c776c8dfbb3be1c8d7d25ed8d8126c98e96;hp=6561a057fe9b5407323ded9ff4b450b0bc4bf55c;hpb=e3e591b15441a760e92f67aa8caa064e731b60cb;p=scons.git diff --git a/test/option--debug.py b/test/option--debug.py index 6561a057..05839127 100644 --- a/test/option--debug.py +++ b/test/option--debug.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright (c) 2001, 2002 Steven Knight +# __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -94,7 +94,20 @@ tree = """ test.run(arguments = "--debug=dtree foo.xxx") test.fail_test(string.find(test.stdout(), tree) == -1) -tree = """scons: \".\" is up to date. +tree = """ ++-foo.c + +-foo.h + +-bar.h +""" +test.run(arguments = "--debug=includes foo.ooo") +test.fail_test(string.find(test.stdout(), tree) == -1) + +# these shouldn't print out anything in particular, but +# they shouldn't crash either: +test.run(arguments = "--debug=includes .") +test.run(arguments = "--debug=includes foo.c") + +tree = """scons: `.' is up to date. +-. +-SConstruct @@ -121,7 +134,7 @@ tree = """scons: \".\" is up to date. +-foo.h """ test.run(arguments = "--debug=tree .") -test.fail_test(string.find(test.stdout(), tree) != 0) +test.fail_test(string.find(test.stdout(), tree) == -1) test.run(arguments = "--debug=pdb", stdin = "n\ns\nq\n") test.fail_test(string.find(test.stdout(), "(Pdb)") == -1) @@ -150,7 +163,7 @@ def num(match, line): return float(re.match(match, line).group(1)) start_time = time.time() -test.run(program=sys.executable, arguments='-c pass') +test.run(program=TestSCons.python, arguments='-c pass') overhead = time.time() - start_time start_time = time.time() @@ -163,7 +176,6 @@ cmdline = filter(lambda x: x[:23] == "Command execution time:", line) expected_command_time = num(r'Command execution time: (\d+\.\d+) seconds', cmdline[0]) expected_command_time = expected_command_time + num(r'Command execution time: (\d+\.\d+) seconds', cmdline[1]) expected_command_time = expected_command_time + num(r'Command execution time: (\d+\.\d+) seconds', cmdline[2]) -expected_command_time = expected_command_time + num(r'Command execution time: (\d+\.\d+) seconds', cmdline[3]) totalline = filter(lambda x: x[:6] == "Total ", line)