summaryrefslogtreecommitdiff
path: root/runtest.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-02-07 07:05:09 +0000
committerSteven Knight <knight@baldmt.com>2003-02-07 07:05:09 +0000
commit1e93334baa5bafe099bba0bbb2878cfbc4349ac1 (patch)
tree73f0208106d249b4b5e5164e42e951f5157ffefc /runtest.py
parent4f6a2c926304ee3ea444b6854991489702252c0e (diff)
downloadscons-1e93334baa5bafe099bba0bbb2878cfbc4349ac1.tar.gz
Fix case-sensitive packaging problem on Win32.
Diffstat (limited to 'runtest.py')
-rw-r--r--runtest.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/runtest.py b/runtest.py
index 52e76d48..eff0a358 100644
--- a/runtest.py
+++ b/runtest.py
@@ -73,6 +73,7 @@ package = None
scons = None
scons_exec = None
output = None
+version = ''
if os.name == 'java':
python = os.path.join(sys.prefix, 'jython')
@@ -107,13 +108,15 @@ Options:
tar-gz .tar.gz distribution
zip .zip distribution
-q, --quiet Don't print the test being executed.
+ -v version Specify the SCons version.
-X Test script is executable, don't feed to Python.
-x SCRIPT, --exec SCRIPT Test SCRIPT.
"""
-opts, args = getopt.getopt(sys.argv[1:], "adho:P:p:qXx:",
+opts, args = getopt.getopt(sys.argv[1:], "adho:P:p:qv:Xx:",
['all', 'debug', 'help', 'output=',
- 'package=', 'python=', 'quiet', 'exec='])
+ 'package=', 'python=', 'quiet',
+ 'version=', 'exec='])
for o, a in opts:
if o == '-a' or o == '--all':
@@ -133,6 +136,8 @@ for o, a in opts:
package = a
elif o == '-q' or o == '--quiet':
printcmd = 0
+ elif o == '-v' or o == '--version':
+ version = a
elif o == '-X':
scons_exec = 1
elif o == '-x' or o == '--exec':
@@ -144,7 +149,7 @@ def whereis(file):
if os.path.isfile(f):
try:
st = os.stat(f)
- except:
+ except OSError:
continue
if stat.S_IMODE(st[stat.ST_MODE]) & 0111:
return f
@@ -304,6 +309,10 @@ elif scons_lib_dir:
if scons_exec:
os.environ['SCONS_EXEC'] = '1'
+os.environ['SCONS_CWD'] = cwd
+
+os.environ['SCONS_VERSION'] = version
+
os.environ['PYTHONPATH'] = pythonpath_dir + \
os.pathsep + \
os.path.join(cwd, 'build', 'etc') + \