diff options
author | Steven Knight <knight@baldmt.com> | 2008-03-31 19:49:37 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2008-03-31 19:49:37 (GMT) |
commit | 3aaaa6c6344cf81eeab0f1b19ae96391dac3bfd2 (patch) | |
tree | ed8516e05c6e335415c8993f18f5c98b1458dc69 /test/Install/wrap-by-attribute.py | |
parent | 8a201fe36c6b3ee53892b43efd2a21e967a5fc19 (diff) | |
download | SCons-3aaaa6c6344cf81eeab0f1b19ae96391dac3bfd2.zip SCons-3aaaa6c6344cf81eeab0f1b19ae96391dac3bfd2.tar.gz SCons-3aaaa6c6344cf81eeab0f1b19ae96391dac3bfd2.tar.bz2 |
Merged revisions 2720-2724 via svnmerge from
http://scons.tigris.org/svn/scons/branches/core
........
r2722 | stevenknight | 2008-03-31 11:51:25 -0700 (Mon, 31 Mar 2008) | 2 lines
Update the copyright year.
........
r2723 | stevenknight | 2008-03-31 11:56:25 -0700 (Mon, 31 Mar 2008) | 2 lines
Windows portability fixes in tests (mostly with absolute path handling).
........
r2724 | stevenknight | 2008-03-31 12:44:37 -0700 (Mon, 31 Mar 2008) | 2 lines
Update publication month (way out of date).
........
Diffstat (limited to 'test/Install/wrap-by-attribute.py')
-rw-r--r-- | test/Install/wrap-by-attribute.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/test/Install/wrap-by-attribute.py b/test/Install/wrap-by-attribute.py index f586618..cdfe41c 100644 --- a/test/Install/wrap-by-attribute.py +++ b/test/Install/wrap-by-attribute.py @@ -33,6 +33,8 @@ are replaced by wrappers that fetch the saved methods from a different environment. """ +import os.path + import TestSCons test = TestSCons.TestSCons() @@ -40,6 +42,8 @@ test = TestSCons.TestSCons() test.subdir('outside', 'sub') test.write('SConstruct', """\ +import os.path + def cat(env, source, target): target = str(target[0]) source = map(str, source) @@ -55,9 +59,11 @@ env.SconsInternalInstallFunc = env.Install env.SconsInternalInstallAsFunc = env.InstallAs def InstallWithDestDir(dir, source): - return env.SconsInternalInstallFunc('$DESTDIR'+env.Dir(dir).abspath, source) + abspath = os.path.splitdrive(env.Dir(dir).abspath)[1] + return env.SconsInternalInstallFunc('$DESTDIR'+abspath, source) def InstallAsWithDestDir(target, source): - return env.SconsInternalInstallAsFunc('$DESTDIR'+env.File(target).abspath, source) + abspath = os.path.splitdrive(env.File(target).abspath)[1] + return env.SconsInternalInstallAsFunc('$DESTDIR'+abspath, source) # Add the wrappers directly as attributes. env.Install = InstallWithDestDir @@ -86,10 +92,12 @@ test.write('f4.in', "f4.in\n") test.run(arguments = '.') -f1_out = test.workpath('dest') + test.workpath('export', 'f1.out') -f2_new_out = test.workpath('dest') + test.workpath('export', 'f2-new.out') -f3_out = test.workpath('dest') + test.workpath('export', 'f3.out') -f4_new_out = test.workpath('dest') + test.workpath('export', 'f4-new.out') +export = os.path.splitdrive(test.workpath('export'))[1] + +f1_out = test.workpath('dest') + os.path.join(export, 'f1.out') +f2_new_out = test.workpath('dest') + os.path.join(export, 'f2-new.out') +f3_out = test.workpath('dest') + os.path.join(export, 'f3.out') +f4_new_out = test.workpath('dest') + os.path.join(export, 'f4-new.out') test.must_match(f1_out, "f1.in\n") test.must_match(f2_new_out, "f2.in\n") |