summaryrefslogtreecommitdiff
path: root/test/MSVS
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2008-09-20 13:41:57 +0000
committerSteven Knight <knight@baldmt.com>2008-09-20 13:41:57 +0000
commitdc6d651d6e10b11e859af23653e6a18417684c93 (patch)
tree67f64b048f91e062e805d7d5444c752ef608a9e5 /test/MSVS
parentaffba40942bdd75724ef5ad279f8ad0aa1c0da4e (diff)
downloadscons-dc6d651d6e10b11e859af23653e6a18417684c93.tar.gz
Windows test fix: enhance the TestSCons class so an explicit
python=None argument still defaults to sys.executable. Use this to reset the python value we interpolate into the expected files that we generate after resetting the os.environ['PYTHON'] value.
Diffstat (limited to 'test/MSVS')
-rw-r--r--test/MSVS/vs-7.0-files.py4
-rw-r--r--test/MSVS/vs-7.1-files.py4
-rw-r--r--test/MSVS/vs-8.0-files.py4
3 files changed, 6 insertions, 6 deletions
diff --git a/test/MSVS/vs-7.0-files.py b/test/MSVS/vs-7.0-files.py
index 25355149..f00de517 100644
--- a/test/MSVS/vs-7.0-files.py
+++ b/test/MSVS/vs-7.0-files.py
@@ -203,11 +203,10 @@ test.must_not_exist(test.workpath('work1', 'Test.sln'))
# Test that running SCons with $PYTHON_ROOT in the environment
# changes the .vcproj output as expected.
os.environ['PYTHON_ROOT'] = 'xyzzy'
+python = os.path.join('$(PYTHON_ROOT)', os.path.split(TestSCons.python)[1])
test.run(chdir='work1', arguments='Test.vcproj')
-python = os.path.join('$(PYTHON_ROOT)', os.path.split(TestSCons.python)[1])
-
test.must_exist(test.workpath('work1', 'Test.vcproj'))
vcproj = test.read(['work1', 'Test.vcproj'], 'r')
expect = test.msvs_substitute(expected_vcprojfile, '7.0', 'work1', 'SConstruct',
@@ -216,6 +215,7 @@ expect = test.msvs_substitute(expected_vcprojfile, '7.0', 'work1', 'SConstruct',
assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
os.environ['PYTHON_ROOT'] = ''
+python = None
diff --git a/test/MSVS/vs-7.1-files.py b/test/MSVS/vs-7.1-files.py
index 578943d6..8c9821c8 100644
--- a/test/MSVS/vs-7.1-files.py
+++ b/test/MSVS/vs-7.1-files.py
@@ -205,11 +205,10 @@ test.must_not_exist(test.workpath('work1', 'Test.sln'))
# Test that running SCons with $PYTHON_ROOT in the environment
# changes the .vcproj output as expected.
os.environ['PYTHON_ROOT'] = 'xyzzy'
+python = os.path.join('$(PYTHON_ROOT)', os.path.split(TestSCons.python)[1])
test.run(chdir='work1', arguments='Test.vcproj')
-python = os.path.join('$(PYTHON_ROOT)', os.path.split(TestSCons.python)[1])
-
test.must_exist(test.workpath('work1', 'Test.vcproj'))
vcproj = test.read(['work1', 'Test.vcproj'], 'r')
expect = test.msvs_substitute(expected_vcprojfile, '7.1', 'work1', 'SConstruct',
@@ -218,6 +217,7 @@ expect = test.msvs_substitute(expected_vcprojfile, '7.1', 'work1', 'SConstruct',
assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
os.environ['PYTHON_ROOT'] = ''
+python = None
diff --git a/test/MSVS/vs-8.0-files.py b/test/MSVS/vs-8.0-files.py
index 33eefd56..40daa57f 100644
--- a/test/MSVS/vs-8.0-files.py
+++ b/test/MSVS/vs-8.0-files.py
@@ -212,11 +212,10 @@ test.must_not_exist(test.workpath('work1', 'Test.sln'))
# Test that running SCons with $PYTHON_ROOT in the environment
# changes the .vcproj output as expected.
os.environ['PYTHON_ROOT'] = 'xyzzy'
+python = os.path.join('$(PYTHON_ROOT)', os.path.split(TestSCons.python)[1])
test.run(chdir='work1', arguments='Test.vcproj')
-python = os.path.join('$(PYTHON_ROOT)', os.path.split(TestSCons.python)[1])
-
test.must_exist(test.workpath('work1', 'Test.vcproj'))
vcproj = test.read(['work1', 'Test.vcproj'], 'r')
expect = test.msvs_substitute(expected_vcprojfile, '8.0', 'work1', 'SConstruct',
@@ -225,6 +224,7 @@ expect = test.msvs_substitute(expected_vcprojfile, '8.0', 'work1', 'SConstruct',
assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj)
os.environ['PYTHON_ROOT'] = ''
+python = None