summaryrefslogtreecommitdiffstats
path: root/distro/tests/test-distro.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 00:55:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 00:55:53 +0000
commit3d0386f27ca66379acf50199e1d1298386eeeeb8 (patch)
treef87bd4a126b3a843858eb447e8fd5893c3ee3882 /distro/tests/test-distro.sh
parentInitial commit. (diff)
downloadknot-resolver-3d0386f27ca66379acf50199e1d1298386eeeeb8.tar.xz
knot-resolver-3d0386f27ca66379acf50199e1d1298386eeeeb8.zip
Adding upstream version 3.2.1.upstream/3.2.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'distro/tests/test-distro.sh')
-rwxr-xr-xdistro/tests/test-distro.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/distro/tests/test-distro.sh b/distro/tests/test-distro.sh
new file mode 100755
index 0000000..0ae8662
--- /dev/null
+++ b/distro/tests/test-distro.sh
@@ -0,0 +1,32 @@
+#!/bin/bash -x
+
+# ./test-distro.sh {devel|latest} {distro}
+# Example usage: ./test-distro.sh devel debian9
+
+distro=$2
+repo=$1
+
+# Select repos
+echo -e 'repos:\n - knot-resolver-latest' > repos.yaml # latest is needed for knot
+case "$repo" in
+ devel)
+ echo -e ' - knot-resolver-devel' >> repos.yaml
+ ;;
+ testing)
+ echo -e 'repos:\n - knot-resolver-testing' > repos.yaml
+ ;;
+ latest)
+ ;;
+ *)
+ echo "Unknown repo, choose devel|latest|testing"
+ exit 1
+ ;;
+esac
+
+cd "$distro"
+vagrant destroy -f &>/dev/null
+vagrant up
+ret=$?
+vagrant destroy -f &>/dev/null
+exit $ret
+