diff --git a/debian/ngcp-system-tests.install b/debian/ngcp-system-tests.install index 2ba9e28..3dd59ff 100644 --- a/debian/ngcp-system-tests.install +++ b/debian/ngcp-system-tests.install @@ -1,2 +1,2 @@ -templates/* /etc/ngcp-config/templates/etc/ngcp-tests/ -testrunner /usr/share/ngcp-tests/ +templates/* /etc/ngcp-config/templates/etc/ngcp-system-tests/ +testrunner /usr/share/ngcp-system-tests/ diff --git a/debian/ngcp-system-tests.links b/debian/ngcp-system-tests.links new file mode 100644 index 0000000..60c0b1a --- /dev/null +++ b/debian/ngcp-system-tests.links @@ -0,0 +1,2 @@ +/usr/share/ngcp-system-tests /usr/share/ngcp-tests +/etc/ngcp-system-tests /etc/ngcp-tests diff --git a/debian/ngcp-system-tests.postrm b/debian/ngcp-system-tests.postrm index f0fd51f..bc7ba6a 100644 --- a/debian/ngcp-system-tests.postrm +++ b/debian/ngcp-system-tests.postrm @@ -30,6 +30,8 @@ set -e case "$1" in purge) + rm -rf /etc/ngcp-system-tests/ + # Remove old location too. rm -rf /etc/ngcp-tests/ ;; diff --git a/debian/ngcp-system-tests.preinst b/debian/ngcp-system-tests.preinst new file mode 100644 index 0000000..fb9db59 --- /dev/null +++ b/debian/ngcp-system-tests.preinst @@ -0,0 +1,25 @@ +#!/bin/sh + +set -e + +case "$1" in + install|upgrade) + # We need to move aside the old generated directory, as the new package + # ships compat symlinks at the same location. + if [ -d /etc/ngcp-tests ]; then + if [ -d /etc/ngcp-system-tests ]; then + rm -rf /etc/ngcp-tests + else + mv /etc/ngcp-tests /etc/ngcp-system-tests + fi + fi + ;; + abort-upgrade) + ;; + *) + echo "preinst called with unknown argument '$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# diff --git a/testrunner b/testrunner index a6d6e0d..055ea8e 100755 --- a/testrunner +++ b/testrunner @@ -34,8 +34,8 @@ else rm -f "${host_yml_file}" fi -diag "Rebuilding test configs in /etc/ngcp-test/" -ngcpcfg build /etc/ngcp-test/* 2>&1 +diag "Rebuilding test configs in /etc/ngcp-system-tests/" +ngcpcfg build /etc/ngcp-system-tests/* 2>&1 rm -f "${host_yml_file}" rm -rf "${REPORT_DIRECTORY}" @@ -52,6 +52,6 @@ case "${DEBIAN_RELEASE}" in DEBIAN_RELEASE=11 ;; esac -DEBIAN_RELEASE=$DEBIAN_RELEASE goss -g "/etc/ngcp-tests/goss.yaml" validate --format tap | tee "${TAP_RESULTS}" +DEBIAN_RELEASE=$DEBIAN_RELEASE goss -g "/etc/ngcp-system-tests/goss.yaml" validate --format tap | tee "${TAP_RESULTS}" exit "${PIPESTATUS[0]}"