mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-04 09:43:08 +02:00
Improve file removal performed after each unit test.
The rm would miss files beginning with a dot which are being used going forward for the versioning test driver. Instead use find since it will delete all files.
This commit is contained in:
parent
f6aaa3672b
commit
4eab64fcd9
@ -154,8 +154,8 @@ testBegin(const char *name)
|
||||
// Clear out the test directory so the next test starts clean
|
||||
char buffer[2048];
|
||||
snprintf(
|
||||
buffer, sizeof(buffer), "%schmod -R 700 %s/" "* > /dev/null 2>&1;%srm -rf %s/" "*", testContainer() ? "sudo " : "",
|
||||
testPath(), testContainer() ? "sudo " : "", testPath());
|
||||
buffer, sizeof(buffer), "%schmod -R 700 %s/" "* > /dev/null 2>&1;%sfind %s -mindepth 1 -delete",
|
||||
testContainer() ? "sudo " : "", testPath(), testContainer() ? "sudo " : "", testPath());
|
||||
|
||||
if (system(buffer) != 0)
|
||||
{
|
||||
@ -166,8 +166,8 @@ testBegin(const char *name)
|
||||
|
||||
// Clear out the data directory so the next test starts clean
|
||||
snprintf(
|
||||
buffer, sizeof(buffer), "%schmod -R 700 %s/" "* > /dev/null 2>&1;%srm -rf %s/" "*", testContainer() ? "sudo " : "",
|
||||
hrnPath(), testContainer() ? "sudo " : "", hrnPath());
|
||||
buffer, sizeof(buffer), "%schmod -R 700 %s/" "* > /dev/null 2>&1;%sfind %s -mindepth 1 -delete",
|
||||
testContainer() ? "sudo " : "", hrnPath(), testContainer() ? "sudo " : "", hrnPath());
|
||||
|
||||
if (system(buffer) != 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user