]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
distro/tests: support more OBS repos in test-distro.sh
authorTomas Krizek <tomas.krizek@nic.cz>
Fri, 24 May 2019 10:35:13 +0000 (12:35 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 11 Jun 2019 12:10:45 +0000 (14:10 +0200)
distro/tests/test-distro.sh

index ddfcba40069f63814d62853e7afd31a342abb9a4..54ddc5a94316db495dbf1eba7ebb4a15fddfde47 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash -x
 
-# ./test-distro.sh {devel|latest} {distro}
-# Example usage: ./test-distro.sh devel debian9
+# ./test-distro.sh {obs_repo} {distro}
+# Example usage: ./test-distro.sh knot-resolver-devel debian9
 
 pkgtestdir="$(dirname ${0})"
 repofile="$pkgtestdir/repos.yaml"
@@ -10,22 +10,11 @@ distro=$2
 repo=$1
 
 # Select repos
-# TODO: enable knot-dns-devel
-echo -e 'repos:\n  - knot-resolver-latest' > $repofile  # latest is needed for knot
-case "$repo" in
-       devel)
-               echo -e '  - knot-resolver-devel' >> $repofile
-               ;;
-       testing)
-               echo -e 'repos:\n  - knot-resolver-testing' > $repofile
-               ;;
-       latest)
-               ;;
-       *)
-               echo "Unknown repo, choose devel|latest|testing"
-               exit 1
-               ;;
-esac
+echo -e "repos:\n  - $repo" > $repofile
+if [ "$repo" == "knot-resolver-devel" ]; then
+    # get Knot DNS from knot-resolver-latest
+       echo -e '  - knot-resolver-latest' >> $repofile
+fi
 
 pushd "$pkgtestdir/$distro"
 vagrant destroy -f &>/dev/null