From 5498bec3a1e3868258803382a92d31b4bc8014fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 26 Nov 2018 12:47:11 +0100 Subject: Fix badly written tests failing when LEGACY=1 --- test/core_app.mk | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'test/core_app.mk') diff --git a/test/core_app.mk b/test/core_app.mk index 53149fc..c7eb8fb 100644 --- a/test/core_app.mk +++ b/test/core_app.mk @@ -2042,8 +2042,8 @@ core-app-hrl-multiapps-include-lib: build clean $t test -f $(APP)/apps/my_app/src/use_blue.erl $t test -f $(APP)/apps/my_app/src/use_red.erl ifdef LEGACY - $t test -f $(APP)/apps/my_lib.app.src - $t test -f $(APP)/apps/my_app.app.src + $t test -f $(APP)/apps/my_lib/src/my_lib.app.src + $t test -f $(APP)/apps/my_app/src/my_app.app.src endif $i "Check that all build artifacts are removed" @@ -2147,8 +2147,8 @@ core-app-hrl-multiapps-include-lib-recursive: build clean $t test -f $(APP)/apps/my_app/src/use_blue.erl $t test -f $(APP)/apps/my_app/src/use_red.erl ifdef LEGACY - $t test -f $(APP)/apps/my_lib.app.src - $t test -f $(APP)/apps/my_app.app.src + $t test -f $(APP)/apps/my_lib/src/my_lib.app.src + $t test -f $(APP)/apps/my_app/src/my_app.app.src endif $i "Check that all build artifacts are removed" @@ -2376,16 +2376,16 @@ core-app-hrl-deps: build clean $t test -f $(APP)/apps/my_app/ebin/girl.beam $t test -f $(APP)/deps/cowlib/ebin/cowlib.app -# Applications in apps are compiled automatically but not added -# to the application resource file unless they are listed in LOCAL_DEPS. +ifndef LEGACY $i "Check that the application was compiled correctly" $t $(ERL) -pa $(APP)/apps/*/ebin/ -eval " \ ok = application:load(my_app), \ {ok, MyAppDeps} = application:get_key(my_app, applications), \ true = lists:member(cowlib, MyAppDeps), \ halt()" +endif -$i "Touch cowlib .hrl file; check that only required files are rebuilt" + $i "Touch cowlib .hrl file; check that only required files are rebuilt" $t printf "%s\n" \ $(APP)/apps/my_app/my_app.d \ $(APP)/apps/my_app/ebin/my_app.app \ @@ -2438,12 +2438,14 @@ $i "Touch cowlib .hrl file; check that only required files are rebuilt" $t test -f $(APP)/apps/my_app/ebin/girl.beam $t test -d $(APP)/deps/cowlib +ifndef LEGACY $i "Check that the application was compiled correctly" $t $(ERL) -pa $(APP)/apps/*/ebin/ -eval " \ ok = application:load(my_app), \ {ok, MyAppDeps} = application:get_key(my_app, applications), \ true = lists:member(cowlib, MyAppDeps), \ halt()" +endif core-app-hrl-include-loop: build clean @@ -2616,8 +2618,8 @@ core-app-hrl-multiapps-include-loop-define-protected: build clean $t test -f $(APP)/apps/my_app/src/use_blue.erl $t test -f $(APP)/apps/my_app/src/use_red.erl ifdef LEGACY - $t test -f $(APP)/apps/my_lib.app.src - $t test -f $(APP)/apps/my_app.app.src + $t test -f $(APP)/apps/my_lib/src/my_lib.app.src + $t test -f $(APP)/apps/my_app/src/my_app.app.src endif $i "Check that all build artifacts are removed" -- cgit v1.2.3