aboutsummaryrefslogtreecommitdiffstats
path: root/jenkins-common.sh
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-07-29 01:34:34 +0200
committerlaforge <laforge@osmocom.org>2020-08-12 18:23:05 +0000
commit596aa901ceb0e396b36b62598e4d4219eccad9f6 (patch)
tree4816ca0d3b965707c61d41603d298d5178f153af /jenkins-common.sh
parent27a063fc2f1256124e64a17f5180652c4c2f5c88 (diff)
jenkins-common.sh: exit early on full disk
When my disk runs full, jenkins-common.sh fails to create a VOL_BASEDIR right at the start, and hence no testsuite gets its external volumes mounted properly. However, the test suite still starts up with missing cfg files etc, and fails in non-obvious ways, until I find out the disk is full some minutes later. Instead, verify that the base dir really exists or bail out right there. Change-Id: I6540797c8e0ee3e7b09d4a80592d5e270e7d9adc
Diffstat (limited to 'jenkins-common.sh')
-rw-r--r--jenkins-common.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/jenkins-common.sh b/jenkins-common.sh
index a29720c..64ec0bb 100644
--- a/jenkins-common.sh
+++ b/jenkins-common.sh
@@ -135,6 +135,11 @@ else
mkdir -p "$VOL_BASE_DIR"
fi
+if [ ! -d "$VOL_BASE_DIR" ]; then
+ echo "ERROR: \$VOL_BASE_DIR does not exist: '$VOL_BASE_DIR'"
+ exit 1
+fi
+
# non-jenkins execution: put logs in /tmp
if [ "x$BUILD_TAG" = "x" ]; then
BUILD_TAG=nonjenkins