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

Removed $MODULE_VERSION from patch dir

parent 1219dd20
No related branches found
No related tags found
1 merge request!87E3-847: Apply all the patches
Pipeline #113664 passed with warnings
...@@ -13,7 +13,7 @@ git submodule update --remote --merge $@/ ...@@ -13,7 +13,7 @@ git submodule update --remote --merge $@/
endef endef
define patch_site define patch_site
patches=$$(ls $(TOP)/patch/Site/$(E3_MODULE_VERSION)/*.p0.patch 2> /dev/null); \ patches=$$(ls $(TOP)/patch/Site/*.p0.patch 2> /dev/null); \
if [ -n "$$patches" ]; then \ if [ -n "$$patches" ]; then \
for i in $$patches; do \ for i in $$patches; do \
printf "\nPatching %s with the file : %s\n" "$(E3_MODULE_SRC_PATH)" "$$i"; \ printf "\nPatching %s with the file : %s\n" "$(E3_MODULE_SRC_PATH)" "$$i"; \
...@@ -25,7 +25,7 @@ fi ...@@ -25,7 +25,7 @@ fi
endef endef
define patch_revert_site define patch_revert_site
patches=$$(ls $(TOP)/patch/Site/$(E3_MODULE_VERSION)/*.p0.patch 2> /dev/null); \ patches=$$(ls $(TOP)/patch/Site/*.p0.patch 2> /dev/null); \
if [ -n "$$patches" ]; then \ if [ -n "$$patches" ]; then \
for i in $$patches; do\ for i in $$patches; do\
printf "\nReverting applied patch %s with the file : %s\n" "$(E3_MODULE_SRC_PATH)" "$$i"; \ printf "\nReverting applied patch %s with the file : %s\n" "$(E3_MODULE_SRC_PATH)" "$$i"; \
......
...@@ -36,18 +36,8 @@ def test_patch(wrapper): ...@@ -36,18 +36,8 @@ def test_patch(wrapper):
f.write(db_file_contents) f.write(db_file_contents)
patch_dir = wrapper.path / "patch" / "Site" patch_dir = wrapper.path / "patch" / "Site"
create_patch_file(patch_dir / MODULE_VERSION / "apply.p0.patch", "OK") create_patch_file(patch_dir / "apply.p0.patch", "OK")
create_patch_file( create_patch_file(patch_dir / MODULE_VERSION / "do-not-apply.p0.patch", "Bad")
patch_dir / MODULE_VERSION_NO_BUILD / "dont-apply.p0.patch", "Bad"
)
create_patch_file(patch_dir / (MODULE_VERSION + "-dont-apply.p0.patch"), "Bad")
rc, outs, _ = wrapper.run_make(
"init",
module_version=MODULE_VERSION,
)
assert rc == 0
assert "You are in the local source mode" in outs
rc, _, _ = wrapper.run_make("patch", module_version=MODULE_VERSION) rc, _, _ = wrapper.run_make("patch", module_version=MODULE_VERSION)
assert rc == 0 assert rc == 0
...@@ -65,6 +55,15 @@ def test_patch(wrapper): ...@@ -65,6 +55,15 @@ def test_patch(wrapper):
assert any((wrapper.path / "cellMods").glob("**/*.db")) assert any((wrapper.path / "cellMods").glob("**/*.db"))
def test_local_module(wrapper):
rc, outs, _ = wrapper.run_make(
"init",
module_version=MODULE_VERSION,
)
assert rc == 0
assert "You are in the local source mode" in outs
def test_missing_dbd_file(wrapper): def test_missing_dbd_file(wrapper):
wrapper.add_var_to_makefile("DBDS", "nonexistent.dbd") wrapper.add_var_to_makefile("DBDS", "nonexistent.dbd")
rc, _, errs = wrapper.run_make("build") rc, _, errs = wrapper.run_make("build")
......
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