summaryrefslogtreecommitdiff
path: root/test/Install
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2008-03-31 19:49:37 +0000
committerSteven Knight <knight@baldmt.com>2008-03-31 19:49:37 +0000
commit1015fa3073c5cbd4f730955afc064ad507a58fd3 (patch)
treeed8516e05c6e335415c8993f18f5c98b1458dc69 /test/Install
parentf29c80ccb3a0ba71ff1da4d2d9cdb7bf80a88db1 (diff)
downloadscons-1015fa3073c5cbd4f730955afc064ad507a58fd3.tar.gz
Merged revisions 2720-2724 via svnmerge from0.98.0
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')
-rw-r--r--test/Install/InstallAs.py3
-rw-r--r--test/Install/option--install-sandbox.py4
-rw-r--r--test/Install/wrap-by-attribute.py20
3 files changed, 19 insertions, 8 deletions
diff --git a/test/Install/InstallAs.py b/test/Install/InstallAs.py
index 0b810f01..8b279f10 100644
--- a/test/Install/InstallAs.py
+++ b/test/Install/InstallAs.py
@@ -37,6 +37,7 @@ test = TestSCons.TestSCons()
test.subdir('install', 'subdir')
install = test.workpath('install')
+install_f1_out = os.path.join('install', 'f1.out')
install_file1_out = test.workpath('install', 'file1.out')
install_file2_out = test.workpath('install', 'file2.out')
install_file3_out = test.workpath('install', 'file3.out')
@@ -66,7 +67,7 @@ install_file1a_out = os.path.join('install', 'f1.out')
subdir_file3_in = os.path.join('subdir', 'file3.in')
expect = test.wrap_stdout("""\
-Install file: "file1.in" as "install/f1.out"
+Install file: "file1.in" as "%(install_f1_out)s"
Install file: "file1.in" as "%(install_file1_out)s"
Install file: "file2.in" as "%(install_file2_out)s"
Install file: "%(subdir_file3_in)s" as "%(install_file3_out)s"
diff --git a/test/Install/option--install-sandbox.py b/test/Install/option--install-sandbox.py
index 38a7915c..3ec5b3bf 100644
--- a/test/Install/option--install-sandbox.py
+++ b/test/Install/option--install-sandbox.py
@@ -43,7 +43,9 @@ _SUBDIR_file3_in = os.path.join('$SUBDIR', 'file3.in')
target_file2_out = os.path.join(target, 'file2.out')
subdir_file3_in = os.path.join('subdir', 'file3.in')
target_subdir_file3_out = os.path.join(target, 'subdir', 'file3.out')
-file1_out = target+os.path.join( target, destdir, 'file1.out' )
+file1_out = target+os.path.join( target,
+ os.path.splitdrive(destdir)[1],
+ 'file1.out' )
#
test.write('SConstruct', r"""
diff --git a/test/Install/wrap-by-attribute.py b/test/Install/wrap-by-attribute.py
index f5866185..cdfe41ca 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")