diff --git a/containersQa/120_testTarInstalled.sh b/containersQa/120_testTarInstalled.sh new file mode 100644 index 0000000..b5db41a --- /dev/null +++ b/containersQa/120_testTarInstalled.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -ex +set -o pipefail + +## resolve folder of this script, following all symlinks, +## http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in +SCRIPT_SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SCRIPT_SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink + SCRIPT_DIR="$( cd -P "$( dirname "$SCRIPT_SOURCE" )" && pwd )" + SCRIPT_SOURCE="$(readlink "$SCRIPT_SOURCE")" + # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located + [[ $SCRIPT_SOURCE != /* ]] && SCRIPT_SOURCE="$SCRIPT_DIR/$SCRIPT_SOURCE" +done +readonly SCRIPT_DIR="$( cd -P "$( dirname "$SCRIPT_SOURCE" )" && pwd )" + +source $SCRIPT_DIR/testlib.bash + +parseArguments "$@" +processArguments +setup +testTarIsInstalled 2>&1| tee $REPORT_FILE # then check the 8 or 11 in it against some NVR diff --git a/containersQa/testlib.bash b/containersQa/testlib.bash index 99e2eed..77b0adc 100644 --- a/containersQa/testlib.bash +++ b/containersQa/testlib.bash @@ -861,6 +861,11 @@ function checkOtherUserWorks() { test -z "$OUTPUT" } +# This test is added to check that tar is installed in all Openjdk images. +# https://issues.redhat.com/browse/OPENJDK-2588 +function testTarIsInstalled() { + runOnBaseDir tar --version +} # SECTION FOR BUILDING CONTAINER IMAGES FOR TEST. # Ultimately these may be broken out to seperate file.