summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/topotests/analyze.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/topotests/analyze.py b/tests/topotests/analyze.py
index 360c9cf1e9..9c9bfda1ed 100755
--- a/tests/topotests/analyze.py
+++ b/tests/topotests/analyze.py
@@ -161,6 +161,8 @@ def main():
logging.critical('No "/tmp/topotests" directory to save')
sys.exit(1)
subprocess.run(["mv", "/tmp/topotests", args.results])
+ if "SUDO_USER" in os.environ:
+ subprocess.run(["chown", "-R", os.environ["SUDO_USER"], args.results])
# # Old location for results
# if os.path.exists("/tmp/topotests.xml", args.results):
# subprocess.run(["mv", "/tmp/topotests.xml", args.results])