osmith submitted this change.

View Change

Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved Jenkins Builder: Verified
repo-install-test: add SKIP_PREPARE_VM env var

Change-Id: I96c7aef70d9d2c6318ce4e43c24450461bc00d91
---
M scripts/repo-install-test.sh
M scripts/repo-install-test/run-inside.sh
2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/scripts/repo-install-test.sh b/scripts/repo-install-test.sh
index 300357c..38f1a6b 100755
--- a/scripts/repo-install-test.sh
+++ b/scripts/repo-install-test.sh
@@ -5,6 +5,7 @@
# * KEEP_VM: for development: don't kill/start VM if still running
# * PROJ: OBS project namespace (e.g. "osmocom:latest")
# * PROJ_CONFLICT: Conflicting OBS project namespace (e.g. "osmocom:nightly")
+# * SKIP_PREPARE_VM: for development, skip the prepare_vm code
# * TESTS: which tests to run (all by default, see below for possible values)
. "$(dirname "$0")/common.sh"

@@ -138,6 +139,7 @@
export FEED="$FEED"
export PROJ="$PROJ"
export PROJ_CONFLICT="$PROJ_CONFLICT"
+ export SKIP_PREPARE_VM="$SKIP_PREPARE_VM"
export TESTS="$TESTS"

/repo-install-test/run-inside.sh
diff --git a/scripts/repo-install-test/run-inside.sh b/scripts/repo-install-test/run-inside.sh
index 5f01524..5e6a852 100755
--- a/scripts/repo-install-test/run-inside.sh
+++ b/scripts/repo-install-test/run-inside.sh
@@ -5,6 +5,7 @@
# * KEEP_CACHE: set to 1 to keep downloaded binary packages (for development)
# * PROJ: OBS project namespace (e.g. "osmocom:latest")
# * PROJ_CONFLICT: Conflicting OBS project namespace (e.g. "osmocom:nightly")
+# * SKIP_PREPARE_VM: for development, skip the prepare_vm code
# * TESTS: which tests to run (see repo-install-test.sh)

# Systemd services that must start up successfully after installing all packages (OS#3369)
@@ -189,6 +190,10 @@
}

prepare_vm() {
+ if [ -n "$SKIP_PREPARE_VM" ]; then
+ return
+ fi
+
case "$DISTRO" in
debian*)
prepare_vm_debian
@@ -197,6 +202,8 @@
prepare_vm_centos
;;
esac
+
+ configure_osmocom_repo "$PROJ"
}

# $1: file
@@ -416,7 +423,6 @@

check_env
prepare_vm
-configure_osmocom_repo "$PROJ"

for test in $TESTS; do
set +x

To view, visit change 30506. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I96c7aef70d9d2c6318ce4e43c24450461bc00d91
Gerrit-Change-Number: 30506
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-MessageType: merged