diff options
author | Loïc Hoguin <essen@ninenines.eu> | 2015-09-18 18:55:27 +0200 |
---|---|---|
committer | Loïc Hoguin <essen@ninenines.eu> | 2015-09-18 18:55:27 +0200 |
commit | 8dec2350a3bc9cf77c6b622d2493230dd8b501b8 (patch) | |
tree | bad111295d9edc593129dd826054618e003dc669 | |
parent | efa8ba96cd3566f0cbfe66a37f2bd72abc7f07d8 (diff) | |
download | erlang.mk-8dec2350a3bc9cf77c6b622d2493230dd8b501b8.tar.gz erlang.mk-8dec2350a3bc9cf77c6b622d2493230dd8b501b8.tar.bz2 erlang.mk-8dec2350a3bc9cf77c6b622d2493230dd8b501b8.zip |
Fix test about auto adding an id key when LEGACY=1
-rw-r--r-- | test/core_app.mk | 11 |
1 files changed, 11 insertions, 0 deletions
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 |