diff options
author | Steven Knight <knight@baldmt.com> | 2002-04-30 02:48:52 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2002-04-30 02:48:52 (GMT) |
commit | 35a9fe7b3a3575367b74fbaf84f5336ee4ca5573 (patch) | |
tree | bc47231e4aaccd9999f7a8e895d3fe32a40d106c /runtest.py | |
parent | ba9fa12fcc465eb09debdcbd4ccf1ca2d5e8a56e (diff) | |
download | SCons-35a9fe7b3a3575367b74fbaf84f5336ee4ca5573.zip SCons-35a9fe7b3a3575367b74fbaf84f5336ee4ca5573.tar.gz SCons-35a9fe7b3a3575367b74fbaf84f5336ee4ca5573.tar.bz2 |
Improve the scons.bat script. (Alex Jacques)
Diffstat (limited to 'runtest.py')
-rw-r--r-- | runtest.py | 21 |
1 files changed, 18 insertions, 3 deletions
@@ -23,11 +23,16 @@ # debugger (pdb.py) so you don't have to # muck with PYTHONPATH yourself. # +# -p package Test against the specified package. +# # -q Quiet. By default, runtest.py prints the # command line it will execute before # executing it. This suppresses that print. # -# -p package Test against the specified package. +# -X The scons "script" is an executable; don't +# feed it to Python. +# +# -x scons The scons script to use for tests. # # (Note: There used to be a -v option that specified the SCons # version to be tested, when we were installing in a version-specific @@ -48,20 +53,24 @@ debug = '' tests = [] printcmd = 1 package = None +scons = None +scons_exec = None if sys.platform == 'win32': lib_dir = os.path.join(sys.exec_prefix, "lib") else: lib_dir = os.path.join(sys.exec_prefix, "lib", "python" + sys.version[0:3]) -opts, tests = getopt.getopt(sys.argv[1:], "adqp:", - ['all', 'debug', 'quiet', 'package=']) +opts, tests = getopt.getopt(sys.argv[1:], "adqp:Xx:", + ['all', 'debug', 'exec=', 'quiet', 'package=']) for o, a in opts: if o == '-a' or o == '--all': all = 1 elif o == '-d' or o == '--debug': debug = os.path.join(lib_dir, "pdb.py") elif o == '-q' or o == '--quiet': printcmd = 0 elif o == '-p' or o == '--package': package = a + elif o == '-X': scons_exec = 1 + elif o == '-x' or o == '--exec': scons = a cwd = os.getcwd() @@ -123,6 +132,12 @@ os.environ['PYTHONPATH'] = lib_dir + \ os.pathsep + \ os.path.join(cwd, 'etc') +if scons: + os.environ['SCONS'] = scons + +if scons_exec: + os.environ['SCONS_EXEC'] = '1' + os.chdir(scons_dir) fail = [] |