Merge pull request #13566 from LabNConsulting/chopps/analyze-improvement

tests: have ananlyze.py `chown -R $SUDO_USER` when copying results
This commit is contained in:
Donald Sharp 2023-05-21 20:22:22 -04:00 committed by GitHub
commit 697e7e5174
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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])