changeset 2683:7314953c7d86

Ignore JAVA_TOOL_OPTIONS line in Bash completion tests Reviewed-by: neugens Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-May/023307.html
author Elliott Baron <ebaron@redhat.com>
date Mon, 05 Jun 2017 12:27:20 -0400
parents 921513fbfa70
children 78729b17ec74
files distribution/tools/verify-bash-completion-functions.sh
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/distribution/tools/verify-bash-completion-functions.sh	Mon Jun 05 11:54:07 2017 -0400
+++ b/distribution/tools/verify-bash-completion-functions.sh	Mon Jun 05 12:27:20 2017 -0400
@@ -105,7 +105,9 @@
     __find_completion $input > "${TARGET}/completion.actual" 2> "${TARGET}/completion.output"
     actual=$(<"${TARGET}/completion.actual")
     actual_pretty=$(echo "$actual" | __prettify)
-    output=$(<"${TARGET}/completion.output")
+    # When JAVA_TOOL_OPTIONS variable is set, the JVM will unconditionally print a string
+    # containing the variable name and value
+    output=$(grep -v "JAVA_TOOL_OPTIONS" "${TARGET}/completion.output" || true)
     if [[ $actual == $expected && -z $output ]] ; then
         echo "[OK]   '$input' => '$actual_pretty'"
     elif [[ -z $output ]]; then