From 8dec2350a3bc9cf77c6b622d2493230dd8b501b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 18 Sep 2015 18:55:27 +0200 Subject: Fix test about auto adding an id key when LEGACY=1 --- test/core_app.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') diff --git a/test/core_app.mk b/test/core_app.mk index 953bca3..55bf7b2 100644 --- a/test/core_app.mk +++ b/test/core_app.mk @@ -150,11 +150,22 @@ core-app-auto-git-id: build clean-core-app-auto-git-id $i "Build the application" $t $(MAKE) -C $(APP) $v +ifdef LEGACY +# Legacy replaces {id, "git"} always regardless of built as a dependency. + $i "Check that the generated .app file has an id key" + $t $(ERL) -pa $(APP)/ebin/ -eval " \ + ok = application:start($(APP)), \ + {ok, ID} = application:get_key($(APP), id), \ + true = ID =/= [], \ + halt()" +else +# If there is no .app.src though, only fill in id when built as a dependency. $i "Check that the generated .app file has no id key" $t $(ERL) -pa $(APP)/ebin/ -eval " \ ok = application:start($(APP)), \ {ok, []} = application:get_key($(APP), id), \ halt()" +endif $i "Clean the application" $t $(MAKE) -C $(APP) clean $v -- cgit v1.2.3