diff options
Diffstat (limited to 'lib/diameter/test/Makefile')
-rw-r--r-- | lib/diameter/test/Makefile | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/lib/diameter/test/Makefile b/lib/diameter/test/Makefile index 866d135bd9..061f0bcbef 100644 --- a/lib/diameter/test/Makefile +++ b/lib/diameter/test/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2010-2012. All Rights Reserved. +# Copyright Ericsson AB 2010-2013. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in @@ -56,26 +56,28 @@ DATA_DIRS = $(sort $(dir $(DATA))) ERL_COMPILE_FLAGS += +warn_export_vars \ +warn_unused_vars \ -I ../include \ - -I ../src/gen + -I ../src/gen \ + $(STRICT_FLAGS) # ---------------------------------------------------- # Targets # ---------------------------------------------------- +all debug opt: $(TARGET_FILES) + +strict: + $(MAKE) opt STRICT_FLAGS=-Werror + # Require success ... -all: opt +run: $(SUITES) # ... or not. any: opt $(MAKE) -i $(SUITES) -run: $(SUITES) - -debug opt: $(TARGET_FILES) - clean: rm -f $(TARGET_FILES) - rm -f depend.mk + rm -f depend.mk coverspec realclean: clean rm -rf log @@ -101,7 +103,10 @@ help: @echo " Compile all test suites." @echo @echo " run:" - @echo " Compile and run all test suites." + @echo " Compile and run all test suites, stop on failure." + @echo + @echo " any:" + @echo " Compile and run all test suites, ignore any failures." @echo @echo " $(SUITES):" @echo " Compile and run a specific test suite." @@ -113,7 +118,7 @@ help: @echo " Echo some relevant variables." @echo ======================================== -.PHONY: all any run clean debug docs help info opt realclean +.PHONY: all any run clean debug docs help info opt realclean strict # ---------------------------------------------------- # Special Targets @@ -131,10 +136,21 @@ $(SUITES): log opt | awk '{print} / FAILED /{rc=1} END{exit rc}' rc=0 # Shorter in sed but requires a GNU extension (ie. Q). +cover: log opt coverspec + $(ERL) -noinput \ + -pa $(realpath ../ebin) \ + -sname diameter_cover \ + -s diameter_ct cover \ + -s init stop \ + | awk '{print} / FAILED /{rc=1} END{exit rc}' rc=0 + +coverspec: diameter.cover + sed -f [email protected] $< > $@ + log: mkdir $@ -.PHONY: $(SUITES) +.PHONY: $(SUITES) cover # ---------------------------------------------------- # Release Targets |