Change in osmo-ci[master]: repo-install-test: verify DISTRO argument

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Mon Jan 25 09:36:34 UTC 2021


osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/22375 )

Change subject: repo-install-test: verify DISTRO argument
......................................................................

repo-install-test: verify DISTRO argument

Keep list of supported distros in one place in repo-install-test.sh.

Related: OS#4969
Change-Id: I1aa2564ff861d81a866302e44a1f99ff876c7b31
---
M scripts/repo-install-test.sh
1 file changed, 18 insertions(+), 7 deletions(-)

Approvals:
  osmith: Looks good to me, approved; Verified



diff --git a/scripts/repo-install-test.sh b/scripts/repo-install-test.sh
index 7585509..88253a3 100755
--- a/scripts/repo-install-test.sh
+++ b/scripts/repo-install-test.sh
@@ -8,14 +8,25 @@
 # * TESTS: which tests to run (all by default, see below for possible values)
 . "$(dirname "$0")/common.sh"
 
-# Show usage
-if [ "$#" -ne 1 ]; then
-	echo "usage: repo-install-test.sh DISTRO"
-	echo "DISTRO: debian or centos8"
-	exit 1
-fi
-
 DISTRO="$1"
+DISTROS="
+	centos8
+	debian
+"
+
+check_usage() {
+	local i
+	for i in $DISTROS; do
+		if [ "$DISTRO" = "$i" ]; then
+			return
+		fi
+	done
+	echo "usage: repo-install-test.sh DISTRO"
+	echo "DISTRO: one of: $DISTROS"
+	exit 1
+}
+
+check_usage
 docker_images_require "$DISTRO-repo-install-test"
 
 FEED="${FEED:-nightly}"

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/22375
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I1aa2564ff861d81a866302e44a1f99ff876c7b31
Gerrit-Change-Number: 22375
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210125/7d932804/attachment.htm>


More information about the gerrit-log mailing list