Commit c1846554 authored by Johannes Meyer's avatar Johannes Meyer
Browse files

Support custom test scripts passed to the command line

`... icinga-build-test testing/live_test.sh`
parent 4957db5f
Pipeline #9463 failed with stage
in 36 seconds
......@@ -20,7 +20,9 @@ fi
)
test_script=
if [ -f "${ICINGA_BUILD_DEB_FLAVOR}/debian/icinga-build-test" ]; then
if [ -n "$@" ]; then
test_script="$@"
elif [ -f "${ICINGA_BUILD_DEB_FLAVOR}/debian/icinga-build-test" ]; then
test_script="${ICINGA_BUILD_DEB_FLAVOR}/debian/icinga-build-test"
elif [ -f "debian/icinga-build-test" ]; then
test_script="debian/icinga-build-test"
......
......@@ -57,7 +57,9 @@ REPO
esac
test_script=
if [ -f "icinga-build-test" ]; then
if [ -n "$@" ]; then
test_script="$@"
elif [ -f "icinga-build-test" ]; then
test_script="./icinga-build-test"
elif [ -f "${WORKDIR}/testing/start_test.sh" ]; then
test_script="${WORKDIR}/testing/start_test.sh"
......
......@@ -7,7 +7,7 @@ FILES_DEBIAN="$(ls -d ./debian ./*/debian 2>/dev/null)"
if [ -n "${FILES_SPEC}" ]; then
echo "Detected RPM source: ${FILES_SPEC}"
echo
if ! icinga-build-rpm-test; then
if ! icinga-build-rpm-test "$@"; then
echo "[ test failed! ]"
exit 1
fi
......@@ -15,7 +15,7 @@ if [ -n "${FILES_SPEC}" ]; then
elif [ -n "${FILES_DEBIAN}" ]; then
echo "Detected Debian packaging paths: ${FILES_DEBIAN}"
echo
if ! icinga-build-deb-test; then
if ! icinga-build-deb-test "$@"; then
echo "[ test failed! ]"
exit 1
fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment