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

Added test to catch missing dependent versions

parent ed5cc7a2
No related branches found
No related tags found
1 merge request!95E3-894: Fix issue where non-existent versions would cause the build to hang
......@@ -10,6 +10,9 @@ MODULE_VERSION = "0.0.0+0"
MODULE_VERSION_NO_BUILD = "0.0.0"
RE_MISSING_FILE = "No rule to make target [`']{filename}'"
RE_MISSING_VERSION = (
"REQUIRED module [`']{module}' version [`']{version}' does not exist."
)
def create_patch_file(path, desc):
......@@ -97,6 +100,27 @@ def test_missing_requirement(wrapper):
assert 'Invalid dependency "FOO_DEP_VERSION"; pruning' in errs
def test_missing_dependent_version(wrappers):
wrapper_dep = wrappers.get()
wrapper_main = wrappers.get()
cell_path = wrapper_main.path / "cellMods"
rc, *_ = wrapper_dep.run_make("cellinstall", cell_path=cell_path)
assert rc == 0
missing_version = "not_a_real_version"
wrapper_main.add_var_to_config_module(
f"{wrapper_dep.name}_DEP_VERSION", missing_version
)
rc, _, errs = wrapper_main.run_make("cellbuild")
assert rc == 2
assert re.search(
RE_MISSING_VERSION.format(module=wrapper_dep.name, version=missing_version),
errs,
)
def test_header_install_location(wrapper):
subdir = wrapper.module_dir / "db" / "subdir"
subdir.mkdir(parents=True)
......
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