Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions containersQa/InProcessCompileDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

public class InProcessCompileDemo {
public static void main(String[] args) throws Exception {
String jvmVersion="17";
String version = System.getProperty("java.version");
String jvmVersion = version.split("\\.")[0];
if (args.length>0) {
jvmVersion=args[0];
}
Expand Down Expand Up @@ -35,7 +36,7 @@ public static void main(String[] args) {
StandardJavaFileManager std = compiler.getStandardFileManager(diagnostics, null, null);
MemoryFileManager memFM = new MemoryFileManager(std);

// compile for a specific release (22 here)
// compile for a specific release
JavaCompiler.CompilationTask task = compiler.getTask(
null, memFM, diagnostics,
List.of("--release", jvmVersion), null, List.of(source));
Expand Down
6 changes: 4 additions & 2 deletions containersQa/testlib.bash
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,10 @@ function runOnBaseDirBashWithMount() {
cp -r $LIBCQA_SCRIPT_DIR/*.java "${d}"
chmod 777 "${d}"
ls -ld ${d}
${2} $PD_PROVIDER run -v="${d}:/testsDir:Z" -i "$HASH" bash -c "${1}"
local r=0
${2} $PD_PROVIDER run -v="${d}:/testsDir:Z" -i "$HASH" bash -c "${1}" || r=$?
rm -rf "${d}"
return $r
}

function runOnBaseDirBashOtherUser() {
Expand Down Expand Up @@ -1183,5 +1185,5 @@ function tryJreCompilation() {
else
echo '17+, going on'
fi
runOnBaseDirBashWithMount "java /testsDir/InProcessCompileDemo.java" "$1"
runOnBaseDirBashWithMount "java /testsDir/InProcessCompileDemo.java $OTOOL_JDK_VERSION" "$1"
}