summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2011-02-27 21:23:28 (GMT)
committerGary Oberbrunner <garyo@oberbrunner.com>2011-02-27 21:23:28 (GMT)
commitd52e3d6a0b0d9bd486c29ba0eb7e992fea14a786 (patch)
treeffda7f12c799eff1181ef58a97e48cb91d0a3e2b /src/engine
parentfa25c39c6a147861b2f738a42773a48c4d1f5ae7 (diff)
downloadSCons-d52e3d6a0b0d9bd486c29ba0eb7e992fea14a786.zip
SCons-d52e3d6a0b0d9bd486c29ba0eb7e992fea14a786.tar.gz
SCons-d52e3d6a0b0d9bd486c29ba0eb7e992fea14a786.tar.bz2
Fix MSVS tests to work on a 64-bit Windows machine by creating Wow6432Node dummy reg entries.
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/SCons/Tool/msvsTests.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/engine/SCons/Tool/msvsTests.py b/src/engine/SCons/Tool/msvsTests.py
index c2a8fe2..495fc24 100644
--- a/src/engine/SCons/Tool/msvsTests.py
+++ b/src/engine/SCons/Tool/msvsTests.py
@@ -475,18 +475,28 @@ class DummyRegistry(object):
self.parse(data)
def parse(self, data):
- parent = self.root
+ parents = [None, None]
+ parents[0] = self.root
keymatch = re.compile('^\[(.*)\]$')
valmatch = re.compile('^(?:"(.*)"|[@])="(.*)"$')
for line in data:
m1 = keymatch.match(line)
if m1:
- # add a key, set it to current parent
- parent = self.root.addKey(m1.group(1))
+ # add a key, set it to current parent.
+ # Also create subkey for Wow6432Node of HKLM\Software;
+ # that's where it looks on a 64-bit machine (tests will fail w/o this)
+ parents[0] = self.root.addKey(m1.group(1))
+ if 'HKEY_LOCAL_MACHINE\\Software' in m1.group(1):
+ p1 = m1.group(1).replace('HKEY_LOCAL_MACHINE\\Software', 'HKEY_LOCAL_MACHINE\\Software\\Wow6432Node')
+ parents[1] = self.root.addKey(p1)
+ else:
+ parents[1] = None
else:
m2 = valmatch.match(line)
if m2:
- parent.addValue(m2.group(1),m2.group(2))
+ for p in parents:
+ if p:
+ p.addValue(m2.group(1),m2.group(2))
def OpenKeyEx(self,root,key):
if root == SCons.Util.HKEY_CLASSES_ROOT:
@@ -690,7 +700,7 @@ class msvs80TestCase(msvsTestCase):
class msvsEmptyTestCase(msvsTestCase):
"""Test Empty Registry"""
registry = DummyRegistry(regdata_none)
- default_version = '9.0'
+ default_version = '10.0'
highest_version = None
number_of_versions = 0
install_locs = {