summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2014-03-08 20:17:10 (GMT)
committerGary Oberbrunner <garyo@oberbrunner.com>2014-03-08 20:17:10 (GMT)
commit2706e890c8d969f8e3269b28598d89e286305b21 (patch)
treee287b596caee36aa6c9d1680cf4e5933a42a71a5
parentb992f1293c5a16c2dcde96a31844e78b09e769a1 (diff)
parent31bc313b3447cc9b093a32be1aca6c23471967df (diff)
downloadSCons-2706e890c8d969f8e3269b28598d89e286305b21.zip
SCons-2706e890c8d969f8e3269b28598d89e286305b21.tar.gz
SCons-2706e890c8d969f8e3269b28598d89e286305b21.tar.bz2
Merged in techtonik/scons (pull request #115, remove old QMTest harness support)
-rwxr-xr-xruntest.py91
-rw-r--r--src/CHANGES.txt3
2 files changed, 14 insertions, 80 deletions
diff --git a/runtest.py b/runtest.py
index 2b7f7ce..2e34969 100755
--- a/runtest.py
+++ b/runtest.py
@@ -4,25 +4,23 @@
#
# runtest.py - wrapper script for running SCons tests
#
-# This script mainly exists to set PYTHONPATH to the right list of
-# directories to test the SCons modules.
+# SCons test suite consists of:
#
-# By default, it directly uses the modules in the local tree:
-# ./src/ (source files we ship) and ./QMTest/ (other modules we don't).
+# - unit tests - included in *Tests.py files from src/ dir
+# - module tests - are in test/ dir and use framework from QMTest/
#
-# When any -p option is specified, this script assumes it's in a
-# directory in which a build has been performed, and sets PYTHONPATH
-# so that it *only* references the modules that have unpacked from
-# the specified built package, to test whether the packages are good.
+# This script adds src/ and QMTest/ directories to PYTHONPATH,
+# performs test discovery and processes them according to options.
#
-# Options:
+# With -p (--package) option, script tests specified package from
+# build directory and sets PYTHONPATH to reference modules unpacked
+# during build process for testing purposes (build/test-*).
#
# -3 Run with the python -3 option,
#
# -a Run all tests; does a virtual 'find' for
# all SCons tests under the current directory.
-# You can also specify a list of subdirectories
-# (not available with the "--qmtest" option!). Then,
+# You can also specify a list of subdirectories. Then,
# only the given folders are searched for test files.
#
# -d Debug. Runs the script under the Python
@@ -115,7 +113,6 @@ print_passed_summary = None
python3incompatibilities = None
scons = None
scons_exec = None
-qmtest = None
testlistfile = None
version = ''
print_times = None
@@ -159,7 +156,6 @@ Options:
tar-gz .tar.gz distribution
zip .zip distribution
--passed Summarize which tests passed.
- --qmtest Run using the QMTest harness (deprecated).
-q, --quiet Don't print the test being executed.
--quit-on-failure Quit on any test failure
-s, --short-progress Short progress, prints only the command line
@@ -217,7 +213,7 @@ opts, args = getopt.getopt(args, "3b:def:hj:klnP:p:qsv:Xx:t",
'debug', 'external', 'file=', 'help', 'no-progress',
'jobs=',
'list', 'no-exec', 'nopipefiles',
- 'package=', 'passed', 'python=', 'qmtest',
+ 'package=', 'passed', 'python=',
'quiet',
'quit-on-failure',
'short-progress', 'time',
@@ -264,12 +260,6 @@ for o, a in opts:
print_passed_summary = 1
elif o in ['-P', '--python']:
python = a
- elif o in ['--qmtest']:
- if sys.platform == 'win32':
- # typically in c:/PythonXX/Scripts
- qmtest = 'qmtest.py'
- else:
- qmtest = 'qmtest'
elif o in ['-q', '--quiet']:
printcommand = 0
suppress_stdout = True
@@ -573,15 +563,6 @@ else:
if not baseline or baseline == '.':
base = cwd
elif baseline == '-':
- # Tentative code for fetching information directly from the
- # QMTest context file.
- #
- #import qm.common
- #import qm.test.context
- #qm.rc.Load("test")
- #context = qm.test.context.Context()
- #context.Read('context')
-
url = None
svn_info = os.popen("svn info 2>&1", "r").read()
match = re.search('URL: (.*)', svn_info)
@@ -707,7 +688,7 @@ elif testlistfile:
tests = [x for x in tests if x[0] != '#']
tests = [x[:-1] for x in tests]
tests = [x.strip() for x in tests]
-elif options.all and not qmtest:
+elif options.all:
# Find all of the SCons functional tests in the local directory
# tree. This is anything under the 'src' subdirectory that ends
# with 'Tests.py', or any Python script (*.py) under the 'test'
@@ -729,56 +710,6 @@ runtest.py: No tests were found.
""")
sys.exit(1)
-if qmtest:
- if baseline:
- aegis_result_stream = 'scons_tdb.AegisBaselineStream'
- qmr_file = 'baseline.qmr'
- else:
- aegis_result_stream = 'scons_tdb.AegisChangeStream'
- qmr_file = 'results.qmr'
-
- if print_times:
- aegis_result_stream = aegis_result_stream + "(print_time='1')"
-
- qmtest_args = [ qmtest, ]
-
- qmtest_args.extend([
- 'run',
- '--output %s' % qmr_file,
- '--format none',
- '--result-stream="%s"' % aegis_result_stream,
- ])
-
- if python:
- qmtest_args.append('--context python="%s"' % python)
-
- if options.xml:
- rsclass = 'scons_tdb.SConsXMLResultStream'
- qof = "r'" + options.xml + "'"
- rs = '--result-stream="%s(filename=%s)"' % (rsclass, qof)
- qmtest_args.append(rs)
-
- os.environ['SCONS'] = os.path.join(cwd, 'src', 'script', 'scons.py')
-
- cmd = ' '.join(qmtest_args + tests)
- if printcommand:
- sys.stdout.write(cmd + '\n')
- sys.stdout.flush()
- status = 0
- if execute_tests:
- status = os.system(cmd)
- try:
- wexitstatus = os.WEXITSTATUS
- except AttributeError:
- pass
- else:
- status = wexitstatus(status)
- sys.exit(status)
-
-#try:
-# os.chdir(scons_script_dir)
-#except OSError:
-# pass
tests = [Test(t) for t in tests]
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index efae24b..57b961c 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -5,6 +5,7 @@
Change Log
RELEASE 2.3.2.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE
+
From Anatoly Techtonik:
- Several improvements for running scons.py from source:
* engine files form source directory take priority over all other
@@ -12,6 +13,8 @@ RELEASE 2.3.2.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE
* message about scons.py running from source is removed to fix tests
that were failing because of this extra line in the output
* error message when SCons import fails now lists lookup paths
+ - Remove support for QMTest harness from runtest.py
+
From Dirk Baechle:
- Update XML doc editor configuration