From 9d37c957d4a29b8d46d6a2606a2f22f29e629a94 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Mon, 7 Sep 2020 20:20:39 +0100
Subject: [PATCH] CI: Redirect ${TMPDIR} into build directory

We're getting test failures in which _srt_rm_rf() fails to remove a
directory because the directory is non-empty, even though we're
deleting depth-first, so it really ought to be empty. One theory
is that this is something to do with tmpfs.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 debian/gitlab-ci.yml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/debian/gitlab-ci.yml b/debian/gitlab-ci.yml
index f0dedd93c..c63d3da0f 100644
--- a/debian/gitlab-ci.yml
+++ b/debian/gitlab-ci.yml
@@ -41,6 +41,11 @@ variables:
     # Set non-empty to allow
     CI_ALLOW_MISSING_SOURCES: ''
 
+    # Work around _srt_rm_rf behaving oddly on overlayfs (?)
+    STEAM_CI_INSTALL_SCRIPT: |
+        mkdir -p "${TMPDIR}"
+    TMPDIR: "${CI_PROJECT_DIR}/debian/tmpdir"
+
 stages:
     - build
     - test
@@ -135,6 +140,7 @@ autopkgtest:
         - build
     variables:
         STEAM_CI_INSTALL_SCRIPT: |
+            mkdir -p "${TMPDIR}"
             # Workaround for the build regression described in !88
             apt-get -y remove libsteam-runtime-tools-0-helpers
 
-- 
GitLab