diff --git a/tests/run-test-suite.sh b/tests/run-test-suite.sh new file mode 100755 index 0000000..67904b7 --- /dev/null +++ b/tests/run-test-suite.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# Author : Gaston Gonzalez +# Date : 3 November 2024 +# Purpose : Post installation validation script + +PATH=.:$PATH + +ls test-*.sh | while read test_case; do + eval ${test_case} + if [[ $? -eq 0 ]]; then + printf "%20s %s\n" "${test_case}" "[PASSED]" + else + printf "%20s %s\n" "${test_case}" "[FAILED]" + fi +done diff --git a/tests/test-java.sh b/tests/test-java.sh new file mode 100755 index 0000000..76c3791 --- /dev/null +++ b/tests/test-java.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Author : Gaston Gonzalez +# Date : 3 November 2024 +# Purpose : Test Java installation + +# We need to redirect stderr to stdout otherwise grep will not match. +JAVA_OUT=$(java -version 2>&1 | grep 20.0.1) +exit $?