diff options
author | Loïc Hoguin <[email protected]> | 2025-06-19 16:19:34 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2025-06-19 16:19:34 +0200 |
commit | ce2a1ba5ed37586dacbf1def01f23a9f550767e1 (patch) | |
tree | 3fed4908c67d588e2202d0e11d9c3e2ea9398d39 /test | |
parent | e13b4c71d764cc92a1e5a92f5f2dd1c1f59b4a3c (diff) | |
download | erlang.mk-ce2a1ba5ed37586dacbf1def01f23a9f550767e1.tar.gz erlang.mk-ce2a1ba5ed37586dacbf1def01f23a9f550767e1.tar.bz2 erlang.mk-ce2a1ba5ed37586dacbf1def01f23a9f550767e1.zip |
Fix Mix autopatch being enabled by default
By default Erlang projects should not have Elixir enabled.
Diffstat (limited to 'test')
-rw-r--r-- | test/core_elixir.mk | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/test/core_elixir.mk b/test/core_elixir.mk index 6a6997b..c2cec70 100644 --- a/test/core_elixir.mk +++ b/test/core_elixir.mk @@ -117,6 +117,22 @@ core-elixir-disable-autopatch-fail: init $i "Building the application should fail" $t ! $(MAKE) -C $(APP) $v +core-elixir-disable-autopatch-erlang-mk: init + + $i "Bootstrap a new OTP library named $(APP)" + $t mkdir $(APP)/ + $t cp ../erlang.mk $(APP)/ + $t $(MAKE) -C $(APP) -f erlang.mk bootstrap-lib $v + + $i "Add Jose to the list of dependencies" + $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = jose\ndep_jose = git https://github.com/potatosalad/erlang-jose main\n"}' $(APP)/Makefile + + $i "Disable Elixir in the Makefile" + $t perl -ni.bak -e 'print;if ($$.==1) {print "ELIXIR = disable\n"}' $(APP)/Makefile + + $i "Building the application should work as Jose is Erlang.mk-compatible" + $t $(MAKE) -C $(APP) $v + core-elixir-disable-autopatch-make: init $i "Bootstrap a new OTP library named $(APP)" @@ -145,13 +161,26 @@ core-elixir-disable-autopatch-rebar3: init $t cp ../erlang.mk $(APP)/ $t $(MAKE) -C $(APP) -f erlang.mk bootstrap-lib $v - $i "Add Jose to the list of dependencies" - $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = jose\ndep_jose = git https://github.com/potatosalad/erlang-jose main\n"}' $(APP)/Makefile + $i "Add OpenTelemetry_API to the list of dependencies" + $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = opentelemetry_api\ndep_opentelemetry_api = hex 1.3.0\n"}' $(APP)/Makefile $i "Disable Elixir in the Makefile" $t perl -ni.bak -e 'print;if ($$.==1) {print "ELIXIR = disable\n"}' $(APP)/Makefile - $i "Building the application should work as Jose is Rebar3-compatible" + $i "Building the application should work as OpenTelemetry_API is Rebar3-compatible" + $t $(MAKE) -C $(APP) $v + +core-elixir-disable-by-default-autopatch-rebar3: init + + $i "Bootstrap a new OTP library named $(APP)" + $t mkdir $(APP)/ + $t cp ../erlang.mk $(APP)/ + $t $(MAKE) -C $(APP) -f erlang.mk bootstrap-lib $v + + $i "Add OpenTelemetry_API to the list of dependencies" + $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = opentelemetry_api\ndep_opentelemetry_api = hex 1.3.0\n"}' $(APP)/Makefile + + $i "Building the application should work as OpenTelemetry_API is Rebar3-compatible" $t $(MAKE) -C $(APP) $v core-elixir-from-dep: init |