[libvirt PATCH v2 8/8] ci: integration.sh: Define the SCRATCH_DIR variable for local execution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Running outside of GitLab will likely not have the variable set and
hence the execution would fail.

Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
---
 ci/integration.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/ci/integration.sh b/ci/integration.sh
index 7bf3623809..e1f461a441 100644
--- a/ci/integration.sh
+++ b/ci/integration.sh
@@ -31,6 +31,15 @@ done
 # Make sure the default network is started on all platforms
 sudo virsh net-start default &>/dev/null || true
 
+# If we're running outside of GitLab, this variable will likely not exist, so
+# we need to define it and create the scratch directory
+if [ -z "$SCRATCH_DIR" ]
+then
+    SCRATCH_DIR="/var/tmp/scratch"
+    mkdir "$SCRATCH_DIR" 2>/dev/null
+fi
+
+rm -rf "$SCRATCH_DIR/*"
 cd "$SCRATCH_DIR"
 git clone --depth 1 https://gitlab.com/libvirt/libvirt-tck.git
 cd libvirt-tck
-- 
2.39.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux