diff options
author | Russel Winder <russel@winder.org.uk> | 2016-01-19 17:30:41 (GMT) |
---|---|---|
committer | Russel Winder <russel@winder.org.uk> | 2016-01-19 17:30:41 (GMT) |
commit | 358c0de48a7d9fecdb30e24505c066506dfcdeff (patch) | |
tree | e3da370799409e61468868397770eeba5a5fe4bf | |
parent | 374acc32ce7ebecbc23dae5859315ddee17e523b (diff) | |
parent | 6cc2ad09d86e6da5812485b0e50a820e2560b31b (diff) | |
download | SCons-358c0de48a7d9fecdb30e24505c066506dfcdeff.zip SCons-358c0de48a7d9fecdb30e24505c066506dfcdeff.tar.gz SCons-358c0de48a7d9fecdb30e24505c066506dfcdeff.tar.bz2 |
Merge in default.
-rw-r--r-- | QMTest/TestSCons.py | 7 | ||||
-rw-r--r-- | test/D/Issues/2994/D_changed_DFLAGS_not_rebuilding.py (renamed from test/D/Issues/2944/D_changed_DFLAGS_not_rebuilding.py) | 0 | ||||
-rw-r--r-- | test/D/Issues/2994/image/SConstruct (renamed from test/D/Issues/2944/image/SConstruct) | 8 | ||||
-rw-r--r-- | test/D/Issues/2994/image/main.d (renamed from test/D/Issues/2944/image/main.d) | 0 | ||||
-rw-r--r-- | test/DVIPDF/makeindex.py | 11 | ||||
-rw-r--r-- | test/DVIPS/DVIPS.py | 3 | ||||
-rw-r--r-- | test/DVIPS/DVIPSFLAGS.py | 3 | ||||
-rw-r--r-- | test/Java/JAVAH.py | 7 | ||||
-rw-r--r-- | test/Java/multi-step.py | 7 | ||||
-rw-r--r-- | test/Java/nested-classes.py | 7 | ||||
-rw-r--r-- | test/TEX/TEX.py | 3 | ||||
-rw-r--r-- | test/TEX/bibliography.py | 12 | ||||
-rw-r--r-- | test/TEX/multi-run.py | 2 | ||||
-rw-r--r-- | test/YACC/live.py | 11 |
14 files changed, 66 insertions, 15 deletions
diff --git a/QMTest/TestSCons.py b/QMTest/TestSCons.py index 3857da5..6820ae1 100644 --- a/QMTest/TestSCons.py +++ b/QMTest/TestSCons.py @@ -201,6 +201,7 @@ class TestSCons(TestCommon): """ scons_version = SConsVersion + javac_is_gcj = False def __init__(self, **kw): """Initialize an SCons testing object. @@ -768,8 +769,13 @@ class TestSCons(TestCommon): m = re.search(r'javac (\d\.\d)', self.stderr()) if m: version = m.group(1) + self.javac_is_gcj = False + elif self.stderr().find('gcj'): + version='1.2' + self.javac_is_gcj = True else: version = None + self.javac_is_gcj = False return where_javac, version def java_where_javah(self, version=None): @@ -792,6 +798,7 @@ class TestSCons(TestCommon): self.skip_test("Could not find Java rmic, skipping non-simulated test(s).\n") return where_rmic + def java_get_class_files(self, dir): result = [] for dirpath, dirnames, filenames in os.walk(dir): diff --git a/test/D/Issues/2944/D_changed_DFLAGS_not_rebuilding.py b/test/D/Issues/2994/D_changed_DFLAGS_not_rebuilding.py index 1d9854f..1d9854f 100644 --- a/test/D/Issues/2944/D_changed_DFLAGS_not_rebuilding.py +++ b/test/D/Issues/2994/D_changed_DFLAGS_not_rebuilding.py diff --git a/test/D/Issues/2944/image/SConstruct b/test/D/Issues/2994/image/SConstruct index 2c7deee..3d059e7 100644 --- a/test/D/Issues/2944/image/SConstruct +++ b/test/D/Issues/2994/image/SConstruct @@ -1,11 +1,9 @@ -# -*- codig:utf-8; -*- +# -*- coding:utf-8; -*- env=Environment() change = ARGUMENTS.get('change', 0) if int(change): - env.Append(DFLAGS = '-d') - -env.Program('proj', ['main.d']) - + env.Append(DFLAGS = '-I.') +env.Program('proj', ['main.d']) diff --git a/test/D/Issues/2944/image/main.d b/test/D/Issues/2994/image/main.d index f0aa23a..f0aa23a 100644 --- a/test/D/Issues/2944/image/main.d +++ b/test/D/Issues/2994/image/main.d diff --git a/test/DVIPDF/makeindex.py b/test/DVIPDF/makeindex.py index 00c57c4..b4ac2d0 100644 --- a/test/DVIPDF/makeindex.py +++ b/test/DVIPDF/makeindex.py @@ -31,10 +31,17 @@ test = TestSCons.TestSCons() dvipdf = test.where_is('dvipdf') +if not dvipdf: + test.skip_test('Could not find dvipdf; skipping test(s).\n') + tex = test.where_is('tex') +if not tex: + test.skip_test('Could not find tex; skipping test(s).\n') + +latex = test.where_is('latex') +if not latex: + test.skip_test('Could not find latex; skipping test(s).\n') -if not dvipdf or not tex: - test.skip_test('Could not find dvipdf or tex; skipping test(s).\n') diff --git a/test/DVIPS/DVIPS.py b/test/DVIPS/DVIPS.py index e28a121..b243bfc 100644 --- a/test/DVIPS/DVIPS.py +++ b/test/DVIPS/DVIPS.py @@ -114,6 +114,9 @@ test.must_match('test3.ps', "This is a .ltx test.\n") test.must_match('test4.ps', "This is a .latex test.\n") +have_latex = test.where_is('latex') +if not have_latex: + test.skip_test('Could not find latex; skipping test(s).\n') dvips = test.where_is('dvips') diff --git a/test/DVIPS/DVIPSFLAGS.py b/test/DVIPS/DVIPSFLAGS.py index 285c729..4ab1b53 100644 --- a/test/DVIPS/DVIPSFLAGS.py +++ b/test/DVIPS/DVIPSFLAGS.py @@ -120,6 +120,9 @@ test.must_match('test3.ps', " -x\nThis is a .ltx test.\n") test.must_match('test4.ps', " -x\nThis is a .latex test.\n") +have_latex = test.where_is('latex') +if not have_latex: + test.skip_test('Could not find latex; skipping test(s).\n') dvips = test.where_is('dvips') diff --git a/test/Java/JAVAH.py b/test/Java/JAVAH.py index f7c9dcc..81582d7 100644 --- a/test/Java/JAVAH.py +++ b/test/Java/JAVAH.py @@ -93,14 +93,17 @@ line 3 test.must_match('test2.h', "test2.JAVA\nline 3\n") - where_javac, java_version = test.java_where_javac() where_javah = test.java_where_javah() if java_version: java_version = repr(java_version) - +# Skip this test as SCons doesn't (currently) predict the generated +# inner/anonymous class generated .class files generated by gcj +# and so will always fail +if test.javac_is_gcj: + test.skip_test('Test not valid for gcj (gnu java); skipping test(s).\n') test.write("wrapper.py", """\ import os diff --git a/test/Java/multi-step.py b/test/Java/multi-step.py index 44ebd31..b43d641 100644 --- a/test/Java/multi-step.py +++ b/test/Java/multi-step.py @@ -44,6 +44,13 @@ swig = test.where_is('swig') if not swig: test.skip_test('Can not find installed "swig", skipping test.\n') +# Skip this test as SCons doesn't (currently) predict the generated +# inner/anonymous class generated .class files generated by gcj +# and so will always fail +if test.javac_is_gcj: + test.skip_test('Test not valid for gcj (gnu java); skipping test(s).\n') + + test.subdir(['src'], diff --git a/test/Java/nested-classes.py b/test/Java/nested-classes.py index 2b1b5db..a764054 100644 --- a/test/Java/nested-classes.py +++ b/test/Java/nested-classes.py @@ -40,6 +40,13 @@ where_javac, java_version = test.java_where_javac() # Work around javac 1.4 not reporting its version: java_version = java_version or "1.4" +# Skip this test as SCons doesn't (currently) predict the generated +# inner/anonymous class generated .class files generated by gcj +# and so will always fail +if test.javac_is_gcj: + test.skip_test('Test not valid for gcj (gnu java); skipping test(s).\n') + + test.write('SConstruct', """ env = Environment() env['JAVAVERSION'] = '%(java_version)s' diff --git a/test/TEX/TEX.py b/test/TEX/TEX.py index b749690..e1d634f 100644 --- a/test/TEX/TEX.py +++ b/test/TEX/TEX.py @@ -36,6 +36,9 @@ _python_ = TestSCons._python_ test = TestSCons.TestSCons() +have_latex = test.where_is('latex') +if not have_latex: + test.skip_test('Could not find latex; skipping test(s).\n') test.write('mytex.py', r""" diff --git a/test/TEX/bibliography.py b/test/TEX/bibliography.py index c26b010..9e79320 100644 --- a/test/TEX/bibliography.py +++ b/test/TEX/bibliography.py @@ -36,11 +36,19 @@ import TestSCons test = TestSCons.TestSCons() dvips = test.where_is('dvips') + +if not dvips: + test.skip_test("Could not find dvips; skipping test(s).\n") + bibtex = test.where_is('bibtex') +if not bibtex: + test.skip_test("Could not find bibtex; skipping test(s).\n") -if not dvips or not bibtex: - test.skip_test("Could not find dvips or bibtex; skipping test(s).\n") +have_latex = test.where_is('latex') +if not have_latex: + test.skip_test('Could not find latex; skipping test(s).\n') + test.write('SConstruct', """\ import os env = Environment(tools = ['tex', 'latex', 'dvips']) diff --git a/test/TEX/multi-run.py b/test/TEX/multi-run.py index 7e94be3..37a839b 100644 --- a/test/TEX/multi-run.py +++ b/test/TEX/multi-run.py @@ -39,6 +39,8 @@ test = TestSCons.TestSCons() tex = test.where_is('tex') latex = test.where_is('latex') +if not latex: + test.skip_test("Could not find latex; skipping test(s).\n") if not tex and not latex: test.skip_test("Could not find tex or latex; skipping test(s).\n") diff --git a/test/YACC/live.py b/test/YACC/live.py index d567ec3..f6733da 100644 --- a/test/YACC/live.py +++ b/test/YACC/live.py @@ -61,20 +61,23 @@ foo.CFile(target = 'not_foo', source = 'foo.y') yacc = r""" %%{ #include <stdio.h> +extern int yyparse(); +int yyerror(char *s); +int yylex(); -main() +int main() { - yyparse(); + return yyparse(); } -yyerror(s) +int yyerror(s) char *s; { fprintf(stderr, "%%s\n", s); return 0; } -yylex() +int yylex() { int c; |