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

Add failing test for multiply recursive header includes

parent 40c1187f
No related branches found
No related tags found
1 merge request!127E3-1167: Fix failing doubly-recursive dependency
......@@ -435,21 +435,27 @@ def test_recursive_header_include(wrappers):
wrapper_a = wrappers.get()
wrapper_b = wrappers.get()
wrapper_c = wrappers.get()
wrapper_d = wrappers.get()
cell_path = wrapper_a.path / "cellMods"
module_version = "0.0.0+0"
wrapper_c.add_var_to_config_module(f"{wrapper_d.name}_DEP_VERSION", module_version)
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_module_makefile("HEADERS", f"{wrapper_c.name}.h")
(wrapper_c.module_dir / f"{wrapper_c.name}.h").touch()
wrapper_d.add_var_to_module_makefile("HEADERS", f"{wrapper_d.name}.h")
(wrapper_d.module_dir / f"{wrapper_d.name}.h").touch()
wrapper_a.add_var_to_module_makefile("SOURCES", f"{wrapper_a.name}.c")
with open(wrapper_a.module_dir / f"{wrapper_a.name}.c", "w") as f:
f.write(f'#include "{wrapper_c.name}.h"')
f.write(f'#include "{wrapper_d.name}.h"')
rc, *_ = wrapper_d.run_make(
"cellinstall", module_version=module_version, cell_path=cell_path
)
assert rc == 0
rc, *_ = wrapper_c.run_make(
"cellinstall", module_version=module_version, cell_path=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