diff options
author | Mats Wichmann <mats@linux.com> | 2022-02-01 20:46:44 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2022-02-02 15:13:21 (GMT) |
commit | b017124ff38f477a5150bbf77325fbfb0a973c90 (patch) | |
tree | cfdb5eb4690113d19d8fbd2791389215f42ff057 /test/Java/Java-fixture/myrmic.py | |
parent | fc31681a9b3611dbda818ecfd3c98ee8720bc1bd (diff) | |
download | SCons-b017124ff38f477a5150bbf77325fbfb0a973c90.zip SCons-b017124ff38f477a5150bbf77325fbfb0a973c90.tar.gz SCons-b017124ff38f477a5150bbf77325fbfb0a973c90.tar.bz2 |
Tweak Java e2e tests some more
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>
Diffstat (limited to 'test/Java/Java-fixture/myrmic.py')
-rw-r--r-- | test/Java/Java-fixture/myrmic.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/Java/Java-fixture/myrmic.py b/test/Java/Java-fixture/myrmic.py new file mode 100644 index 0000000..877c1be --- /dev/null +++ b/test/Java/Java-fixture/myrmic.py @@ -0,0 +1,24 @@ +import os +import sys + +args = sys.argv[1:] +while args: + arg = args[0] + if arg == '-d': + outdir = args[1] + args = args[1:] + elif arg == '-classpath': + args = args[1:] + elif arg == '-sourcepath': + args = args[1:] + else: + break + args = args[1:] +for file in args: + out = os.path.join(outdir, file.lower().replace('.java', '.class')) + with open(file, 'rb') as infile, open(out, 'wb') as outfile: + for line in infile: + if not line.startswith(b'/*rmic*/'): + outfile.write(line) + +sys.exit(0) |