diff options
author | Steven Knight <knight@baldmt.com> | 2008-09-24 12:28:10 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2008-09-24 12:28:10 (GMT) |
commit | 2acc329d8522dbaadece2c61744cf99019747239 (patch) | |
tree | 872054f8841e707d8dda4646463d742f5139fbb2 /test/MSVS/vs-8.0-files.py | |
parent | af3c530b230be367f9d785598bf85e04f293cadd (diff) | |
download | SCons-2acc329d8522dbaadece2c61744cf99019747239.zip SCons-2acc329d8522dbaadece2c61744cf99019747239.tar.gz SCons-2acc329d8522dbaadece2c61744cf99019747239.tar.bz2 |
Split the MSVS variant_dir sub-tests into separate test scripts.
Diffstat (limited to 'test/MSVS/vs-8.0-files.py')
-rw-r--r-- | test/MSVS/vs-8.0-files.py | 92 |
1 files changed, 21 insertions, 71 deletions
diff --git a/test/MSVS/vs-8.0-files.py b/test/MSVS/vs-8.0-files.py index d5d210a..28e9f2a 100644 --- a/test/MSVS/vs-8.0-files.py +++ b/test/MSVS/vs-8.0-files.py @@ -30,8 +30,6 @@ solution (.sln) files that look correct. """ import os -import os.path -import sys import TestSConsMSVS @@ -48,38 +46,36 @@ SConscript_contents = TestSConsMSVS.SConscript_contents_8_0 -test.subdir('work1') +test.write('SConstruct', SConscript_contents) -test.write(['work1', 'SConstruct'], SConscript_contents) +test.run(arguments="Test.vcproj") -test.run(chdir='work1', arguments="Test.vcproj") - -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') +test.must_exist(test.workpath('Test.vcproj')) +vcproj = test.read('Test.vcproj', 'r') +expect = test.msvs_substitute(expected_vcprojfile, '8.0', None, 'SConstruct') # don't compare the pickled data assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj) -test.must_exist(test.workpath('work1', 'Test.sln')) -sln = test.read(['work1', 'Test.sln'], 'r') -expect = test.msvs_substitute(expected_slnfile, '8.0', 'work1', 'SConstruct') +test.must_exist(test.workpath('Test.sln')) +sln = test.read('Test.sln', 'r') +expect = test.msvs_substitute(expected_slnfile, '8.0', None, 'SConstruct') # don't compare the pickled data assert sln[:len(expect)] == expect, test.diff_substr(expect, sln) -test.run(chdir='work1', arguments='-c .') +test.run(arguments='-c .') -test.must_not_exist(test.workpath('work1', 'Test.vcproj')) -test.must_not_exist(test.workpath('work1', 'Test.sln')) +test.must_not_exist(test.workpath('Test.vcproj')) +test.must_not_exist(test.workpath('Test.sln')) -test.run(chdir='work1', arguments='Test.vcproj') +test.run(arguments='Test.vcproj') -test.must_exist(test.workpath('work1', 'Test.vcproj')) -test.must_exist(test.workpath('work1', 'Test.sln')) +test.must_exist(test.workpath('Test.vcproj')) +test.must_exist(test.workpath('Test.sln')) -test.run(chdir='work1', arguments='-c Test.sln') +test.run(arguments='-c Test.sln') -test.must_not_exist(test.workpath('work1', 'Test.vcproj')) -test.must_not_exist(test.workpath('work1', 'Test.sln')) +test.must_not_exist(test.workpath('Test.vcproj')) +test.must_not_exist(test.workpath('Test.sln')) @@ -88,61 +84,15 @@ test.must_not_exist(test.workpath('work1', 'Test.sln')) os.environ['PYTHON_ROOT'] = 'xyzzy' python = os.path.join('$(PYTHON_ROOT)', os.path.split(TestSConsMSVS.python)[1]) -test.run(chdir='work1', arguments='Test.vcproj') - -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', - python=python) -# don't compare the pickled data -assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj) - -del os.environ['PYTHON_ROOT'] -python = None - - +test.run(arguments='Test.vcproj') -test.subdir('work2', ['work2', 'src']) - -test.write(['work2', 'SConstruct'], """\ -SConscript('src/SConscript', variant_dir='build') -""") - -test.write(['work2', 'src', 'SConscript'], SConscript_contents) - -test.run(chdir='work2', arguments=".") - -vcproj = test.read(['work2', 'src', 'Test.vcproj'], 'r') -expect = test.msvs_substitute(expected_vcprojfile, - '8.0', - 'work2', - 'SConstruct', - project_guid="{FC63FE9E-71B3-06CC-11AF-2077D8108DFE}", +test.must_exist(test.workpath('Test.vcproj')) +vcproj = test.read('Test.vcproj', 'r') +expect = test.msvs_substitute(expected_vcprojfile, '8.0', None, 'SConstruct', python=python) # don't compare the pickled data assert vcproj[:len(expect)] == expect, test.diff_substr(expect, vcproj) -test.must_exist(test.workpath('work2', 'src', 'Test.sln')) -sln = test.read(['work2', 'src', 'Test.sln'], 'r') -expect = test.msvs_substitute(expected_slnfile, '8.0', - os.path.join('work2', 'src')) -# don't compare the pickled data -assert sln[:len(expect)] == expect, test.diff_substr(expect, sln) - -test.must_match(['work2', 'build', 'Test.vcproj'], """\ -This is just a placeholder file. -The real project file is here: -%s -""" % test.workpath('work2', 'src', 'Test.vcproj'), - mode='r') - -test.must_match(['work2', 'build', 'Test.sln'], """\ -This is just a placeholder file. -The real workspace file is here: -%s -""" % test.workpath('work2', 'src', 'Test.sln'), - mode='r') - test.pass_test() |