summaryrefslogtreecommitdiffstats
path: root/QMTest
Commit message (Collapse)AuthorAgeFilesLines
* Use slice built-in instead of types.SliceTypeGreg Noel2010-05-011-2/+1
|
* Add test routine to exactly match a set of lines no matter the orderGreg Noel2010-05-011-0/+52
|
* http://scons.tigris.org/issues/show_bug.cgi?id=2345Greg Noel2010-04-262-18/+16
| | | | Apply all the remaining changes from the fixers.
* Convert to Python 3.x division rules.Greg Noel2010-04-243-4/+6
|
* http://scons.tigris.org/issues/show_bug.cgi?id=2345Greg Noel2010-04-245-54/+3
| | | | | | | 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=2317Greg Noel2010-04-231-2/+2
| | | | | | Apply the refactorings from the 'dict' fixer, less occurrences that were manually audited to be safe. Also pick up changes in bin/sfsum, a Python file that was not being scanned before.
* http://scons.tigris.org/issues/show_bug.cgi?id=2345Greg Noel2010-04-215-50/+29
| | | | | | 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-202-2/+2
| | | | | | | 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-6/+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__
* Replace remaining os.path.walk() calls with os.walk().Steven Knight2010-04-182-48/+34
|
* http://scons.tigris.org/issues/show_bug.cgi?id=2345Greg Noel2010-04-172-6/+4
| | | | | Fix the 'assignment to True or False' and the '__getitem__ not supported for exception classes' deprecation warnings.
* http://scons.tigris.org/issues/show_bug.cgi?id=2345Greg Noel2010-04-153-10/+8
| | | | | | | | | Fixes due to running the regression tests with the '-3' option to Python2.6, which causes the run-time to look for potential compatibility problems with Python 3.x. In some cases, all we can do is quiet the warning since we still support Python versions that can't use the newer idiom. In other cases, we fix the problem. This patch contains a mix of quieting and fixing, plus a little lint.
* http://scons.tigris.org/issues/show_bug.cgi?id=2345Greg Noel2010-04-153-19/+18
| | | | | | Apply the first part of the 'raise' fixer (the three-argument cases are not converted and will need to wait until native support of with_traceback() is available).
* http://scons.tigris.org/issues/show_bug.cgi?id=2345Greg Noel2010-03-291-2/+16
| | | | | | | | | | | | | The 'buffer' fixer simply replaces 'buffer( ... )' with 'memoryview( ... )', which is incorrect for our cases, so these changes had to be done by hand and a forward-compatibility class added. The 'xrange' fixer was applied. Manual changes were minimal: a few case in test strings and one use of 'range' as an identifer in the same scope as where 'xrange' was converted to 'range'. The "sets15" compat function, which provided backward compatibility for Python versions prior to 2.2, was removed as no longer needed.
* http://scons.tigris.org/issues/show_bug.cgi?id=2345Greg Noel2010-03-292-20/+0
| | | | | | | Accumulated small fixers: renames, next, zip, and intern. Files that were modified or added while developing on branches/pending didn't have the fixers previously applied. This patchset picks up those.
* http://scons.tigris.org/issues/show_bug.cgi?id=2329Greg Noel2010-03-275-23/+18
| | | | | | | | | | | | | | | 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-2510-199/+192
| | | | | 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.
* Merged r4724 (1.3.0 release changes) back into trunk.Gary Oberbrunner2010-03-241-1/+1
|
* Win32 portability in runtest.py tests after disabling QMTest by default.Steven Knight2010-01-261-0/+8
|
* Change the name of the 'help' statistic in the timings configurationsSteven Knight2010-01-191-6/+6
| | | | to 'startup'.
* Merge back from checkpoint.William Deegan2010-01-191-1/+1
| | | | Need to regenerate the .xml files.
* Minor code cleanup, including restoring saved SCONSFLAGS correctly.Steven Knight2010-01-141-2/+1
|
* Update Test{Cmd,Common}.py from upstream, with a newSteven Knight2010-01-123-13/+60
| | | | | | TestCommon.must_not_contain() method, new-style classes (inherit from object), and a fix for a Windows race by only opening up a pipe to stdin if we have something to write to it.
* Avoid GCC 4.4 warnings from the code generated by our dummy QTSteven Knight2009-12-311-2/+8
| | | | moc and uic utilities by using fputs() instead of printf().
* Speed up the time-scons.py "build" of SCons with compiled *.pyc files,Steven Knight2009-12-191-0/+2
| | | | | | | | | | | | | by just invoking setup.py directly instead of packing and unpacking the distributable .tar.gz file. Refactor to be able to capture historical statistics (of previous revisions) by preparing the "built" revision once and then running all of the requested timing scripts, with output going to a separate log file for each revision + script. Fix TestSCons.py so that it interprets the scons script name to be tested relative to the invoking directory, not always relative to src/script.
* Trace the system load average (Linux-only code) before starting theSteven Knight2009-12-181-0/+13
| | | | help / full / null builds in a timing run.
* Ignore the exit status from the --help run on timing builds, since someSteven Knight2009-12-171-0/+4
| | | | | early revisions have bugs and we can still go on and get useful stats from the full and null builds.
* Better fix for #2530: dont exit at all on unimplemented options, just print ↵Gary Oberbrunner2009-12-161-1/+0
| | | | a warning and keep going.
* Add a TestSCons.option_not_yet_implemented() method and use it soSteven Knight2009-12-151-0/+19
| | | | the tests of those options expect an exit status of 1.
* Provide an environment variable that can be used to overrideSteven Knight2009-12-101-1/+7
| | | | | | setting --warn=no-visual-c-missing when trying to run the new timing-script infrastructure against older versions of SCons that don't have that warning.
* Add separate memory graphs for the stats in the full and null runs.Steven Knight2009-12-101-36/+67
| | | | | Refactor stats-gathering so we collect them from the output in one step and can then trace them in multiple different ways.
* Record memory in kbytest, not bytes.Steven Knight2009-12-101-8/+17
|
* Add a script for calibrating settings for timing configurations.Steven Knight2009-12-101-7/+8
| | | | | Update the timings scripts with calibrated settings that run a full build between 9.5 and 10.0 seconds on the buildbot slave.
* Infrastructure to support calibration runs of TimeSCons tests, whichSteven Knight2009-12-101-7/+47
| | | | | only run a full build and report back the values of any variables affecting the configuration, and the elapsed time of the full build.
* Update the TimeSCons class for use of the sort= keyword instead ofSteven Knight2009-12-091-7/+23
| | | | | important=. Fix an old-version Python problem (use of True in keyword arg initialization).
* Have the TimeSCons class examine the run output for the reported memorySteven Knight2009-12-091-3/+45
| | | | | | use and timings, and translate these into TRACE: lines with keyword=value pairs that will be processed by the now more generic buildbot-side log processor to populate the timings graph data.
* Update the TimeSCons "elapsed time" message to match the log processor.Steven Knight2009-12-081-3/+3
|
* Fix test infrastructure querying for installed Visual Studio versions.Steven Knight2009-11-281-2/+2
|
* Fix tests to ignore missing MSVC warnings.Gary Oberbrunner2009-11-252-5/+25
|
* Rename the TimeSCons.run_build() method to just TimeSCons.run() soSteven Knight2009-11-241-6/+8
| | | | | | | the parent class TestSCons.up_to_date() method will use it to print the --debug=memory and --debug=times stats during up-to-date runs. Fix the TestSCons.up_to_date() regular expression so the memory and timing output won't cause the check to fail.
* Fix incorrectly inverted condition in test for non-TimeSCons entries.Steven Knight2009-11-241-3/+3
|
* Python 1.5 fixes in the TimeSCons class.Steven Knight2009-11-221-10/+30
|
* Capture initial infrastructure for working performance tests.Steven Knight2009-11-191-0/+124
|
* Fix test failure in Repository/Java.py on OS XGreg Noel2009-09-181-5/+12
|
* Minor fixes found while debuggingGreg Noel2009-09-181-3/+3
|
* Steven checked in some changes yesterday which fixed a great number ofWilliam Deegan2009-09-151-1/+14
| | | | | | | | | | | | | | failing tests by setting SCONSFLAGS='-warn=no-python-version' in def run() in TestSCons.py yesterday, where previously it was done in def __init__(...). This fixed most of the broken tests, but broke some of the working tests. I readded the logic to def __init__ In addition I've added an extra arg to the __init__ for TestSCons.py ignore_python_version (which defaults to true). For those tests which need to be able to see the deprecation and/or test the functionality of the deprecation.
* Have TestSCons.py add --warn=no-python-version every invocation, notSteven Knight2009-09-131-9/+20
| | | | just at TestSCons intialization.
* Fix test logic to handle warning messages on deprecated python version ↵William Deegan2009-09-111-2/+2
| | | | (changed from 2.2 to 2.4)
* Update the Test{Cmd,Common}.py 0.36, with better diff reportingSteven Knight2009-07-242-72/+105
| | | | | | | (specifically of output matches using regular expressions). Update tests for corresponding inteface changes. Add use of diff_re() to test/sconsign/script/Configure.py so we can get accurate information about its buildbot failure.
* In addition to changed merged below, commented out for platform os2 use of ↵William Deegan2009-07-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | msvc, mslib, mslink as they cause test/import.py to fail. I don't have an OS2 system to resolve the issues on. Merged revisions 4065,4067-4068,4071-4072,4074,4076,4085,4111,4163,4222 via svnmerge from http://scons.tigris.org/svn/scons/branches/vs_revamp ................ r4065 | stevenknight | 2009-03-02 16:48:05 -0800 (Mon, 02 Mar 2009) | 42 lines Copy over changes by hand from branches/core (I was working in a directory pointing to the wrong branch): ........ r4059 | stevenknight | 2009-03-02 06:54:13 -0800 (Mon, 02 Mar 2009) | 14 lines Initial prototypes of modules for architecture support (MSCommon/arch.py) and Visual C/C++ configuration distinct from (and in preference to) the Visual Studio configuration, incorporating configuration info and ideas from Jason Kenny's latest parts/tools/MSCommon work. This has a lot of cut-and-paste right now and does NOT actually work. In particular, there are no changes to the rest of the infrastructure to actually call any of this new stuff. I'm checking these in so I can sync on other systems for continued development. The ultimate goal is for much of the current MSCommon/vs.py module's logic to migrate to MSCommon/vc.py, since that's what we're actually interested in configuring. ........ r4058 | stevenknight | 2009-03-02 06:49:35 -0800 (Mon, 02 Mar 2009) | 2 lines Fix doc string. ........ r4056 | stevenknight | 2009-03-01 06:10:31 -0800 (Sun, 01 Mar 2009) | 4 lines Change the sanity_check file for 6.1 per Jason's update. Add an optional version string argument to detect_sdk(). Import directly from common, not SCons.Tool.MSCommon.common. ........ r4055 | stevenknight | 2009-02-28 05:29:03 -0800 (Sat, 28 Feb 2009) | 5 lines Minor common.py enhancements: Refactor is_win64() to cache its return value so we don't have to hit registry every time we want to know if the OS is 64-bit. Accept SCONS_MSCOMMON_DEBUG=- to mean print debug messages to stdout. ........ ................ r4067 | stevenknight | 2009-03-06 04:59:21 -0800 (Fri, 06 Mar 2009) | 4 lines Fix entries in batch_file_map, after a double-check with the original code. Use a host_architecture of None in the map to indicate the "default" entry if there isn't a specific .bat file for our current architecture. ................ r4068 | stevenknight | 2009-03-06 05:15:39 -0800 (Fri, 06 Mar 2009) | 2 lines Add include_subdir and lib_subdir data to the SDK definitions. ................ r4071 | stevenknight | 2009-03-10 07:42:53 -0700 (Tue, 10 Mar 2009) | 4 lines Capture basically working snapshot. src/engine/SCons/Tool/msvsTests.py and test/IDL/midl.py still fail, and code needs clean up. ................ r4072 | stevenknight | 2009-03-11 06:38:37 -0700 (Wed, 11 Mar 2009) | 2 lines Fix path to Common7\Tools. Find vs*.bat files. ................ r4074 | stevenknight | 2009-03-13 17:11:55 -0700 (Fri, 13 Mar 2009) | 3 lines Import SCons.Tool.MSCommon.vc so it works regardless of other sys.path manipulation. ................ r4076 | stevenknight | 2009-03-19 08:08:48 -0700 (Thu, 19 Mar 2009) | 7 lines Refactor SDK support: * New mssdk_exists() and mssdk_setup_env() methods as the primary public entry points. * Call internal sdk.*() utility functions that just return information (like the SDK structure) not handle the actual setting. * Give the VisualStudio definitions explicit settings for the SDK version. ................ r4085 | bdbaddog | 2009-04-05 14:30:46 -0700 (Sun, 05 Apr 2009) | 3 lines Fix "can't find module vc" issue when building on windows. ................ r4111 | stevenknight | 2009-04-19 07:47:47 -0700 (Sun, 19 Apr 2009) | 2 lines Doc updates for how MSVS_VERSION is used. ................ r4163 | bdbaddog | 2009-04-29 17:32:43 -0700 (Wed, 29 Apr 2009) | 4 lines Fix for bug 2405 Also refactored some logic from Defaults._defines() into Defaults.processDefines() which is then used by msvs.py ................ r4222 | bdbaddog | 2009-05-31 17:01:22 -0700 (Sun, 31 May 2009) | 8 lines Added definition of HOST_OS|ARCH TARGET_OS|ARCH (For win32 only right now) Migrated some logic to determine arch from Tools/MSCommon -> Platform/Win32.py Fixed lots of minor issues with string values for directories, architectures, and registry keys Switch to find VS installs by registry (was using VC install location previously) Added but commented out that HOST_{OS|ARCH} and TARGET_{OS|ARCH} will become reserved var names in Environment() Need to resolve issues that SCons is issuing messages when SCons itself sets these variables. ................