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

Added test that local source has been deprecated

parent 11ae3946
No related branches found
No related tags found
1 merge request!42E3-311: Check that wrappers have the correct RULES file
...@@ -14,7 +14,12 @@ def wrapper(tmpdir, request): ...@@ -14,7 +14,12 @@ def wrapper(tmpdir, request):
Note that a number of necessary variables are expected to be present in the environment Note that a number of necessary variables are expected to be present in the environment
""" """
wrapper_dir = Path(tmpdir / "wrapper") wrapper_dir = Path(tmpdir / "wrapper")
test_dir = wrapper_dir / TEST_MODULE_NAME TEST_MODULE_PATH = (
TEST_MODULE_NAME
if "E3_MODULE_SRC_PATH" not in request.param
else request.param["E3_MODULE_SRC_PATH"]
)
test_dir = wrapper_dir / TEST_MODULE_PATH
test_dir.mkdir(parents=True) test_dir.mkdir(parents=True)
config_file = """ config_file = """
...@@ -43,6 +48,7 @@ HEADERS += {headers} ...@@ -43,6 +48,7 @@ HEADERS += {headers}
make_vars.update(**request.param) make_vars.update(**request.param)
with open(wrapper_dir / f"{TEST_MODULE_NAME}.Makefile", "w") as f: with open(wrapper_dir / f"{TEST_MODULE_NAME}.Makefile", "w") as f:
f.write(module_makefile.format(**make_vars)) f.write(module_makefile.format(**make_vars))
with open(wrapper_dir / TEST_MODULE_NAME / "test.dbd", "w") as f:
with open(wrapper_dir / TEST_MODULE_PATH / "test.dbd", "w") as f:
pass pass
yield wrapper_dir yield wrapper_dir
import pytest
from .utils import run_make
@pytest.mark.parametrize(
"wrapper",
[{"E3_MODULE_SRC_PATH": "test-loc"}],
indirect=True,
)
def test_loc(wrapper):
rc, _, errs = run_make(wrapper, "build", E3_MODULE_SRC_PATH="test-loc")
assert rc == 2
assert 'DEPRECATED: Local source mode "-loc" has being deprecated' in errs.decode(
"utf-8"
)
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