diff --git a/.gitignore b/.gitignore index 93cffd4..cd1dadd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -SOURCES/malaga-7.12.tgz -/malaga-7.12.tgz +malaga-7.12.tgz diff --git a/tests/scripts/run.sh b/tests/scripts/run.sh new file mode 100755 index 0000000..d6ac302 --- /dev/null +++ b/tests/scripts/run.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +FAIL_COUNT=0 + +check_pkg() { + local pkg=$1 + if rpm -q $pkg + then + echo "PASS" + else + echo "FAIL" + FAIL_COUNT=$((${FAIL_COUNT} + 1)) + fi +} + +check_binary(){ + COMMAND="$1 $2" + echo $COMMAND + ${COMMAND} + RETVAL=$? + if [ ${RETVAL} != 0 ] ; then + echo "FAIL" + FAIL_COUNT=$((${FAIL_COUNT} + 1)) + else + echo "PASS" + fi +} +check_pkg "malaga" +check_pkg "libmalaga" +for i in malaga mallex malmake malrul malshow malsym +do + check_binary ${i} -v + check_binary ${i} -h +done +echo "FAIL_COUNT=${FAIL_COUNT}" +exit ${FAIL_COUNT} diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..23de596 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,11 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + required_packages: + - malaga + tests: + - simple: + dir: scripts + run: bash run.sh