Change in osmo-ci[master]: repo-install-test: use sh -ex

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
Thu May 28 09:53:24 UTC 2020


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

Change subject: repo-install-test: use sh -ex
......................................................................

repo-install-test: use sh -ex

Make it consistent with run-inside-docker.sh by also using -e and -x.
This makes development easier.

Change-Id: I733164829bf076fb42df3fde725f3e330f8abecc
---
M scripts/repo-install-test.sh
1 file changed, 6 insertions(+), 4 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  osmith: Verified



diff --git a/scripts/repo-install-test.sh b/scripts/repo-install-test.sh
index d3ce8d6..0a19b04 100755
--- a/scripts/repo-install-test.sh
+++ b/scripts/repo-install-test.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -ex
 . "$(dirname "$0")/common.sh"
 docker_images_require "debian-repo-install-test"
 
@@ -46,12 +46,14 @@
 check_if_systemd_is_running
 
 # Run the test script
-docker exec "$CONTAINER" /repo-install-test/run-inside-docker.sh
-ret="$?"
+ret=0
+if ! docker exec "$CONTAINER" /repo-install-test/run-inside-docker.sh; then
+	ret=1
+fi
 
 # Interactive shell
 if [ -n "$INTERACTIVE" ]; then
-	docker exec -it "$CONTAINER" bash
+	docker exec -it "$CONTAINER" bash || true
 fi
 
 docker container kill "$CONTAINER"

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I733164829bf076fb42df3fde725f3e330f8abecc
Gerrit-Change-Number: 18512
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
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/20200528/0dfb0f4d/attachment.htm>


More information about the gerrit-log mailing list