Skip to content

Commit

Permalink
Propagate JAVA_TOOL_OPTIONS down to external tests in container (adop…
Browse files Browse the repository at this point in the history
…tium#5498)

* Propagate JAVA_TOOL_OPTIONS down to external tests in container

* Update external/dockerfile_functions.sh

Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>

---------

Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
  • Loading branch information
judovana and karianna committed Aug 19, 2024
1 parent dcef912 commit 6356956
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions external/dockerfile_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ print_jdk_install() {
"\n\t PATH=\"/opt/java/openjdk/bin:\$PATH\" " \
"\n" >> ${file}

echo -e "\nENV JAVA_TOOL_OPTIONS=\"-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle\" " \
echo -e "\nENV JAVA_TOOL_OPTIONS=\"$JAVA_TOOL_OPTIONS -XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle\" " \
"\n" >> ${file}

echo -e "\nENV RANDFILE=/tmp/.rnd \\" \
"\n\t OPENJ9_JAVA_OPTIONS=\"-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Dosgi.checkConfiguration=false\" " \
"\n\t OPENJ9_JAVA_OPTIONS=\"$OPENJ9_JAVA_OPTIONS -XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Dosgi.checkConfiguration=false\" " \
"\n" >> ${file}

}
Expand Down Expand Up @@ -446,7 +446,7 @@ print_maven_install() {
print_java_tool_options() {
local file=$1

echo -e "ENV JAVA_TOOL_OPTIONS=\"-Dfile.encoding=UTF8 -Djava.security.egd=file:/dev/./urandom\"\n" >> ${file}
echo -e "ENV JAVA_TOOL_OPTIONS=\"$JAVA_TOOL_OPTIONS -Dfile.encoding=UTF8 -Djava.security.egd=file:/dev/./urandom\"\n" >> ${file}
}

print_environment_variable() {
Expand Down
4 changes: 2 additions & 2 deletions external/jenkins/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ source $(dirname "$0")/test_base_functions.sh
# Set up Java to be used by the jenkins test
echo_setup

export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8"
export JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -Dfile.encoding=UTF8"
#begin jenkins test

set -e
Expand All @@ -29,4 +29,4 @@ echo "Run jenkins test phase alone with cmd: \"mvn surefire:test\"" && \
mvn --batch-mode surefire:test -Denforcer.fail=false
test_exit_code=$?
find ./ -type d -name 'surefire-reports' -exec cp -r "{}" /testResults \;
exit $test_exit_code
exit $test_exit_code
4 changes: 2 additions & 2 deletions external/scala/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ source $(dirname "$0")/test_base_functions.sh
echo_setup

TEST_SUITE=$1
export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8"
export JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -Dfile.encoding=UTF8"
#begin scala test
set -e

Expand All @@ -27,4 +27,4 @@ sbt -Dsbt.log.noformat=true "scala -version"
echo "Begin to execute Scala test with cmd: sbt \"partest $TEST_SUITE\"" && \
sbt -Dsbt.log.noformat=true "partest --terse $TEST_SUITE"

set +e
set +e

0 comments on commit 6356956

Please sign in to comment.