Skip to content
Snippets Groups Projects
Commit c58e08f8 authored by Simon Rose's avatar Simon Rose
Browse files

Use Path.touch() instead of open()

parent c7bf9125
No related branches found
No related tags found
1 merge request!67E3-665: Add tests for KEEP_HEADER_SUBDIRS
Pipeline #101085 passed
...@@ -124,11 +124,10 @@ def test_header_install_location(wrapper): ...@@ -124,11 +124,10 @@ def test_header_install_location(wrapper):
f.write(f"HEADERS += db/subdir/header.{ext}\n") f.write(f"HEADERS += db/subdir/header.{ext}\n")
f.write("KEEP_HEADER_SUBDIRS += db\n") f.write("KEEP_HEADER_SUBDIRS += db\n")
for extension in extensions: for ext in extensions:
with open(subdir / f"header.{extension}", "w") as f: (subdir / f"header.{ext}").touch()
pass
rc, _, _ = run_make(wrapper, "cellinstall") rc, *_ = run_make(wrapper, "cellinstall")
assert rc == 0 assert rc == 0
cell_path = get_env_var(wrapper, "E3_MODULES_INSTALL_LOCATION") cell_path = get_env_var(wrapper, "E3_MODULES_INSTALL_LOCATION")
......
...@@ -67,7 +67,7 @@ def get_env_var(path, var: str): ...@@ -67,7 +67,7 @@ def get_env_var(path, var: str):
for line in out.split("\n"): for line in out.split("\n"):
if line.startswith(var): if line.startswith(var):
return line.split("=")[1].strip() return line.split("=")[1].strip()
assert False return ""
def run_ioc_get_output(version, cell_path): def run_ioc_get_output(version, cell_path):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment