diff options
author | Steven Knight <knight@baldmt.com> | 2003-02-26 17:40:22 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-02-26 17:40:22 (GMT) |
commit | c98c5391f5afa134589db88ebe986368a1b6097f (patch) | |
tree | 1a7e0f06222b16f346e09b1dcfc185e470fbd3e5 /test | |
parent | 8a816e6362b715a238183ae25551dbb6df7cddc3 (diff) | |
download | SCons-c98c5391f5afa134589db88ebe986368a1b6097f.zip SCons-c98c5391f5afa134589db88ebe986368a1b6097f.tar.gz SCons-c98c5391f5afa134589db88ebe986368a1b6097f.tar.bz2 |
Fix str(Node.FS) in an SConscript file, and add a separate src_dir argument to SConscript(). (Charles Crain)
Diffstat (limited to 'test')
-rw-r--r-- | test/SConscript-build_dir.py | 12 | ||||
-rw-r--r-- | test/scan-once.py | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/test/SConscript-build_dir.py b/test/SConscript-build_dir.py index c0b92f3..165619a 100644 --- a/test/SConscript-build_dir.py +++ b/test/SConscript-build_dir.py @@ -40,6 +40,7 @@ all5 = test.workpath('build', 'var5', 'all') all6 = test.workpath('build', 'var6', 'all') all7 = test.workpath('build', 'var7', 'all') all8 = test.workpath('build', 'var8', 'all') +all9 = test.workpath('test', 'build', 'var9', 'src', 'all') test.subdir('test') @@ -54,6 +55,7 @@ var5 = Dir('../build/var5') var6 = Dir('../build/var6') var7 = Dir('../build/var7') var8 = Dir('../build/var8') +var9 = Dir('../build/var9') def cat(env, source, target): target = str(target[0]) @@ -83,6 +85,15 @@ SConscript('src/SConscript', build_dir=var6) SConscript('src/SConscript', build_dir=var7, src_dir=src, duplicate=0) SConscript('src/SConscript', build_dir='../build/var8', duplicate=0) + +# This tests the fact that if you specify a src_dir that is above +# the dir a SConscript is in, that we do the intuitive thing, i.e., +# we set the path of the SConscript accordingly. The below is +# equivalent to saying: +# +# BuildDir('build/var9', '.') +# SConscript('build/var9/src/SConscript') +SConscript('src/SConscript', build_dir='build/var9', src_dir='.') """) test.subdir(['test', 'src'], ['test', 'alt']) @@ -120,6 +131,7 @@ test.fail_test(test.read(all3) != all_src) test.fail_test(test.read(all6) != all_src) test.fail_test(test.read(all7) != all_src) test.fail_test(test.read(all8) != all_src) +test.fail_test(test.read(all9) != all_src) import os import stat diff --git a/test/scan-once.py b/test/scan-once.py index 4355998..b910438 100644 --- a/test/scan-once.py +++ b/test/scan-once.py @@ -332,7 +332,7 @@ Mylib.ExportLib(env, lib_fullname) #cmd_justlib = "cd %s ; make" % Dir(".") cmd_generated = "%s $SOURCE" % (sys.executable,) -cmd_justlib = "%s %s -C %s" % (sys.executable, sys.argv[0], Dir(".")) +cmd_justlib = "%s %s -C ${SOURCE[0].dir}" % (sys.executable, sys.argv[0]) ##### Deps appear correct ... but wacky scanning? # Why? |