summaryrefslogtreecommitdiffhomepage
path: root/test/unit/utils.py
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2022-12-09 14:17:49 +0000
committerAndrei Zeliankou <zelenkov@nginx.com>2022-12-09 14:17:49 +0000
commit55b9a5307d705da91d3ef317639356c748853a7c (patch)
treec54f3375f0b1b233e5c28a1ab9d6199c84314ca1 /test/unit/utils.py
parente70653c76606293e3687b05bbd8b5c06d700fb8b (diff)
downloadunit-55b9a5307d705da91d3ef317639356c748853a7c.tar.gz
unit-55b9a5307d705da91d3ef317639356c748853a7c.tar.bz2
Tests: fixed tests to run as privileged user.
Diffstat (limited to '')
-rw-r--r--test/unit/utils.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/unit/utils.py b/test/unit/utils.py
index 43aaa81b..f9e9d08a 100644
--- a/test/unit/utils.py
+++ b/test/unit/utils.py
@@ -12,9 +12,15 @@ def public_dir(path):
for root, dirs, files in os.walk(path):
for d in dirs:
- os.chmod(os.path.join(root, d), 0o777)
+ try:
+ os.chmod(os.path.join(root, d), 0o777)
+ except FileNotFoundError:
+ pass
for f in files:
- os.chmod(os.path.join(root, f), 0o777)
+ try:
+ os.chmod(os.path.join(root, f), 0o777)
+ except FileNotFoundError:
+ pass
def waitforfiles(*files, timeout=50):