From c7d7280fa8f2b91cca2517b1bdab4b40603b9bd6 Mon Sep 17 00:00:00 2001 From: David Steele Date: Mon, 8 Feb 2021 16:36:38 -0500 Subject: [PATCH] Ensure test user has permissions before removing test files. This allows files to be deleted even when tests have limited the permissions. --- test/test.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test.pl b/test/test.pl index 1139f3011..34a8ff9f1 100755 --- a/test/test.pl +++ b/test/test.pl @@ -642,7 +642,8 @@ eval } executeTest( - "rm -rf ${strTestPath}/temp ${strTestPath}/test-* ${strTestPath}/data-*" . ($bDev ? '' : " ${strTestPath}/gcov-*")); + "chmod 700 -R ${strTestPath}/test-* 2>&1 || true && rm -rf ${strTestPath}/temp ${strTestPath}/test-*" . + " ${strTestPath}/data-*" . ($bDev ? '' : " ${strTestPath}/gcov-*")); $oStorageTest->pathCreate("${strTestPath}/temp", {strMode => '0770', bIgnoreExists => true, bCreateParent => true}); # Remove old lcov dirs -- do it this way so the dirs stay open in finder/explorer, etc.