summaryrefslogtreecommitdiffstats
path: root/test/option--debug.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2005-02-13 13:05:22 (GMT)
committerSteven Knight <knight@baldmt.com>2005-02-13 13:05:22 (GMT)
commitd3ba17c301be389cd15cc387e1df7fa530e6856e (patch)
tree71e69e51423a35771427ba095d28a6f323086f7a /test/option--debug.py
parentc4cf6660b5a05710dc603999010f5b4645b3f655 (diff)
downloadSCons-d3ba17c301be389cd15cc387e1df7fa530e6856e.zip
SCons-d3ba17c301be389cd15cc387e1df7fa530e6856e.tar.gz
SCons-d3ba17c301be389cd15cc387e1df7fa530e6856e.tar.bz2
Refactor Environment/Executor/Node scanner interaction a little. Put --debug={dtree,includes,stree,tree} in separate tests.
Diffstat (limited to 'test/option--debug.py')
-rw-r--r--test/option--debug.py150
1 files changed, 2 insertions, 148 deletions
diff --git a/test/option--debug.py b/test/option--debug.py
index 322afda..2ded69a 100644
--- a/test/option--debug.py
+++ b/test/option--debug.py
@@ -65,154 +65,8 @@ test.write('bar.h', """
#endif
""")
-test.run(arguments = "--debug=tree foo.xxx")
-
-tree = """
-+-foo.xxx
- +-foo.ooo
- | +-foo.c
- | +-foo.h
- | +-bar.h
- +-bar.ooo
- +-bar.c
- +-bar.h
- +-foo.h
-"""
-
-test.fail_test(string.find(test.stdout(), tree) == -1)
-
-test.run(arguments = "--debug=tree foo.xxx")
-test.fail_test(string.find(test.stdout(), tree) == -1)
-
-stree = """
-[E B C]+-foo.xxx
-[E B C] +-foo.ooo
-[E ] | +-foo.c
-[E ] | +-foo.h
-[E ] | +-bar.h
-[E B C] +-bar.ooo
-[E ] +-bar.c
-[E ] +-bar.h
-[E ] +-foo.h
-"""
-
-test.run(arguments = "--debug=stree foo.xxx")
-test.fail_test(string.find(test.stdout(), stree) == -1)
-
-stree2 = """
- E = exists
- R = exists in repository only
- b = implicit builder
- B = explicit builder
- S = side effect
- P = precious
- A = always build
- C = current
-
-[ B ]+-foo.xxx
-[ B ] +-foo.ooo
-[E ] | +-foo.c
-[E ] | +-foo.h
-[E ] | +-bar.h
-[ B ] +-bar.ooo
-[E ] +-bar.c
-[E ] +-bar.h
-[E ] +-foo.h
-"""
-
-test.run(arguments = '-c foo.xxx')
-test.run(arguments = "--no-exec --debug=stree foo.xxx")
-test.fail_test(string.find(test.stdout(), stree2) == -1)
-
-
-
-dtree = """
-+-foo.xxx
- +-foo.ooo
- +-bar.ooo
-"""
-
-test.run(arguments = "--debug=dtree foo.xxx")
-test.fail_test(string.find(test.stdout(), dtree) == -1)
-
-includes = """
-+-foo.c
- +-foo.h
- +-bar.h
-"""
-test.run(arguments = "--debug=includes foo.ooo")
-test.fail_test(string.find(test.stdout(), includes) == -1)
-
-# Make sure we print the debug stuff even if there's a build failure.
-test.write('bar.h', """
-#ifndef BAR_H
-#define BAR_H
-#include "foo.h"
-#endif
-THIS SHOULD CAUSE A BUILD FAILURE
-""")
-
-test.run(arguments = "--debug=tree foo.xxx",
- status = 2,
- stderr = None)
-test.fail_test(string.find(test.stdout(), tree) == -1)
-
-test.run(arguments = "--debug=dtree foo.xxx",
- status = 2,
- stderr = None)
-test.fail_test(string.find(test.stdout(), dtree) == -1)
-
-# In an ideal world, --debug=includes would also work when there's a build
-# failure, but this would require even more complicated logic to scan
-# all of the intermediate nodes that get skipped when the build failure
-# occurs. On the YAGNI theory, we're just not going to worry about this
-# until it becomes an issue that someone actually cares enough about.
-#test.run(arguments = "--debug=includes foo.xxx",
-# status = 2,
-# stderr = None)
-#test.fail_test(string.find(test.stdout(), includes) == -1)
-
-# Restore bar.h to something good.
-test.write('bar.h', """
-#ifndef BAR_H
-#define BAR_H
-#include "foo.h"
-#endif
-""")
-
-# 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
- +-bar.c
- +-bar.h
- +-bar.ooo
- | +-bar.c
- | +-bar.h
- | +-foo.h
- +-foo.c
- +-foo.h
- +-foo.ooo
- | +-foo.c
- | +-foo.h
- | +-bar.h
- +-foo.xxx
- +-foo.ooo
- | +-foo.c
- | +-foo.h
- | +-bar.h
- +-bar.ooo
- +-bar.c
- +-bar.h
- +-foo.h
-"""
-test.run(arguments = "--debug=tree .")
-test.fail_test(string.find(test.stdout(), tree) == -1)
+############################
+# test --debug=time
test.run(arguments = "--debug=pdb", stdin = "n\ns\nq\n")
test.fail_test(string.find(test.stdout(), "(Pdb)") == -1)