From f293a6f5627be2b1d45454a8b7255d42aeebdfae Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Fri, 21 Oct 2011 11:25:28 +0200 Subject: Target cleanup in test/Makefile all = opt is now default target and run executes testsuites. Note that parallel execution is unproblematic since each suite target starts a node with a suite-specific name. --- lib/diameter/test/Makefile | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'lib/diameter/test/Makefile') diff --git a/lib/diameter/test/Makefile b/lib/diameter/test/Makefile index 69bcabbfbb..83ba147fec 100644 --- a/lib/diameter/test/Makefile +++ b/lib/diameter/test/Makefile @@ -65,9 +65,11 @@ ERL_COMPILE_FLAGS += +warn_export_vars \ # Targets # ---------------------------------------------------- -all: $(SUITES) +all: opt -beam tests debug opt: $(TARGET_FILES) +run: $(SUITES) + +debug opt: $(TARGET_FILES) clean: rm -f $(TARGET_FILES) @@ -94,22 +96,22 @@ help: @echo "Useful targets:" @echo @echo " all:" + @echo " Compile all test suites." + @echo + @echo " run:" @echo " Compile and run all test suites." @echo @echo " $(SUITES):" @echo " Compile and run a specific test suite." @echo - @echo " beam:" - @echo " Compile all test-code." - @echo @echo " clean | realclean:" @echo " Remove generated files." @echo @echo " info:" - @echo " Echo some interesting variables." + @echo " Echo some relevant variables." @echo ======================================== -.PHONY: all beam clean debug docs help info opt realclean tests +.PHONY: all run clean debug docs help info opt realclean # ---------------------------------------------------- # Special Targets @@ -118,12 +120,12 @@ help: # Exit with a non-zero status if the output looks to indicate failure. # diameter_ct:run/1 itself can't tell (it seems). The absolute -pa is # because ct will change directories. -$(SUITES): log tests +$(SUITES): log opt $(ERL) -noshell \ - -pa $(realpath ../ebin) \ - -sname diameter_test_$@ \ - -s diameter_ct run diameter_$@_SUITE \ - -s init stop \ + -pa $(realpath ../ebin) \ + -sname diameter_test_$@ \ + -s diameter_ct run diameter_$@_SUITE \ + -s init stop \ | awk '1{rc=0} {print} / FAILED /{rc=1} END{exit rc}' # Shorter in sed but requires a GNU extension (ie. Q). -- cgit v1.2.3