summaryrefslogtreecommitdiff
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
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). ........
-rw-r--r--SConstruct4
-rw-r--r--src/engine/SCons/EnvironmentTests.py6
-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
-rw-r--r--test/Options/ListOption.py3
-rw-r--r--test/option-v.py2
7 files changed, 27 insertions, 15 deletions
diff --git a/SConstruct b/SConstruct
index 226513b9..6614089f 100644
--- a/SConstruct
+++ b/SConstruct
@@ -6,10 +6,10 @@
# When this gets changed, you also need to change test/option-v.py
# so it looks for the right string.
-copyright_years = '2001, 2002, 2003, 2004, 2005, 2006, 2007'
+copyright_years = '2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008'
# This gets inserted into the man pages to reflect the month of release.
-month_year = 'January 2007'
+month_year = 'March 2008'
#
# __COPYRIGHT__
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py
index 6c10ee0e..4f48da91 100644
--- a/src/engine/SCons/EnvironmentTests.py
+++ b/src/engine/SCons/EnvironmentTests.py
@@ -3317,13 +3317,13 @@ def generate(env):
def test_parse_flags(self):
'''Test the Base class parse_flags argument'''
# all we have to show is that it gets to MergeFlags internally
- env = Environment(parse_flags = '-X')
+ env = Environment(tools=[], parse_flags = '-X')
assert env['CCFLAGS'] == ['-X'], env['CCFLAGS']
- env = Environment(CCFLAGS=None, parse_flags = '-Y')
+ env = Environment(tools=[], CCFLAGS=None, parse_flags = '-Y')
assert env['CCFLAGS'] == ['-Y'], env['CCFLAGS']
- env = Environment(CPPDEFINES = 'FOO', parse_flags = '-std=c99 -X -DBAR')
+ env = Environment(tools=[], CPPDEFINES = 'FOO', parse_flags = '-std=c99 -X -DBAR')
assert env['CFLAGS'] == ['-std=c99'], env['CFLAGS']
assert env['CCFLAGS'] == ['-X'], env['CCFLAGS']
assert env['CPPDEFINES'] == ['FOO', 'BAR'], env['CPPDEFINES']
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")
diff --git a/test/Options/ListOption.py b/test/Options/ListOption.py
index 3a95b8a5..5611e40d 100644
--- a/test/Options/ListOption.py
+++ b/test/Options/ListOption.py
@@ -28,6 +28,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Test the ListOption canned Option type.
"""
+import os
import os.path
import string
@@ -79,7 +80,7 @@ test.run()
check(['all', '1', 'gl ical qt x11', 'gl ical qt x11',
"['gl ical qt x11']"])
-test.must_match(test.workpath('scons.options'), "shared = 'all'\n")
+test.must_match(test.workpath('scons.options'), "shared = 'all'"+os.linesep)
check(['all', '1', 'gl ical qt x11', 'gl ical qt x11',
"['gl ical qt x11']"])
diff --git a/test/option-v.py b/test/option-v.py
index 55278abc..433d6d04 100644
--- a/test/option-v.py
+++ b/test/option-v.py
@@ -38,7 +38,7 @@ test.write('SConstruct', "")
# by the packaging build.
copyright_marker = '__' + 'COPYRIGHT' + '__'
-copyright_years = '2001, 2002, 2003, 2004, 2005, 2006, 2007'
+copyright_years = '2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008'
fmt = '(%s|Copyright \\(c\\) %s The SCons Foundation)\n'