Skip to content

Commit

Permalink
Merge pull request #289 from amanzi/docker_executable_fix
Browse files Browse the repository at this point in the history
Updated test_manager.py to allow docker executables to be run
  • Loading branch information
jd-moulton authored Jan 21, 2025
2 parents e5becc0 + 96a8fe3 commit 8e5ec04
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/testing/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def _run_test(self, test_name, dry_run, status, testlog):
fid.write(self._version)

if "metsi/ats" in self._executable:
command.append("-v " + test_directory + ":/home/amanzi_usr/work:delegated")
command.append("-v " + test_directory + ":/home/amanzi_usr/work:cached")
command.append("-w " + "/home/amanzi_usr/work")
command.append(self._executable)
command.append("/bin/sh -c 'cd " + self.dirname() + ";")
Expand Down Expand Up @@ -1467,13 +1467,13 @@ def check_for_docker_image(docker_image):
pwd = os.path.abspath(os.getcwd())
command=[]
command.append("docker run --rm")
command.append("-v"+pwd+":/home/amanzi_usr/work:delegated")
command.append("-v "+pwd+":/home/amanzi_usr/work:cached")
command.append(docker_image)
command.append("ats --print_version")
command.append("ats --version")
print(" ".join(command))

output=subprocess.run(" ".join(command), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
if ("ATS Version" not in output.stdout):
if ("ATS version" not in output.stdout):
raise RuntimeError("ERROR: ATS did not run correctly in Docker. \n")
else:
print(output.stdout)
Expand Down

0 comments on commit 8e5ec04

Please sign in to comment.