summaryrefslogtreecommitdiff
path: root/tests/topotests/analyze.py
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2023-05-21 20:22:22 -0400
committerGitHub <noreply@github.com>2023-05-21 20:22:22 -0400
commit697e7e5174a8cc4c1e40a1e4b13680d8daa735d7 (patch)
treefab47912e78ab847b40896fef13afb347512a989 /tests/topotests/analyze.py
parent57a2ff8b8d951cfb16890828786c1de520d5b9a2 (diff)
parent47e52c47d482eb1186cf28b2a6231a089c5eed58 (diff)
Merge pull request #13566 from LabNConsulting/chopps/analyze-improvement
tests: have ananlyze.py `chown -R $SUDO_USER` when copying results
Diffstat (limited to 'tests/topotests/analyze.py')
-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])