Skip to content

Commit

Permalink
base the system test on ioc-template-example
Browse files Browse the repository at this point in the history
Makes for faster test and decouples from arbitrary other
repo
  • Loading branch information
gilesknap committed May 17, 2024
1 parent b414a3c commit 06d8e97
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,24 @@ def test_container_build_and_run(tmp_path: Path):
"""
make sure that a container build works and that the container can run an IOC
"""
ils = "ioc-lakeshore340"
ioc = "ioc-template-example"

# get the lakeshore generic container source
os.chdir(tmp_path)
run_command(f"git clone https://github.com/epics-containers/{ils}")
run_command(f"git clone https://github.com/epics-containers/{ioc}")

# patch the dockerfile to include this version of ibek
ibek = Path(__file__).parent.parent
shutil.copytree(ibek, tmp_path / ils / "ibek")
docker = tmp_path / ils / "Dockerfile"
shutil.copytree(ibek, tmp_path / ioc / "ibek")
docker = tmp_path / ioc / "Dockerfile"
text = docker.read_text()
this_ibek = "COPY ibek ibek\nRUN pip install ./ibek"
text = re.sub(r"RUN pip install.*\n", this_ibek, text)
docker.write_text(text)
print(text)

# build the container with latest ibek and latest ibek-support
os.chdir(ils)
os.chdir(ioc)
run_command("git submodule update --init")
run_command("cd ibek-support && git checkout main")
run_command("./build")
Expand Down

0 comments on commit 06d8e97

Please sign in to comment.