aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lovemore2012-06-28 14:53:30 +0100
committerDavid Lovemore2012-06-28 14:53:30 +0100
commit1e6a42e2cf06fae86773dc12ffa2e249b85d1a17 (patch)
tree595f34eeae0c2a9ee11dc43135512dab17ae0808
parenta441c2b5f35936204684df4560d0dae62e644d31 (diff)
downloademacs-1e6a42e2cf06fae86773dc12ffa2e249b85d1a17.tar.gz
emacs-1e6a42e2cf06fae86773dc12ffa2e249b85d1a17.zip
Update test-runner.py to check sdk build target.
Copied from Perforce Change: 178524 ServerID: perforce.ravenbrook.com
-rwxr-xr-xmps/tool/test-runner.py32
1 files changed, 22 insertions, 10 deletions
diff --git a/mps/tool/test-runner.py b/mps/tool/test-runner.py
index 732b8638135..32a89523ce6 100755
--- a/mps/tool/test-runner.py
+++ b/mps/tool/test-runner.py
@@ -35,15 +35,14 @@ def mpsplatformcode() :
35 # Uses the platform module which appears to be in Python 2.3, but not 35 # Uses the platform module which appears to be in Python 2.3, but not
36 # documented until Python 2.4. See 36 # documented until Python 2.4. See
37 # http://www.python.org/doc/2.4/lib/module-platform.html 37 # http://www.python.org/doc/2.4/lib/module-platform.html
38 38 osys = '??' # operating system
39 os = '??' # operating system
40 try : 39 try :
41 # 2007-07-03 DRJ : Darwin is tested, the other I have guessed at 40 # 2007-07-03 DRJ : Darwin is tested, the other I have guessed at
42 # from the documentation for platform.system() 41 # from the documentation for platform.system()
43 os = {'Darwin':'xc', 42 osys = {'Darwin':'xc',
44 'Linux':'li', 43 'Linux':'li',
45 'Windows':'w3', 44 'Windows':'w3',
46 }[platform.system()] 45 }[platform.system()]
47 except : 46 except :
48 pass 47 pass
49 48
@@ -54,13 +53,26 @@ def mpsplatformcode() :
54 arch = {'Power Macintosh':'pp', 53 arch = {'Power Macintosh':'pp',
55 'i386':'i3', 54 'i386':'i3',
56 'x86':'i3', 55 'x86':'i3',
56 'AMD64':'i6',
57 }[platform.machine()] 57 }[platform.machine()]
58 except : 58 except :
59 # Windows specific hack. On Python 2.4 and 2.5 platform.machine 59 # Windows specific hack. On Python 2.4 and 2.5 platform.machine
60 # returns ''. 60 # returns ''.
61 if platform.machine() == '' and os == 'w3' : 61 if platform.machine() == '' and osys == 'w3' :
62 arch = 'i3' 62 arch = 'i3'
63 63 # x64 hack. Use $TARGET_CPU to determine whether we want to
64 # run 32 or 64 bit.
65 # On windows TARGET_CPU is set by the SDK setenv command which
66 # determines the build environment. This needs to be done before
67 # we run the tests.
68 if arch == 'i6' and osys == 'w3':
69 try :
70 target_cpu = os.environ['TARGET_CPU']
71 arch = {'x86':'i3',
72 'x64':'i6',
73 }[target_cpu]
74 except :
75 pass
64 compiler = '??' # C compiler tool chain 76 compiler = '??' # C compiler tool chain
65 # There's no automagic way to determine this, some OS/Arch 77 # There's no automagic way to determine this, some OS/Arch
66 # combinations support more than one C compiler. Sometimes it really 78 # combinations support more than one C compiler. Sometimes it really
@@ -69,11 +81,11 @@ def mpsplatformcode() :
69 try : 81 try :
70 compiler = {'xc':'gc', 82 compiler = {'xc':'gc',
71 'w3':'mv', 83 'w3':'mv',
72 }[os] 84 }[osys]
73 except : 85 except :
74 pass 86 pass
75 87
76 plat = os + arch + compiler 88 plat = osys + arch + compiler
77 if re.search(r'\?', plat) : 89 if re.search(r'\?', plat) :
78 return None, plat 90 return None, plat
79 return plat 91 return plat