summaryrefslogtreecommitdiffstats
path: root/test/Java
Commit message (Collapse)AuthorAgeFilesLines
* Tweak Java e2e tests some moreMats Wichmann2022-02-0222-107/+116
| | | | | | | | Formatting of embedded test scripts Extract myrmic.py to fixture dir Some more DefaultEnvironment and tools limiting for performance Signed-off-by: Mats Wichmann <mats@linux.com>
* Java not-in-path tests use limited toolsMats Wichmann2022-01-282-4/+7
| | | | | | | | | There's no reason for these tests to initialize all tools since only checking for one. During development of unrelated PR #4088 these two failed initializing gcc tool - might as well run as lean as possible. Signed-off-by: Mats Wichmann <mats@linux.com>
* Actually commit fixed myjava.py [skip appveyor]Mats Wichmann2022-01-241-1/+0
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* A little java/jar cleanupMats Wichmann2022-01-246-209/+159
| | | | | | | | | | | | * The Jar test is split into requires-jdk and not. * Move some inline tool definitions to fixture files. * Reformat some stuff. * Some linting and commenting in Jar tool. * Enabled test for a non-java file when Jar source is a directory (was commented out) - needed to add a Command to copy the file to the directory where the class files were generated. Signed-off-by: Mats Wichmann <mats@linux.com>
* Add an extra check for javahMats Wichmann2021-11-013-31/+65
| | | | | | | | | | | | The previous sanity check was to see if the less-optimistic WhereIs could find javah, and skip if not, since java_where_javah looks many more places than SCons will actually look. This was insufficient - some openjdk packages don't clean up the alternatives link to javah even if a java version which doesn't have it becomes the selected version. Add a check on found paths to detect a mismatch. Signed-off-by: Mats Wichmann <mats@linux.com>
* Skip unusable javah testsMats Wichmann2021-10-314-127/+189
| | | | | | | | | | | | | | | 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>
* Java tests: minor cleanupsMats Wichmann2021-10-3130-156/+119
| | | | | | | | | | 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>
* Run autoflake on codeMats Wichmann2020-09-216-6/+0
| | | | | | | | | | Eliminate unneeded imports, and a few unneeded statements - usually "pass" where it is not syntactically needed. A couple of import try blocks were eliminated or changed when they're "cannot happen" due to current floor Python version. Signed-off-by: Mats Wichmann <mats@linux.com>
* Remove verbose_set calls from testsMats Wichmann2020-03-184-7/+0
| | | | | | | | test.verbose_set() enables verbose mode, can be a useful debugging aid. Shouldn't be left in in production tests, as it creates noise in the test log. Signed-off-by: Mats Wichmann <mats@linux.com>
* rm-py2: Remove "from __future__" from more placesMats Wichmann2020-02-201-4/+2
| | | | | | | | | | | | | | | A couple of minor reformats along the way, most prominently, in tests, if being edited anyway, make sure the docstring most tests have is actually the docstring (sometimes the __revision__ line came before, which makes the string not be the docstring). Snuck in some minor framework changes that were orphaned when another draft PR was not needed: this almost all docstring changes, the functional part is using casefold instead of lower in a match func - a slightly better approach which is now possible that Py2 compatibility is not needed. Signed-off-by: Mats Wichmann <mats@linux.com>
* test: Fix SyntaxWarnings on escapes in Python stringsMats Wichmann2019-09-132-5/+5
| | | | | | | | | | | | | | | | | | This is the remaining batch of SyntaxWarning cleanups in the test/ directory, as flagged by Python 3.8 (now tested with 3.8.0b4). Most of these are escapes in strings that are not recognized as Python-language escapes up front, due to the embedded nature of testing - tests write a string to a file which is actually Python (code or sconscript) which is later to be executed. Also changed the timestamp-fallback test to eliminate an imp module DeprecationWarning: since in all supported Python versions haslib is stdlib, drop that skip check; the md5 skip check can be a simple import now. My test runs with 3.8 show no SyntaxWarnings after this. Signed-off-by: Mats Wichmann <mats@linux.com>
* Use "in" in preference to string find methodMats Wichmann2019-08-301-7/+7
| | | | | | | | In places where only the found/not found status is needed, use the membership operator (in) for checks instead - makes for easier reading and is considered faster for shorter strings. Signed-off-by: Mats Wichmann <mats@linux.com>
* Move the jdk-version-glob test to unit testsMats Wichmann2019-04-171-94/+0
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* Add a test for JDK glob matchingMats Wichmann2019-04-161-0/+94
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* [PR #3352] fix sider complaints: bare exceptMats Wichmann2019-04-141-2/+2
| | | | | | | | | | | Sider in the CI system doesn't like the change which added a try/except block for a version without a dot. This was copied from a different file, so to fix the complaint, four instances are actually updated to "except ValueError" - I am assuming that this is the only thing that could go wrong, a version string cannot be converted with int(foo), which would throw ValueError. Signed-off-by: Mats Wichmann <mats@linux.com>
* get rid of code copying PATH from os.environWilliam Deegan2018-11-061-1/+3
|
* Fix Java/multi-step.py to avoid picking up cygwin or mingw's link.exe which ↵William Deegan2018-11-051-1/+8
| | | | takes different arguments than the expected msvc
* Fix logic which populates JAVAINCLUDES when javac is not found. Restore ↵William Deegan2018-10-164-0/+15
| | | | checks in some java tests to skip test if no javac and/or jar found
* Fixes for Java tests on win32William Deegan2018-10-0211-90/+55
|
* Update to use paths set by javac, rmic. Also update RMISecurityManager to ↵William Deegan2018-10-021-13/+18
| | | | SecurityManager (RMI.. has been deprecated for some time. JDK 1.8 started to issue deprecation warnings and break test)
* Changed to allow scons java logic to find install for win32. Also add ↵William Deegan2018-10-021-6/+5
| | | | declspec in c file which is sole object in DLL to ensure mslink creates the expected .LIB file.
* Switch to depending on javac tool finding javac on win32 rather than the ↵William Deegan2018-10-011-17/+11
| | | | test infrastructure. JavaCommon now has reasonable defaults for windows java sdk installs
* add logic to find java installs and on win32 use this to add to ↵William Deegan2018-10-012-2/+2
| | | | env['ENV']['PATH']
* Fix missing -c in testcaseWilliam Deegan2018-10-012-4/+4
|
* Add test for 1.8. Modularize java tests and move files to a fixture. Change ↵William Deegan2018-10-013-3/+9
| | | | TestCommon's options_arguments to keep passed lists and not join them into a string.
* change method of finding javac from using full path (which fails when it has ↵William Deegan2018-09-3015-250/+373
| | | | a space in it), to appending the path to javac to env['ENV']['PATH']. (Which is basically what msvc/msvs do)
* Update java version supportMats Wichmann2018-07-181-0/+4
| | | | | | | | | | Although the newer versions are marketed as simple versions, scons will see them as dotted versions: 9.0, 10.0. Add some comments to this in test code - the RMI test skip ought to work as long as they stay dotted versions (since 10.0 >= 1.8); that code does run the test for a simple version like '6'. Signed-off-by: Mats Wichmann <mats@linux.com>
* change test to skip initializing any tools in DefaulEnvironment. Should ↵William Deegan2018-05-111-0/+10
| | | | speed up test on windows a bit
* Change bug references from tigris -> githubMats Wichmann2018-04-244-4/+4
| | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* fix for issue 3042, Jar method was not respecting variant dirs when using ↵Daniel Moody2018-02-111-3/+4
| | | | os.path to detect files or dirs
* updated jar to handle directories better, JarClassFile build doesnt return ↵Daniel Moody2017-12-031-1/+141
| | | | any targets if no Java files are in the directory
* updated jar.py to handle nodes and varanit dirs better, added test for nodes ↵Daniel Moody2017-12-031-5/+9
| | | | and varient dir.
* updated Jar builder to flatten source list, and added test for embedded sourcesDaniel Moody2017-11-191-0/+87
|
* Added Jar test to check if multiple targets can be passed.Daniel Moody2017-11-141-8/+29
|
* updated the JAR test to test that the java source files were actually ↵Daniel Moody2017-10-262-5/+21
| | | | compiled and are in the resulting jar file. Also updated the swig dependency test to throw no result from what seems to be a non java related bug.
* added test to JAR to also check the case that java source files are passed ↵Daniel Moody2017-10-101-0/+62
| | | | directly as a source to the Jar builder. The only other test that did this was multi-setp.py which was reliant on swig being installed.
* fix to run on mac. explicitly request swig toolWilliam Deegan2017-04-011-1/+1
|
* py2/3 must_match mode='r' changesWilliam Deegan2017-03-134-15/+15
|
* swap using wrapper.py fixture to wrapper_with_args.py. The fixture swap ↵William Deegan2017-03-134-20/+23
| | | | missed that java tests wrapper was different. Also mode rb/wb changes, and switch to must_match with mode='r'
* Replace list(filter()) with list comprehension.Craig Rodrigues2017-03-113-3/+3
|
* Moved common my<xxx>.py functions to global fixture and resolve byte/str.William Blevins2016-10-038-117/+16
|
* Updating tests to use fixture wrapper.py.William Blevins2016-09-243-18/+3
|
* Merge in default.Russel Winder2016-01-193-2/+19
|\
| * added comment per William Blevins comment on pull request to indicate why ↵William Deegan2016-01-173-0/+9
| | | | | | | | we're skipping some tests for gcj
| * changes to skip tests on ubuntu-next when gcj and not real java, and also ↵William Deegan2016-01-173-2/+10
| | | | | | | | when no latex is available
* | Post merge commit for safety. Building Fortran code works, but tests fail.Russel Winder2015-12-241-4/+4
|\ \ | |/
| * - fixed Java test for derived sources problem, now favouring skip()Dirk Baechle2014-09-181-4/+4
| | | | | | | | over no_result()
* | Merged default branch into python3-port to keep it up to date.Gary Oberbrunner2014-08-232-36/+177
|\ \ | |/ | | | | | | Hand-updated a few things to keep them python3-safe, and handled several merge conflicts.
| * - several smaller fixes to get the Linux buildslaves green againDirk Baechle2014-08-071-36/+53
| |
| * Skipping Java DerivedSourceTest for now until underlying issue is fixed.Gary Oberbrunner2014-07-201-0/+4
| |