summaryrefslogtreecommitdiffstats
path: root/runtest.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix running tests in subdir as argument to runtest.py, e.g.anatoly techtonik2014-03-241-2/+2
| | | | python runtest.py test/CC
* runtest.py: Make sure --runner argument is only passed to unit testsanatoly techtonik2014-03-211-2/+5
|
* Make runner for unit tests configurable, add TAPTestRunner that formatsanatoly techtonik2014-03-201-3/+11
| | | | | | output according to TAP protocol http://testanything.org/ runtest.py --runner TestUnit.TAPTestRunner src\engine\SCons\ActionTests.py
* runtest.py: Remove double check if no tests are found.anatoly techtonik2014-03-201-8/+3
|
* runtest.py: Simplify test discovery code (and show where unittests are)anatoly techtonik2014-03-201-20/+31
|
* runtest.py: "module tests" are properly named "end-to-end" testsanatoly techtonik2014-03-201-3/+4
|
* runtest.py: Improve cmdline help readability with hg-style formatanatoly techtonik2014-03-171-22/+22
|
* runtest.py: Show usage lines on error, improve help messageanatoly techtonik2014-03-131-16/+12
|
* runtest.py: Clarify code a bitanatoly techtonik2014-03-071-3/+13
|
* runtest.py: Remove qmtest supportanatoly techtonik2014-03-061-71/+3
|
* runtest.py: Rewrite module descriptionanatoly techtonik2014-03-061-9/+8
|
* Addition of warning if build doesn't build expected targets.Tom Tanner2013-09-261-13/+25
| | | | Added option to runtest.py to stop on first error
* update to latest SCons commitsRobert Managan2012-12-181-221/+268
|\
| * runtest.py: Enable -o, --output to save stdout/stderr into a fileanatoly techtonik2012-12-181-7/+15
| |
| * runtest.py: Fix CRLFanatoly techtonik2012-12-181-2/+2
| |
| * runtest.py: Replace `-o file --xml` with `--xml file`anatoly techtonik2012-12-171-27/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | `runtest.py -o file ...` never worked right throwing exception: Traceback (most recent call last): File "...\runtest.py", line 925, in <module> tests[0].header(f) IndexError: list index out of range Leaving -o argument to gather all output into a file (work in process) also allows to capture output and format test results in parallel.
| * runtest.py: Exit with an error if no tests were foundanatoly techtonik2012-12-171-2/+7
| |
| * runtest.py: remove --noqmtest optionanatoly techtonik2012-12-171-11/+3
| |
| * Merge runtest.py fixesanatoly techtonik2012-12-171-20/+50
| |\
| | * runtest.py: Turn on unbuffered output ASAP.anatoly techtonik2012-12-151-13/+18
| | |
| | * runtest.py: Gradually moving from getopt to optparseanatoly techtonik2012-12-141-8/+33
| | |
| * | Add -jN support to runtest.py to run tests in parallelGary Oberbrunner2012-12-171-11/+72
| |/
| * Remove subprocess compatibility code used for Python < 2.4anatoly techtonik2012-12-121-148/+107
| |
* | merge in changes from SCons defaultRobert Managan2012-12-151-16/+5
|\ \ | |/
| * os.spawnv is here since Python 1.6, removing compatibility codeanatoly techtonik2012-12-121-16/+5
| |
* | Merge mainline tip.Russel Winder2012-10-041-4/+0
|\ \ | |/
| * - several smaller fixes to get all tests running under Buildbot againdirkbaechle2012-09-271-4/+0
| |
* | Start the process of getting better support for D builds.Russel Winder2012-09-051-0/+0
|/
* - removed Aegis supportdirkbaechle2012-08-121-167/+17
|
* - fixed directory/file fixtures for "general" modedirkbaechle2012-08-121-26/+10
| | | | | - added documentation for the testing framework - converted two old tests from the "packaging" section to using fixtures as reference examples
* - renamed the '-j' option to '-k', such that we can use the former for ↵dirkbaechle2012-08-091-35/+122
| | | | | | | | | parallel processing later on - changed list(map()) to list comprehensions - removed try/except block around os.environ.get() for SCONS_EXTERNAL_TEST - fixed a potential deadlock for subprocess.Popen by using temporary files - added the '--nopipefiles' option to switch off this temp file fix (not recommended though)
* - fixed usage of subprocess module in runtest.pydirkbaechle2012-08-031-4/+19
| | | | - fixed tests in test/runtest (needed -j option for suppressing the count/percent messages)
* - basic merge with source from the external scons-test-frameworkdirkbaechle2012-08-031-14/+128
|
* runtest.py: added doc for useful env vars.Gary Oberbrunner2011-05-171-0/+5
|
* allow runtest.py -f file to have list of files with whitespace before or ↵William Deegan2011-03-071-0/+1
| | | | after filenames
* remove Python 1.5.2 compatibility code from runtest.pyAnatoly Techtonik2010-07-051-20/+3
|
* Windows portability fixes in various tests. Fix runtest.py detectionSteven Knight2010-06-061-1/+7
| | | | of non-zero exit status on systems that don't have os.WEXITSTATUS().
* Convert old-style classes in miscellaneous files to new-stylre classes:Steven Knight2010-05-211-2/+2
| | | | src/test_strings.py, runtest.py and doc/man/scons.1.
* http://scons.tigris.org/issues/show_bug.cgi?id=2345Greg Noel2010-04-241-2/+0
| | | | | | | Comb out all code that supported earlier versions of Python. Most such code is in snippets of only a few lines and can be identified by having a Python version string in it. Such snippets add up; this combing pass probably got rid of over 500 lines of code.
* http://scons.tigris.org/issues/show_bug.cgi?id=2345Greg Noel2010-04-211-0/+1
| | | | | | Pass the python executable from the -P option to runtest to TestCmd.py. Create the escaped executable name in TestCmd.py as well. Pass those two values into derived test modules. Fix cascade problems in test scripts due to incorrect assumptions about the name of the executable.
* http://scons.tigris.org/issues/show_bug.cgi?id=2345Greg Noel2010-04-201-0/+1
| | | | | | | One-line changes: Wrap pickle.dump with staticmethod(). Keep softspace in Unbuffered wrapper class for backward compatibility with 3.x. Use ModuleType as a factory function rather than a base class. Derive exception class from something derived from BaseException (required for 3.x).
* Index: test/Variables/help.pyGreg Noel2010-04-191-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | =================================================================== --- test/Variables/help.py (revision 4792) +++ test/Variables/help.py (working copy) @@ -28,23 +28,15 @@ Test the Variables help messages. """ -import os.path +import os -try: - True, False -except NameError: - exec('True = (0 == 0)') - exec('False = (0 != 0)') +import TestSCons str_True = str(True) str_False = str(False) -import TestSCons - test = TestSCons.TestSCons() - - workpath = test.workpath() qtpath = os.path.join(workpath, 'qt') libpath = os.path.join(qtpath, 'lib') Index: test/Variables/PackageVariable.py =================================================================== --- test/Variables/PackageVariable.py (revision 4792) +++ test/Variables/PackageVariable.py (working copy) @@ -28,14 +28,8 @@ Test the PackageVariable canned Variable type. """ -import os.path +import os -try: - True, False -except NameError: - exec('True = (0 == 0)') - exec('False = (0 != 0)') - import TestSCons test = TestSCons.TestSCons() Index: test/Variables/BoolVariable.py =================================================================== --- test/Variables/BoolVariable.py (revision 4792) +++ test/Variables/BoolVariable.py (working copy) @@ -28,14 +28,8 @@ Test the BoolVariable canned Variable type. """ -import os.path +import os -try: - True, False -except NameError: - exec('True = (0 == 0)') - exec('False = (0 != 0)') - import TestSCons test = TestSCons.TestSCons() Index: test/Deprecated/Options/help.py =================================================================== --- test/Deprecated/Options/help.py (revision 4792) +++ test/Deprecated/Options/help.py (working copy) @@ -28,24 +28,16 @@ Test the Options help messages. """ -import os.path +import os import re -try: - True, False -except NameError: - exec('True = (0 == 0)') - exec('False = (0 != 0)') +import TestSCons str_True = str(True) str_False = str(False) -import TestSCons - test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) - - workpath = test.workpath() qtpath = os.path.join(workpath, 'qt') libpath = os.path.join(qtpath, 'lib') Index: test/Deprecated/Options/PackageOption.py =================================================================== --- test/Deprecated/Options/PackageOption.py (revision 4792) +++ test/Deprecated/Options/PackageOption.py (working copy) @@ -28,14 +28,8 @@ Test the PackageOption canned Option type. """ -import os.path +import os -try: - True, False -except NameError: - exec('True = (0 == 0)') - exec('False = (0 != 0)') - import TestSCons test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) Index: test/Deprecated/Options/BoolOption.py =================================================================== --- test/Deprecated/Options/BoolOption.py (revision 4792) +++ test/Deprecated/Options/BoolOption.py (working copy) @@ -28,12 +28,6 @@ Test the BoolOption canned Option type. """ -try: - True, False -except NameError: - exec('True = (0 == 0)') - exec('False = (0 != 0)') - import TestSCons test = TestSCons.TestSCons(match = TestSCons.match_re_dotall) Index: src/script/scons-time.py =================================================================== --- src/script/scons-time.py (revision 4792) +++ src/script/scons-time.py (working copy) @@ -45,13 +45,6 @@ import time try: - True, False -except NameError: - # Pre-2.2 Python has no True or False keyword. - exec('True = not 0') - exec('False = not 1') - -try: sorted except NameError: # Pre-2.4 Python has no sorted() function. Index: src/engine/SCons/compat/_scons_builtins.py =================================================================== --- src/engine/SCons/compat/_scons_builtins.py (revision 4792) +++ src/engine/SCons/compat/_scons_builtins.py (working copy) @@ -37,13 +37,8 @@ all() any() - bool() - dict() sorted() memoryview() - True - False - zip() Implementations of functions are *NOT* guaranteed to be fully compliant with these functions in later versions of Python. We are only concerned @@ -62,22 +57,6 @@ import builtins try: - False -except NameError: - # Pre-2.2 Python has no False keyword. - exec('builtins.False = not 1') - # Assign to False in this module namespace so it shows up in pydoc output. - #False = False - -try: - True -except NameError: - # Pre-2.2 Python has no True keyword. - exec('builtins.True = not 0') - # Assign to True in this module namespace so it shows up in pydoc output. - #True = True - -try: all except NameError: # Pre-2.5 Python has no all() function. @@ -108,42 +87,6 @@ any = any try: - bool -except NameError: - # Pre-2.2 Python has no bool() function. - def bool(value): - """Demote a value to 0 or 1, depending on its truth value. - - This is not to be confused with types.BooleanType, which is - way too hard to duplicate in early Python versions to be - worth the trouble. - """ - return not not value - builtins.bool = bool - bool = bool - -try: - dict -except NameError: - # Pre-2.2 Python has no dict() keyword. - def dict(seq=[], **kwargs): - """ - New dictionary initialization. - """ - d = {} - for k, v in seq: - d[k] = v - d.update(kwargs) - return d - builtins.dict = dict - -try: - file -except NameError: - # Pre-2.2 Python has no file() function. - builtins.file = open - -try: memoryview except NameError: # Pre-2.7 doesn't have the memoryview() built-in. @@ -185,27 +128,6 @@ return result builtins.sorted = sorted -# -try: - zip -except NameError: - # Pre-2.2 Python has no zip() function. - def zip(*lists): - """ - Emulates the behavior we need from the built-in zip() function - added in Python 2.2. - - Returns a list of tuples, where each tuple contains the i-th - element rom each of the argument sequences. The returned - list is truncated in length to the length of the shortest - argument sequence. - """ - result = [] - for i in range(min(list(map(len, lists)))): - result.append(tuple([l[i] for l in lists])) - return result - builtins.zip = zip - #if sys.version_info[:3] in ((2, 2, 0), (2, 2, 1)): # def lstrip(s, c=string.whitespace): # while s and s[0] in c: Index: runtest.py =================================================================== --- runtest.py (revision 4792) +++ runtest.py (working copy) @@ -97,17 +97,6 @@ import time try: - x = True -except NameError: - True = not 0 - False = not 1 -else: - del x - -if not hasattr(os, 'WEXITSTATUS'): - os.WEXITSTATUS = lambda x: x - -try: sorted except NameError: # Pre-2.4 Python has no sorted() function. Index: QMTest/TestSCons.py =================================================================== --- QMTest/TestSCons.py (revision 4792) +++ QMTest/TestSCons.py (working copy) @@ -23,12 +23,6 @@ import sys import time -try: - True -except NameError: - exec('True = not 0') - exec('False = not 1') - from TestCommon import * from TestCommon import __all__
* Add a -3 option to print Python 3.x incompatibility warnings during tests.Steven Knight2010-04-191-2/+13
|
* Replace remaining os.path.walk() calls with os.walk().Steven Knight2010-04-181-32/+41
|
* http://scons.tigris.org/issues/show_bug.cgi?id=2329Greg Noel2010-03-271-5/+27
| | | | | | | | | | | | | | | Applied a number of idiomatic changes. Uses of the 'sort()' method were converted into calls of 'sorted()' when possible and the sorted() expression was inserted into a subsequent statement whenever that made sense. The statement 'while 1:' was changed to 'while True:'. Names from the 'types' module (e.g., 'types.FooType') were converted to the equivalent build-in type (e.g., 'foo'). Comparisons between types were changed to use 'isinstance()'.
* Move 2.0 changes collected in branches/pending back to trunk for furtherGreg Noel2010-03-251-39/+38
| | | | | development. Note that this set of changes is NOT backward-compatible; the trunk no longer works with Python 1.5.2, 2.0, or 2.1.
* Only escape the executable python string itself on the display line.Steven Knight2010-01-271-4/+5
|
* Fix the tests of runtest.py now that QMTest is no longer being usedSteven Knight2009-12-161-24/+40
| | | | | | | by default. Fix use of subprocess in Python 2.4+ and exit statuses of popen'ed scripts in earlier versions of Python. Support the ability to execute a directory's tests by naming the directory as a command- line argument.
* Disable QMTest by default, leave it available when --qmtest is used.Steven Knight2009-12-151-13/+14
|
* - Merged r4228 (Bugfix for runtest.py) from branches/installerLukas Erlinghagen2009-06-131-1/+1
|