Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate JAVA_TOOL_OPTIONS down to external tests in container #5498

Merged
merged 2 commits into from
Aug 19, 2024
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
6 changes: 3 additions & 3 deletions external/dockerfile_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,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\" " \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be $JAVA_TOOL_OPTIONS too?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge now if need can be updated later.

"\n" >> ${file}

}
Expand Down Expand Up @@ -445,7 +445,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