diff options
author | Mats Wichmann <mats@linux.com> | 2021-10-31 18:34:13 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2021-10-31 18:53:59 (GMT) |
commit | c8a32bbade10418eb613ac5c4be90ea6494d6aa8 (patch) | |
tree | a5a862424e8c34ec330a3f1b6bb7c326d553f0a9 /test/Repository | |
parent | 40ede9995361abb3169891486754f51bfaabdf9b (diff) | |
download | SCons-c8a32bbade10418eb613ac5c4be90ea6494d6aa8.zip SCons-c8a32bbade10418eb613ac5c4be90ea6494d6aa8.tar.gz SCons-c8a32bbade10418eb613ac5c4be90ea6494d6aa8.tar.bz2 |
Skip unusable javah tests
For the three tests which fail, skip if the command finder (WhereIs), which
is much less aggressive than the java_where_j* routines, doesn't find javah.
Split the JAVAH test file into two files, so that the part which
doesn't call javah can run even if the rest is skipped.
Did the header cleanup and partial reformats on those.
Leave a comment in the Repository/JavaH test, and do some reformatting
there as well. Test needs rework, but for now doesn't fail so leave alone.
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test/Repository')
-rw-r--r-- | test/Repository/JavaH.py | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/test/Repository/JavaH.py b/test/Repository/JavaH.py index 1cb5078..77f097d 100644 --- a/test/Repository/JavaH.py +++ b/test/Repository/JavaH.py @@ -1,6 +1,8 @@ #!/usr/bin/env python # -# __COPYRIGHT__ +# MIT License +# +# Copyright The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -20,9 +22,6 @@ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# - -__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" """ Test building Java applications when using Repositories. @@ -44,13 +43,23 @@ java = where_java javac = where_javac javah = where_javah +# TODO: javah no longer exists for Java > 9. Other tests fail +# on certain systems because the java_where_* routines are very greedy +# and may indicate it's found even if the working java is > 9 if there +# was a 1.8 insallation present - and then at runtime it's not found. +# In this case we actually pass the javac/javah that's found by those, +# which means the test will seem to work. We still need to rework this. + ############################################################################### # -test.subdir('rep1', ['rep1', 'src'], - 'work1', - 'work2', - 'work3') +test.subdir( + 'rep1', + ['rep1', 'src'], + 'work1', + 'work2', + 'work3' +) # rep1_classes = test.workpath('rep1', 'classes') @@ -62,11 +71,9 @@ opts = '-Y ' + test.workpath('rep1') # test.write(['rep1', 'SConstruct'], """ -env = Environment(tools = ['javac', 'javah'], - JAVAC = r'"%s"', - JAVAH = r'"%s"') -classes = env.Java(target = 'classes', source = 'src') -env.JavaH(target = 'outdir', source = classes) +env = Environment(tools=['javac', 'javah'], JAVAC=r'"%s"', JAVAH=r'"%s"') +classes = env.Java(target='classes', source='src') +env.JavaH(target='outdir', source=classes) """ % (javac, javah)) test.write(['rep1', 'src', 'Foo1.java'], """\ @@ -206,11 +213,9 @@ test.up_to_date(chdir = 'work2', options = opts, arguments = ".") # test.write(['work3', 'SConstruct'], """ -env = Environment(tools = ['javac', 'javah'], - JAVAC = r'"%s"', - JAVAH = r'"%s"') -classes = env.Java(target = 'classes', source = 'src') -hfiles = env.JavaH(target = 'outdir', source = classes) +env = Environment(tools=['javac', 'javah'], JAVAC=r'"%s"', JAVAH=r'"%s"') +classes = env.Java(target='classes', source='src') +hfiles = env.JavaH(target='outdir', source=classes) Local(hfiles) """ % (javac, javah)) |