#!/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
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
+-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)
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()
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)