Add `java` mock scripts to avoid running a JVM during tests

The script simply prints out each argument in an unambigous form on a single
line and handles to the `--version` option.

For windows, add `java.cmd` script which simply calls the former `java` script.
This commit is contained in:
Claudio Bley 2020-09-27 22:46:03 +02:00
parent 234273db41
commit a108c46851
2 changed files with 10 additions and 0 deletions

9
integration-test/bin/java Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env python
import sys
if '--version' in sys.argv or '-version' in sys.argv:
print 'openjdk version "1.8.0_212"'
else:
for arg in sys.argv[1:]:
print(repr(arg)[1:-1])

View File

@ -0,0 +1 @@
@python "%~dp0%~n0" %*