- Fix the -c option so it doesn't stop removing targets if one doesn't
already exist.
+ - Fix the --debug=pdb option when run on Windows NT.
+
From Steve Leblanc:
- Add support for the -u option.
def opt_debug(opt, arg):
global print_tree
if arg == "pdb":
- if sys.platform == 'win32':
- lib_dir = os.path.join(sys.exec_prefix, "lib")
- else:
- lib_dir = os.path.join(sys.exec_prefix,
- "lib",
- "python" + sys.version[0:3])
- args = [ sys.executable, os.path.join(lib_dir, "pdb.py") ] + \
+ args = [ sys.executable, "pdb.py" ] + \
filter(lambda x: x != "--debug=pdb", sys.argv)
if sys.platform == 'win32':
- ret = os.spawnve(os.P_WAIT, cmd_interp, args, env)
- sys.exit(ret)
+ args[1] = os.path.join(sys.exec_prefix, "lib", "pdb.py")
+ sys.exit(os.spawnve(os.P_WAIT, args[0], args, os.environ))
else:
+ args[1] = os.path.join(sys.exec_prefix,
+ "lib",
+ "python" + sys.version[0:3],
+ "pdb.py")
os.execvpe(args[0], args, os.environ)
elif arg == "tree":
print_tree = 1
+-foo.h
""" % (foo, obj,obj)
-assert string.find(test.stdout(), tree) != -1
+test.fail_test(string.find(test.stdout(), tree) == -1)
test.run(arguments = "--debug=tree " + foo)
-assert string.find(test.stdout(), tree) != -1
+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)
+test.fail_test(string.find(test.stdout(), "scons") == -1)
test.pass_test()