diff options
author | Steven Knight <knight@baldmt.com> | 2001-10-29 05:33:03 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2001-10-29 05:33:03 (GMT) |
commit | 15928490b955a3d4ea4966102dc915ed0fdb8526 (patch) | |
tree | 4b7b65dd605a53881ad0ee1977cea88db9f31885 /test | |
parent | 3bce8a9e6e70d61723e4824bd7ba84a7b9547456 (diff) | |
download | SCons-15928490b955a3d4ea4966102dc915ed0fdb8526.zip SCons-15928490b955a3d4ea4966102dc915ed0fdb8526.tar.gz SCons-15928490b955a3d4ea4966102dc915ed0fdb8526.tar.bz2 |
Handle SConscript files in subdirectories.
Diffstat (limited to 'test')
-rw-r--r-- | test/Depends.py | 28 | ||||
-rw-r--r-- | test/SConscript.py | 2 | ||||
-rw-r--r-- | test/errors.py | 2 | ||||
-rw-r--r-- | test/option-f.py | 2 |
4 files changed, 14 insertions, 20 deletions
diff --git a/test/Depends.py b/test/Depends.py index 3777fbd..5fb0479 100644 --- a/test/Depends.py +++ b/test/Depends.py @@ -52,12 +52,12 @@ env.Depends(target = 'f3.out', dependency = 'subdir/bar.dep') env.Foo(target = 'f1.out', source = 'f1.in') env.Foo(target = 'f2.out', source = 'f2.in') env.Bar(target = 'f3.out', source = 'f3.in') -Conscript('subdir/SConscript') +SConscript('subdir/SConscript') """ % (python, python)) test.write(['subdir', 'SConscript'], """ env.Depends(target = 'f4.out', dependency = 'bar.dep') -env.Foo(target = 'f4.out', source = 'f4.in') +env.Bar(target = 'f4.out', source = 'f4.in') """) test.write('f1.in', "f1.in\n") @@ -72,40 +72,34 @@ test.write(['subdir', 'foo.dep'], "subdir/foo.dep 1\n") test.write(['subdir', 'bar.dep'], "subdir/bar.dep 1\n") -#XXXtest.run(arguments = '.') -#test.run(arguments = 'f1.out f2.out f3.out subdir/f4.out') -test.run(arguments = 'f1.out f2.out f3.out') +test.run(arguments = '.') test.fail_test(test.read('f1.out') != "f1.in\nsubdir/foo.dep 1\n") test.fail_test(test.read('f2.out') != "f2.in\nsubdir/foo.dep 1\n") test.fail_test(test.read('f3.out') != "f3.in\nsubdir/bar.dep 1\n") -#XXXtest.fail_test(test.read(['subdir', 'f4.out']) != -#XXX "subdir/f4.in\nsubdir/bar.dep 1\n") +test.fail_test(test.read(['subdir', 'f4.out']) != + "subdir/f4.in\nsubdir/bar.dep 1\n") test.write(['subdir', 'foo.dep'], "subdir/foo.dep 2\n") test.write(['subdir', 'bar.dep'], "subdir/bar.dep 2\n") -#XXXtest.run(arguments = '.') -#test.run(arguments = 'f1.out f2.out f3.out subdir/f4.out') -test.run(arguments = 'f1.out f2.out f3.out') +test.run(arguments = '.') test.fail_test(test.read('f1.out') != "f1.in\nsubdir/foo.dep 2\n") test.fail_test(test.read('f2.out') != "f2.in\nsubdir/foo.dep 2\n") test.fail_test(test.read('f3.out') != "f3.in\nsubdir/bar.dep 2\n") -#XXXtest.fail_test(test.read(['subdir', 'f4.out']) != -#XXX "subdir/f4.in\nsubdir/bar.dep 2\n") +test.fail_test(test.read(['subdir', 'f4.out']) != + "subdir/f4.in\nsubdir/bar.dep 2\n") test.write(['subdir', 'bar.dep'], "subdir/bar.dep 3\n") -#XXXtest.run(arguments = '.') -#test.run(arguments = 'f1.out f2.out f3.out subdir/f4.out') -test.run(arguments = 'f1.out f2.out f3.out') +test.run(arguments = '.') test.fail_test(test.read('f1.out') != "f1.in\nsubdir/foo.dep 2\n") test.fail_test(test.read('f2.out') != "f2.in\nsubdir/foo.dep 2\n") test.fail_test(test.read('f3.out') != "f3.in\nsubdir/bar.dep 3\n") -#XXXtest.fail_test(test.read(['subdir', 'f4.out']) != -#XXX "subdir/f4.in\nsubdir/bar.dep 3\n") +test.fail_test(test.read(['subdir', 'f4.out']) != + "subdir/f4.in\nsubdir/bar.dep 3\n") test.pass_test() diff --git a/test/SConscript.py b/test/SConscript.py index 8a0f28b..b463f7e 100644 --- a/test/SConscript.py +++ b/test/SConscript.py @@ -31,7 +31,7 @@ test = TestSCons.TestSCons() test.write('SConstruct', """ import os print "SConstruct", os.getcwd() -Conscript('SConscript') +SConscript('SConscript') """) # XXX I THINK THEY SHOULD HAVE TO RE-IMPORT OS HERE diff --git a/test/errors.py b/test/errors.py index 3965f77..b973f37 100644 --- a/test/errors.py +++ b/test/errors.py @@ -67,7 +67,7 @@ test.run(arguments='-f SConstruct3', File ".*scons(\.py)?", line \d+, in \? main\(\) File ".*scons(\.py)?", line \d+, in main - exec f in globals\(\) + exec file in globals\(\) File "SConstruct3", line \d+, in \? raise InternalError, 'error inside' InternalError: error inside diff --git a/test/option-f.py b/test/option-f.py index 84b8ed3..55ec367 100644 --- a/test/option-f.py +++ b/test/option-f.py @@ -77,6 +77,6 @@ print "STDIN " + os.getcwd() test.run(arguments = '-f no_such_file', stdout = "", - stderr = "Ignoring missing script 'no_such_file'\n") + stderr = "Ignoring missing SConscript 'no_such_file'\n") test.pass_test() |