summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* http://scons.tigris.org/issues/show_bug.cgi?id=2317Greg Noel2010-04-234-5/+5
| | | | | | 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-213-7/+8
| | | | | | 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.
* Rewrite uses of reduce(), which is being deprecated for Python 3.x.Steven Knight2010-04-201-1/+3
|
* Remove use of the "new" module from --debug=memoizer support.Steven Knight2010-04-191-44/+6
|
* Index: test/Variables/help.pyGreg Noel2010-04-196-47/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | =================================================================== --- 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-184-41/+15
|
* http://scons.tigris.org/issues/show_bug.cgi?id=2345Greg Noel2010-04-177-19/+12
| | | | | 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-162-3/+2
| | | | | Quiet the rest of the 'callable' warnings and fix the rest of the 'cmp argument' warnings.
* http://scons.tigris.org/issues/show_bug.cgi?id=2345Greg Noel2010-04-152-3/+3
| | | | | | | | | 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-157-19/+19
| | | | | | 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).
* Eliminate / replace remaining cPickle references in test scripts.Steven Knight2010-04-142-4/+3
|
* Issue 2334: Use compatibility versions of collections.User{Dict,List,String}Steven Knight2010-04-072-3/+9
| | | | | instead of the deprecated User{Dict,List,String} modules. The two test scripts that use User{List,String} fall back on ImportError by hand.
* Fix test for non-win32 platformsWilliam Deegan2010-04-061-5/+4
|
* Fix vc9.0 express issue, misspelling, and add testcase which would have ↵William Deegan2010-04-061-0/+58
| | | | exposed the issue.
* http://scons.tigris.org/issues/show_bug.cgi?id=2345Greg Noel2010-03-2922-24/+24
| | | | | | | | | | | | | 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-291-5/+7
| | | | | | | 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-2723-65/+35
| | | | | | | | | | | | | | | 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-25325-982/+630
| | | | | 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.
* Split the "live rpcgen" sub-test into its own test script.Steven Knight2010-02-212-71/+114
|
* Fix the test on all Python versions (failed on versions before 2.5 dueSteven Knight2010-02-181-3/+2
| | | | to some regex problem).
* Generate an error message if a BUILDERS entry is set to something that isn'tSteven Knight2010-02-171-0/+62
| | | | a Builder object, or known to generate a Builder object, or a callable.
* Move two Builder-related tests into the test/Builder/ subdirectory.Steven Knight2010-02-162-0/+0
|
* Merged revisions 4645,4647-4651,4654-4656 via svnmerge fromSteven Knight2010-02-052-67/+91
| | | | | | | | | | | | | | | | | | | | | | | | http://scons.tigris.org/svn/scons/branches/pending ........ r4648 | managan | 2010-01-22 09:40:52 -0800 (Fri, 22 Jan 2010) | 9 lines Added dismbiguate calls on a targets side effects in the make_ready_all and make_ready_current routines of Taskmaster.py. This fixes Stefan Hepp's problem with latex. Directories to hold the side effect files were not created when using variantDir with duplicate=0 Modifying subdir_variantdir_include2.py to run scons with an explicit target to reveal this problem. ........ r4654 | stevenknight | 2010-01-27 07:41:01 -0800 (Wed, 27 Jan 2010) | 5 lines Issue 2534: fix Scanners' default ability to return Dir nodes by making the default node_class the real SCons.Node.FS.Base class, not SCons.Node.FS.Entry (which is now, and has been for some time, a subclass). ........
* Win32 portability in runtest.py tests after disabling QMTest by default.Steven Knight2010-01-2616-110/+83
|
* Back out post-2.0 code changes from trunk: r4643, r4642 r4640, r4637.Steven Knight2010-01-212-78/+66
| | | | | This change should itself be backed out before merge "pending" back into trunk.
* Update tex builder to handle the case where a \input{foo}Robert Managan2010-01-201-0/+76
| | | | | | command tries to work with a directory named foo instead of the file foo.tex. The builder now ignores a directory and continues searching to find the correct file.
* Remove unneeded fluff from this test.Robert Managan2010-01-191-66/+2
| | | | Add commented line that will reveal a failure.
* Fix for 2422William Deegan2010-01-111-2/+1
|
* Issue 2505: fix use of pre-compiled headers when the source .cppSteven Knight2010-01-061-0/+107
| | | | file is listed in both the env.PCH() and env.Program() calls.
* Fix some tests so they can still run on Windows system withoutSteven Knight2010-01-063-54/+58
| | | | .py file associations.
* Change scanner to properly search for included file from theRobert Managan2010-01-042-0/+347
| | | | | | | | directory of the main file instead of the file it is included from. Also update the emitter to add the .aux file associated with \include{filename} commands. This makes sure the required directories if any are created for variantdir cases. Half of the patch from Stefan Hepp.
* Fix time-sensitivity (< 0.002 second execution) in output format.Steven Knight2010-01-021-6/+6
|
* Remove unnecessary imports to avoid javac warnings.Steven Knight2010-01-011-13/+5
| | | | Add a necessary serialVersionUID.
* Define "static final long serialVersionUID" in java classes inSteven Knight2010-01-012-0/+16
| | | | RMIC tests to silence warnings from gcj-4.4.
* Avoid GCC 4.4 warnings from the code generated by our dummy QTSteven Knight2009-12-311-77/+1
| | | | moc and uic utilities by using fputs() instead of printf().
* Add scanning of files included in Latex by means of \lstinputlisting{}Robert Managan2009-12-171-0/+131
| | | | Patch from Stefan Hepp.
* Add a separate test of the runtest.py --qmtest option.Steven Knight2009-12-171-0/+105
|
* Fix the tests of runtest.py now that QMTest is no longer being usedSteven Knight2009-12-1615-402/+218
| | | | | | | 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.
* Add a TestSCons.option_not_yet_implemented() method and use it soSteven Knight2009-12-1512-54/+21
| | | | the tests of those options expect an exit status of 1.
* Integrate patch from issue #2436: fix regression from r3691 which stopped ↵Gary Oberbrunner2009-12-051-8/+12
| | | | printing "Entering Directory" with -C/-u.
* Explicitly initialize the environment tools=['mssdk', 'msvc', 'mslink']Steven Knight2009-11-302-2/+6
| | | | | to get the path to the SDK include directory (so our test program can #include <windows.h>).
* Add missing "import string" to test that uses string.replace().Steven Knight2009-11-291-0/+2
|
* Don't hard-code the swig location in the expected output.Steven Knight2009-11-281-11/+7
| | | | Use test.wrap_stdout() instead of hard-coding the SCons messages.
* Add a test for the case where a latex file uses \input{} to include theRobert Managan2009-11-251-0/+96
| | | | | | | | | | file that contains the documentclass command Add logic to is_LaTeX routine to search through included files until \documentclass is found Also added comments, converted comments at start of 2 routines into doc strings..
* Fix bug 1944 - handle non-existant .i files when swig emitter is called. ↵William Deegan2009-11-141-0/+102
| | | | Make an educated guess on the generated module name based on the .i file name.
* Fix test failure in Repository/Java.py on OS XGreg Noel2009-09-181-9/+4
|
* Add test case for configure failure.David Cournapeau2009-09-171-0/+49
| | | | | TryRun fails to find the executable when VariantDir is set up from SConscript/SConstruct.
* Fix tex code to handle broken nomenclature package. (Fixes test failure on ↵William Deegan2009-09-161-8/+16
| | | | | | centos5 slave). Code by Rob Managan.
* Steven checked in some changes yesterday which fixed a great number ofWilliam Deegan2009-09-152-7/+2
| | | | | | | | | | | | | | 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.
* Revert r4356, the problem is in TestSCons.py, not the test script itself.Steven Knight2009-09-131-3/+3
|