summaryrefslogtreecommitdiff
path: root/runtest.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2006-11-04 05:31:24 +0000
committerSteven Knight <knight@baldmt.com>2006-11-04 05:31:24 +0000
commit1762fa36021c69466c66f9297caa7551c2fe11dc (patch)
tree6631963b4e4521d9a9a643edc1269409083e4651 /runtest.py
parent6ba3fe1e1af2743602a4d0c55513deecc7e16df0 (diff)
downloadscons-1762fa36021c69466c66f9297caa7551c2fe11dc.tar.gz
Merged revisions 1667-1674 via svnmerge from
http://scons.tigris.org/svn/scons/branches/core ........ r1672 | stevenknight | 2006-11-03 23:11:52 -0600 (Fri, 03 Nov 2006) | 1 line 0.96.D480 - Don't use UNIX logic to detect an executable qmtest.py on Windows. ........ r1673 | stevenknight | 2006-11-03 23:18:59 -0600 (Fri, 03 Nov 2006) | 1 line 0.96.D481 - Remove the print statement from the previous checkin. ........ r1674 | stevenknight | 2006-11-03 23:25:43 -0600 (Fri, 03 Nov 2006) | 1 line 0.96.D482 - Create a env.Clone() method and encourage its use in favor of env.Copy(). ........
Diffstat (limited to 'runtest.py')
-rw-r--r--runtest.py35
1 files changed, 24 insertions, 11 deletions
diff --git a/runtest.py b/runtest.py
index 5440c107..7ee1fea5 100644
--- a/runtest.py
+++ b/runtest.py
@@ -233,18 +233,31 @@ runtest.py: No tests were specified.
""")
sys.exit(1)
+if sys.platform in ('win32', 'cygwin'):
+
+ def whereis(file):
+ pathext = [''] + string.split(os.environ['PATHEXT'])
+ for dir in string.split(os.environ['PATH'], os.pathsep):
+ f = os.path.join(dir, file)
+ for ext in pathext:
+ fext = f + ext
+ if os.path.isfile(fext):
+ return fext
+ return None
-def whereis(file):
- for dir in string.split(os.environ['PATH'], os.pathsep):
- f = os.path.join(dir, file)
- if os.path.isfile(f):
- try:
- st = os.stat(f)
- except OSError:
- continue
- if stat.S_IMODE(st[stat.ST_MODE]) & 0111:
- return f
- return None
+else:
+
+ def whereis(file):
+ for dir in string.split(os.environ['PATH'], os.pathsep):
+ f = os.path.join(dir, file)
+ if os.path.isfile(f):
+ try:
+ st = os.stat(f)
+ except OSError:
+ continue
+ if stat.S_IMODE(st[stat.ST_MODE]) & 0111:
+ return f
+ return None
try:
qmtest