summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Tool/msvsTests.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Tool/msvsTests.py')
-rw-r--r--src/engine/SCons/Tool/msvsTests.py23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/engine/SCons/Tool/msvsTests.py b/src/engine/SCons/Tool/msvsTests.py
index b5068fc..04ecf0f 100644
--- a/src/engine/SCons/Tool/msvsTests.py
+++ b/src/engine/SCons/Tool/msvsTests.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
+# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,15 +21,18 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/msvsTests.py 2014/03/02 14:18:15 garyo"
+__revision__ = "src/engine/SCons/Tool/msvsTests.py 2014/07/05 09:42:21 garyo"
import os
import sys
-import TestCmd
import unittest
import copy
+import TestCmd
+import TestUnit
+
from SCons.Tool.msvs import *
+from SCons.Tool.MSCommon.vs import SupportedVSList
import SCons.Util
import SCons.Warnings
@@ -547,15 +550,17 @@ class msvsTestCase(unittest.TestCase):
def test_get_default_version(self):
"""Test retrieval of the default visual studio version"""
-
+
debug("Testing for default version %s"%self.default_version)
env = DummyEnv()
v1 = get_default_version(env)
if v1:
assert env['MSVS_VERSION'] == self.default_version, \
- ("env['MSVS_VERSION'] != self.default_version",self.default_version, env['MSVS_VERSION'])
+ ("env['MSVS_VERSION'] != self.default_version",
+ env['MSVS_VERSION'],self.default_version)
assert env['MSVS']['VERSION'] == self.default_version, \
- ("env['MSVS']['VERSION'] != self.default_version",self.default_version, env['MSVS']['VERSION'])
+ ("env['MSVS']['VERSION'] != self.default_version",
+ env['MSVS']['VERSION'], self.default_version)
assert v1 == self.default_version, (self.default_version, v1)
env = DummyEnv({'MSVS_VERSION':'7.0'})
@@ -701,7 +706,7 @@ class msvs80TestCase(msvsTestCase):
class msvsEmptyTestCase(msvsTestCase):
"""Test Empty Registry"""
registry = DummyRegistry(regdata_none)
- default_version = '11.0'
+ default_version = SupportedVSList[0].version
highest_version = None
number_of_versions = 0
install_locs = {
@@ -724,7 +729,7 @@ if __name__ == "__main__":
SCons.Util.RegEnumKey = DummyEnumKey
SCons.Util.RegEnumValue = DummyEnumValue
SCons.Util.RegQueryValueEx = DummyQueryValue
-
+
os.path.exists = DummyExists # make sure all files exist :-)
os.path.isfile = DummyExists # make sure all files are files :-)
os.path.isdir = DummyExists # make sure all dirs are dirs :-)
@@ -756,7 +761,7 @@ if __name__ == "__main__":
del os.environ[k]
suite = unittest.makeSuite(test_class, 'test_')
- if not unittest.TextTestRunner().run(suite).wasSuccessful():
+ if not TestUnit.cli.get_runner()().run(suite).wasSuccessful():
exit_val = 1
finally:
os.env = back_osenv