Skip to content

Commit 2b0ddbf

Browse files
authored
Merge pull request #6 from rh-openjdk/new_tar_check_tc
Added testcase to check if tar is installed in the container image.
2 parents 600c494 + 86b3681 commit 2b0ddbf

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
set -ex
3+
set -o pipefail
4+
5+
## resolve folder of this script, following all symlinks,
6+
## http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
7+
SCRIPT_SOURCE="${BASH_SOURCE[0]}"
8+
while [ -h "$SCRIPT_SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
9+
SCRIPT_DIR="$( cd -P "$( dirname "$SCRIPT_SOURCE" )" && pwd )"
10+
SCRIPT_SOURCE="$(readlink "$SCRIPT_SOURCE")"
11+
# if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
12+
[[ $SCRIPT_SOURCE != /* ]] && SCRIPT_SOURCE="$SCRIPT_DIR/$SCRIPT_SOURCE"
13+
done
14+
readonly SCRIPT_DIR="$( cd -P "$( dirname "$SCRIPT_SOURCE" )" && pwd )"
15+
16+
source $SCRIPT_DIR/testlib.bash
17+
18+
parseArguments "$@"
19+
processArguments
20+
setup
21+
testTarIsInstalled 2>&1| tee $REPORT_FILE # then check the 8 or 11 in it against some NVR

containersQa/testlib.bash

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,11 @@ function checkOtherUserWorks() {
861861
test -z "$OUTPUT"
862862
}
863863

864+
# This test is added to check that tar is installed in all Openjdk images.
865+
# https://issues.redhat.com/browse/OPENJDK-2588
866+
function testTarIsInstalled() {
867+
runOnBaseDir tar --version
868+
}
864869
# SECTION FOR BUILDING CONTAINER IMAGES FOR TEST.
865870
# Ultimately these may be broken out to seperate file.
866871

0 commit comments

Comments
 (0)