From e7e855feb586ad26927d77907071e7e026357524 Mon Sep 17 00:00:00 2001
From: Christian Kuhn <lolli@schwarzbu.ch>
Date: Sun, 29 Aug 2021 21:51:30 +0200
Subject: [PATCH] [BUGFIX] Mitigate docker shenanigans using runTests.sh
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Resolves: #95030
Releases: master, 10.4
Change-Id: Ifc27ab7065dd7e9711b9770603bcfab8e70b06f0
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70816
Tested-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
---
 Build/Scripts/runTests.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Build/Scripts/runTests.sh b/Build/Scripts/runTests.sh
index 6ba681b56b19..5c343ecd91c2 100755
--- a/Build/Scripts/runTests.sh
+++ b/Build/Scripts/runTests.sh
@@ -643,6 +643,11 @@ case ${TEST_SUITE} in
                 SUITE_EXIT_CODE=$?
                 ;;
             sqlite)
+                # sqlite has a tmpfs as typo3temp/var/tests/functional-sqlite-dbs/
+                # Since docker is executed as root (yay!), the path to this dir is owned by
+                # root if docker creates it. Thank you, docker. We create the path beforehand
+                # to avoid permission issues on host filesystem after execution.
+                mkdir -p ${CORE_ROOT}/typo3temp/var/tests/functional-sqlite-dbs/
                 docker-compose run prepare_functional_sqlite
                 docker-compose run functional_sqlite
                 SUITE_EXIT_CODE=$?
-- 
GitLab