tests - list example_data as root

This commit is contained in:
bunkerity 2022-07-20 15:37:29 +02:00
parent c5526ef2fd
commit 6d06a32cc9
No known key found for this signature in database
GPG Key ID: 3D80806F12602A7C
5 changed files with 11 additions and 8 deletions

View File

@ -6,8 +6,8 @@ if [ $(id -u) -ne 0 ] ; then
fi
chown -R 101:101 bw-data
find ./bw-data/ -type f -exec chmod 0644 {} \;
find ./bw-data/ -type d -exec chmod 0755 {} \;
find ./bw-data/ -type f -exec chmod 0640 {} \;
find ./bw-data/ -type d -exec chmod 0750 {} \;
chown -R 101:33 ./bw-data/www
find ./bw-data/www -type f -exec chmod 0664 {} \;
find ./bw-data/www -type d -exec chmod 0775 {} \;
find ./bw-data/www -type f -exec chmod 0660 {} \;
find ./bw-data/www -type d -exec chmod 0770 {} \;

View File

@ -6,4 +6,5 @@ if [ $(id -u) -ne 0 ] ; then
fi
chown -R root:101 bw-data
chmod -R 770 bw-data
find ./bw-data -type f -exec chmod 0660 {} \;
find ./bw-data -type d -exec chmod 0770 {} \;

View File

@ -90,7 +90,8 @@ class AutoconfTest(Test) :
if proc.returncode != 0 :
raise(Exception("setup-autoconf failed"))
if isdir(example_data) :
for cp_dir in listdir(example_data) :
proc = run("sudo ls " + example_data, shell=True, capture_output=True)
for cp_dir in proc.stdout.decode().splitlines() :
if isdir(join(example_data, cp_dir)) :
if isdir(join("/tmp/bw-data", cp_dir)) :
run("sudo rm -rf " + join("/tmp/bw-data", cp_dir), shell=True)

View File

@ -49,7 +49,8 @@ class DockerTest(Test) :
if proc.returncode != 0 :
raise(Exception("setup-docker failed"))
if isdir(example_data) :
for cp_dir in listdir(example_data) :
proc = run("sudo ls " + example_data, shell=True, capture_output=True)
for cp_dir in proc.stdout.decode().splitlines() :
if isdir(join(example_data, cp_dir)) :
if isdir(join("/tmp/bw-data", cp_dir)) :
run("sudo rm -rf " + join("/tmp/bw-data", cp_dir), shell=True)

View File

@ -18,7 +18,7 @@ class Test(ABC) :
self.__kind = kind
self.__timeout = timeout
self.__tests = tests
log("TEST", "", "instiantiated with " + str(len(tests)) + " tests and timeout of " + str(timeout) + "s")
log("TEST", "", "instiantiated with " + str(len(tests)) + " tests and timeout of " + str(timeout) + "s for " + self._name)
# Class method
# called once before running all the different tests for a given integration