tests - change permissions as root

This commit is contained in:
florian 2022-07-14 14:33:04 +02:00
parent 2780ee190d
commit 424b37bec9
2 changed files with 5 additions and 1 deletions

View file

@ -26,7 +26,7 @@ class Test(ABC) :
try :
if not isdir("/tmp/bw-data") :
mkdir("/tmp/bw-data")
chmod("/tmp/bw-data", 0o777)
run("sudo chmod 777 /tmp/bw-data", shell=True)
rm_dirs = ["configs", "plugins", "www"]
for rm_dir in rm_dirs :
if isdir(rm_dir) :

View file

@ -11,6 +11,7 @@ path.append(getcwd() + "/tests")
from Test import Test
from DockerTest import DockerTest
from AutoconfTest import AutoconfTest
from logger import log
if len(argv) != 2 :
@ -28,6 +29,9 @@ end_fun = None
if test_type == "docker" :
ret = DockerTest.init()
end_fun = DockerTest.end
elif test_type == "autoconf" :
ret = AutoconfTest.init()
end_fun = AutoconfTest.end
if not ret :
log("TESTS", "", "Test.init() failed")
exit(1)