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

Test runtime loading of recursive dependency

parent 67c276dd
No related branches found
No related tags found
No related merge requests found
......@@ -169,8 +169,10 @@ def test_recursive_deps(wrappers):
cell_path = wrapper_a.path / "cellMods"
wrapper_a.add_var_to_config_module(f"{wrapper_b.name}_DEP_VERSION", "0.0.0+0")
wrapper_b.add_var_to_config_module(f"{wrapper_c.name}_DEP_VERSION", "0.0.0+0")
module_version = "0.0.0+0"
wrapper_b.add_var_to_config_module(f"{wrapper_c.name}_DEP_VERSION", module_version)
wrapper_a.add_var_to_config_module(f"{wrapper_b.name}_DEP_VERSION", module_version)
wrapper_c.add_var_to_makefile("HEADERS", f"{wrapper_c.name}.h")
(wrapper_c.module_dir / f"{wrapper_c.name}.h").touch()
......@@ -179,9 +181,21 @@ def test_recursive_deps(wrappers):
with open(wrapper_a.module_dir / f"{wrapper_a.name}.c", "w") as f:
f.write(f'#include "{wrapper_c.name}.h"')
rc, *_ = wrapper_c.run_make("cellinstall", cell_path=cell_path)
rc, *_ = wrapper_c.run_make(
"cellinstall", module_version=module_version, cell_path=cell_path
)
assert rc == 0
rc, *_ = wrapper_b.run_make(
"cellinstall", module_version=module_version, cell_path=cell_path
)
assert rc == 0
rc, *_ = wrapper_b.run_make("cellinstall", cell_path=cell_path)
rc, *_ = wrapper_a.run_make(
"cellinstall", module_version=module_version, cell_path=cell_path
)
assert rc == 0
rc, *_ = wrapper_a.run_make("cellinstall", cell_path=cell_path)
rc, outs, _ = run_ioc_get_output(
wrapper_a.name, module_version, wrapper_a.path / "cellMods"
)
assert rc == 0
assert f"Loaded {wrapper_c.name} version {module_version}" in outs
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