diff options
author | Mats Wichmann <mats@linux.com> | 2021-10-31 18:01:25 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2021-10-31 18:01:25 (GMT) |
commit | 40ede9995361abb3169891486754f51bfaabdf9b (patch) | |
tree | 4e1fd412b5050600fd4d541443e85dd40b8f2ced | |
parent | 5ff93bebb7b3d0a13325661859ae29690d121d21 (diff) | |
download | SCons-40ede9995361abb3169891486754f51bfaabdf9b.zip SCons-40ede9995361abb3169891486754f51bfaabdf9b.tar.gz SCons-40ede9995361abb3169891486754f51bfaabdf9b.tar.bz2 |
Java tests: minor cleanups
Update file headers
Remove references to javah that are not used
Black a couple of SConstcuts
No functional changes - prep work for javah workarounds.
Signed-off-by: Mats Wichmann <mats@linux.com>
30 files changed, 119 insertions, 156 deletions
diff --git a/test/Java/DerivedSourceTest.py b/test/Java/DerivedSourceTest.py index 7f80595..e54b8c8 100644 --- a/test/Java/DerivedSourceTest.py +++ b/test/Java/DerivedSourceTest.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 of javac.py when building java code from derived sources. diff --git a/test/Java/JAR.py b/test/Java/JAR.py index 2cd6012..bc52a89 100644 --- a/test/Java/JAR.py +++ b/test/Java/JAR.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__" import os import TestSCons diff --git a/test/Java/JARCHDIR.py b/test/Java/JARCHDIR.py index 24a8597..49e7344 100644 --- a/test/Java/JARCHDIR.py +++ b/test/Java/JARCHDIR.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 that when JARCHDIR that our command to create .jar files diff --git a/test/Java/JARCOM.py b/test/Java/JARCOM.py index 9146445..ce5dc77 100644 --- a/test/Java/JARCOM.py +++ b/test/Java/JARCOM.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 the ability to configure the $JARCOM construction variable. diff --git a/test/Java/JARCOMSTR.py b/test/Java/JARCOMSTR.py index 4bdc45b..b4a2efc 100644 --- a/test/Java/JARCOMSTR.py +++ b/test/Java/JARCOMSTR.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 that the $JARCOMSTR construction variable allows you to configure diff --git a/test/Java/JARFLAGS.py b/test/Java/JARFLAGS.py index fc6e55e..7c16491 100644 --- a/test/Java/JARFLAGS.py +++ b/test/Java/JARFLAGS.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,10 +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__" - import TestSCons diff --git a/test/Java/JAVABOOTCLASSPATH.py b/test/Java/JAVABOOTCLASSPATH.py index 8aaf869..69d9471 100644 --- a/test/Java/JAVABOOTCLASSPATH.py +++ b/test/Java/JAVABOOTCLASSPATH.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__" """ Verify that use of $JAVABOOTCLASSPATH sets the -bootclasspath option @@ -33,19 +32,15 @@ import os import TestSCons -_python_ = TestSCons._python_ - test = TestSCons.TestSCons() where_javac, java_version = test.java_where_javac() -where_javah = test.java_where_javah() test.write('SConstruct', """ -env = Environment(tools = ['javac', 'javah'], - JAVABOOTCLASSPATH = ['dir1', 'dir2']) -j1 = env.Java(target = 'class', source = 'com/Example1.java') -j2 = env.Java(target = 'class', source = 'com/Example2.java') -""" % locals()) +env = Environment(tools=['javac'], JAVABOOTCLASSPATH=['dir1', 'dir2']) +j1 = env.Java(target='class', source='com/Example1.java') +j2 = env.Java(target='class', source='com/Example2.java') +""") test.subdir('com') diff --git a/test/Java/JAVAC.py b/test/Java/JAVAC.py index aaaa8f5..20f7f96 100644 --- a/test/Java/JAVAC.py +++ b/test/Java/JAVAC.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 setting the JAVAC variable. diff --git a/test/Java/JAVACCOM.py b/test/Java/JAVACCOM.py index 0de173d..3bb4dfb 100644 --- a/test/Java/JAVACCOM.py +++ b/test/Java/JAVACCOM.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 the ability to configure the $JAVACCOM construction variable. diff --git a/test/Java/JAVACCOMSTR.py b/test/Java/JAVACCOMSTR.py index 8540e13..4e25815 100644 --- a/test/Java/JAVACCOMSTR.py +++ b/test/Java/JAVACCOMSTR.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 that the $JAVACCOMSTR construction variable allows you to configure diff --git a/test/Java/JAVACFLAGS.py b/test/Java/JAVACFLAGS.py index 28c58c1..a40610d 100644 --- a/test/Java/JAVACFLAGS.py +++ b/test/Java/JAVACFLAGS.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__" import os diff --git a/test/Java/JAVACLASSPATH.py b/test/Java/JAVACLASSPATH.py index fb2b33f..aefacca 100644 --- a/test/Java/JAVACLASSPATH.py +++ b/test/Java/JAVACLASSPATH.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__" """ Verify that use of $JAVASOURCEPATH allows finding Java .class diff --git a/test/Java/JAVAH.py b/test/Java/JAVAH.py index c7ac334..853b2da 100644 --- a/test/Java/JAVAH.py +++ b/test/Java/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__" import os diff --git a/test/Java/JAVAHCOM.py b/test/Java/JAVAHCOM.py index 801707e..00df2ae 100644 --- a/test/Java/JAVAHCOM.py +++ b/test/Java/JAVAHCOM.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 the ability to configure the $JAVAHCOM construction variable. @@ -37,11 +36,13 @@ test = TestSCons.TestSCons() test.file_fixture('mycompile.py') test.write('SConstruct', """ -env = Environment(TOOLS = ['default', 'javah'], - JAVAHCOM = r'%(_python_)s mycompile.py javah $TARGET $SOURCES') -env.JavaH(target = 'out', source = 'file1.class') -env.JavaH(target = 'out', source = 'file2.class') -env.JavaH(target = 'out', source = 'file3.class') +env = Environment( + TOOLS=['default', 'javah'], + JAVAHCOM=r'%(_python_)s mycompile.py javah $TARGET $SOURCES', +) +env.JavaH(target='out', source='file1.class') +env.JavaH(target='out', source='file2.class') +env.JavaH(target='out', source='file3.class') """ % locals()) test.write('file1.class', "file1.class\n/*javah*/\n") diff --git a/test/Java/JAVAHCOMSTR.py b/test/Java/JAVAHCOMSTR.py index c205890..3936947 100644 --- a/test/Java/JAVAHCOMSTR.py +++ b/test/Java/JAVAHCOMSTR.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 that the $JAVAHCOMSTR construction variable allows you to configure @@ -46,12 +45,14 @@ out_file3_h = os.path.join('out', 'file3.h') test.file_fixture('mycompile.py') test.write('SConstruct', """ -env = Environment(TOOLS = ['default', 'javah'], - JAVAHCOM = r'%(_python_)s mycompile.py javah $TARGET $SOURCES', - JAVAHCOMSTR = 'Building javah $TARGET from $SOURCES') -env.JavaH(target = 'out', source = 'file1.class') -env.JavaH(target = 'out', source = 'file2.class') -env.JavaH(target = 'out', source = 'file3.class') +env = Environment( + TOOLS=['default', 'javah'], + JAVAHCOM=r'%(_python_)s mycompile.py javah $TARGET $SOURCES', + JAVAHCOMSTR='Building javah $TARGET from $SOURCES', +) +env.JavaH(target='out', source='file1.class') +env.JavaH(target='out', source='file2.class') +env.JavaH(target='out', source='file3.class') """ % locals()) test.write('file1.class', "file1.class\n/*javah*/\n") diff --git a/test/Java/JAVASOURCEPATH.py b/test/Java/JAVASOURCEPATH.py index 8e7b762..19a474d 100644 --- a/test/Java/JAVASOURCEPATH.py +++ b/test/Java/JAVASOURCEPATH.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__" """ Verify that use of $JAVASOURCEPATH allows finding source .java @@ -32,18 +31,16 @@ to the javac command line. import TestSCons -_python_ = TestSCons._python_ - test = TestSCons.TestSCons() where_javac, java_version = test.java_where_javac() test.write('SConstruct', """ -env = Environment(tools = ['javac', 'javah']) -bar = env.Java(target = 'bar/classes', - source = 'bar/src/TestBar.java', - JAVASOURCEPATH = ['foo/src']) -""" % locals()) +env = Environment(tools=['javac']) +bar = env.Java( + target='bar/classes', source='bar/src/TestBar.java', JAVASOURCEPATH=['foo/src'] +) +""") test.subdir('foo', ['foo', 'src'], diff --git a/test/Java/Java-1.4.py b/test/Java/Java-1.4.py index 8bbefaf..96e6368 100644 --- a/test/Java/Java-1.4.py +++ b/test/Java/Java-1.4.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 @@ -21,8 +23,6 @@ # 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 Java compilation with a live Java 1.4 "javac" compiler. """ diff --git a/test/Java/Java-1.5.py b/test/Java/Java-1.5.py index 58513e2..5e6cbd7 100644 --- a/test/Java/Java-1.5.py +++ b/test/Java/Java-1.5.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 @@ -21,8 +23,6 @@ # 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 Java compilation with a live Java 1.5 "javac" compiler. """ diff --git a/test/Java/Java-1.6.py b/test/Java/Java-1.6.py index b99a26a..c759e87 100644 --- a/test/Java/Java-1.6.py +++ b/test/Java/Java-1.6.py @@ -1,7 +1,5 @@ #!/usr/bin/env python # -# __COPYRIGHT__ -# # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including @@ -21,8 +19,6 @@ # 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 Java compilation with a live Java 1.6 "javac" compiler. """ diff --git a/test/Java/Java-1.8.py b/test/Java/Java-1.8.py index 4fcfe2b..4e54208 100644 --- a/test/Java/Java-1.8.py +++ b/test/Java/Java-1.8.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 @@ -21,8 +23,6 @@ # 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 Java compilation with a live Java 1.8 "javac" compiler. """ diff --git a/test/Java/RMIC.py b/test/Java/RMIC.py index 519ad5b..dafb9cd 100644 --- a/test/Java/RMIC.py +++ b/test/Java/RMIC.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__" import os diff --git a/test/Java/RMICCOM.py b/test/Java/RMICCOM.py index 9f6595d..8a00b25 100644 --- a/test/Java/RMICCOM.py +++ b/test/Java/RMICCOM.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 the ability to configure the $RMICCOM construction variable. diff --git a/test/Java/RMICCOMSTR.py b/test/Java/RMICCOMSTR.py index d4d1904..2425a3d 100644 --- a/test/Java/RMICCOMSTR.py +++ b/test/Java/RMICCOMSTR.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 that the $RMICCOMSTR construction variable allows you to configure diff --git a/test/Java/jar_not_in_PATH.py b/test/Java/jar_not_in_PATH.py index d69f9c3..26e92ce 100644 --- a/test/Java/jar_not_in_PATH.py +++ b/test/Java/jar_not_in_PATH.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__" """ Ensures that the Tool gets initialized, even when jar is not directly diff --git a/test/Java/multi-step.py b/test/Java/multi-step.py index b3f9896..37656b8 100644 --- a/test/Java/multi-step.py +++ b/test/Java/multi-step.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 @@ -26,8 +28,6 @@ Real-world test (courtesy Leanid Nazdrynau) of the multi-step capabilities of the various Java Builders. """ -__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" - import os import TestSCons diff --git a/test/Java/nested-classes.py b/test/Java/nested-classes.py index 0208eb6..6f4aff9 100644 --- a/test/Java/nested-classes.py +++ b/test/Java/nested-classes.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,15 +22,11 @@ # 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 Java compilation with inner and anonymous classes (Issue 2087). """ - import TestSCons _python_ = TestSCons._python_ diff --git a/test/Java/no-JARCHDIR.py b/test/Java/no-JARCHDIR.py index 11754c0..d339251 100644 --- a/test/Java/no-JARCHDIR.py +++ b/test/Java/no-JARCHDIR.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__" """ Verify the Jar() behavior when we have no JARCHDIR set (it should diff --git a/test/Java/rmic_not_in_PATH.py b/test/Java/rmic_not_in_PATH.py index 9c7030c..ac3f28e 100644 --- a/test/Java/rmic_not_in_PATH.py +++ b/test/Java/rmic_not_in_PATH.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__" """ Ensures that the Tool gets initialized, even when rmic is not directly diff --git a/test/Java/source-files.py b/test/Java/source-files.py index e5cb8b6..23e5ebc 100644 --- a/test/Java/source-files.py +++ b/test/Java/source-files.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__" """ Verify that we can pass the Java() builder explicit lists of .java @@ -31,8 +30,6 @@ files as sources. import TestSCons -_python_ = TestSCons._python_ - test = TestSCons.TestSCons() # Keep this logic because it skips the test if javac or jar not found. @@ -40,10 +37,10 @@ where_javac, java_version = test.java_where_javac() where_jar = test.java_where_jar() test.write('SConstruct', """ -env = Environment(tools = ['javac', 'javah']) -env.Java(target = 'class1', source = 'com/Example1.java') -env.Java(target = 'class2', source = ['com/Example2.java', 'com/Example3.java']) -""" % locals()) +env = Environment(tools=['javac']) +env.Java(target='class1', source='com/Example1.java') +env.Java(target='class2', source=['com/Example2.java', 'com/Example3.java']) +""") test.subdir('com', 'src') diff --git a/test/Java/swig-dependencies.py b/test/Java/swig-dependencies.py index c1821f8..48010ad 100644 --- a/test/Java/swig-dependencies.py +++ b/test/Java/swig-dependencies.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__" """ Verify that dependencies on SWIG-generated .java files work correctly. @@ -39,8 +38,6 @@ if not swig: test.skip_test('Can not find installed "swig", skipping test.\n') where_javac, java_version = test.java_where_javac() -where_javah = test.java_where_javah() - where_java_include=test.java_where_includes() test.subdir(['foo'], @@ -50,11 +47,11 @@ test.subdir(['foo'], test.write(['SConstruct'], """\ import os -env = Environment(ENV = os.environ) +env = Environment(ENV=os.environ) if env['PLATFORM'] != 'win32': - env.Append(CPPFLAGS = ' -g -Wall') -env['CPPPATH'] ='$JAVAINCLUDES' - + env.Append(CPPFLAGS=' -g -Wall') +env['CPPPATH'] = '$JAVAINCLUDES' + Export('env') SConscript('#foo/SConscript') |