Skip to content

Commit

Permalink
Don't install Emakefile at release_tests
Browse files Browse the repository at this point in the history
Emakefile contained compile flags that caused compilation of suites
to fail in some cases. common_test will generate an Emakefile and
diameter has no need for one of its own.
  • Loading branch information
Anders Svensson committed Sep 28, 2011
1 parent 162c0d3 commit 7bbb717
Showing 1 changed file with 11 additions and 56 deletions.
67 changes: 11 additions & 56 deletions lib/diameter/test/Makefile
Expand Up @@ -40,16 +40,6 @@ VSN = $(DIAMETER_VSN)

RELSYSDIR = $(RELEASE_PATH)/diameter_test

ifeq ($(findstring win32,$(TARGET)),win32)
MAKEFILE_SRC = Makefile.win32.src
else
MAKEFILE_SRC = Makefile.src
endif

ifeq ($(TT_DIR),)
TT_DIR = /tmp
endif

# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
Expand All @@ -67,31 +57,16 @@ TARGET_FILES = $(MODULES:%=%.$(EMULATOR))
SUITE_MODULES = $(filter diameter_%_SUITE, $(MODULES))
SUITES = $(SUITE_MODULES:diameter_%_SUITE=%)

EMAKEFILE = Emakefile
MAKE_EMAKE = $(wildcard $(TOP)/make/make_emakefile)

ifeq ($(MAKE_EMAKE),)
BUILDTARGET = $(TARGET_FILES)
RELTEST_FILES = $(TEST_SPEC_FILE) $(COVER_SPEC_FILE) $(SOURCE)
else
BUILDTARGET = emakebuild
RELTEST_FILES = $(EMAKEFILE) $(TEST_SPEC_FILE) $(COVER_SPEC_FILE) $(SOURCE)
endif

# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------

include ../src/app/diameter.mk

ifeq ($(USE_DIAMETER_TEST_CODE),true)
ERL_COMPILE_FLAGS += -DDIAMETER_TEST_CODE=mona_lisa_spelar_doom
endif

ifeq ($(USE_DIAMETER_HIPE),true)
ERL_COMPILE_FLAGS += +native -DDIAMETER_hipe_special=true
endif

# This is only used to compile suite locally when running with a
# target like 'all' below. Target release_tests only installs source.
ERL_COMPILE_FLAGS += $(DIAMETER_ERL_COMPILE_FLAGS) \
-DDIAMETER_CT=true \
-I $(DIAMETER_TOP)/src/app
Expand All @@ -100,35 +75,24 @@ ERL_COMPILE_FLAGS += $(DIAMETER_ERL_COMPILE_FLAGS) \
# Targets
# ----------------------------------------------------

all test: $(SUITES)

tests debug opt: $(BUILDTARGET)

beam targets: $(TARGET_FILES)

emakebuild: $(EMAKEFILE)
all: $(SUITES)

$(EMAKEFILE):
$(MAKE_EMAKE) $(ERL_COMPILE_FLAGS) -o $(EBIN) '*_SUITE_make' $(MODULES) \
| grep -v Warning \
> $(EMAKEFILE)
tests debug opt: $(TARGET_FILES)

clean:
rm -f $(EMAKEFILE)
rm -f $(TARGET_FILES)
rm -f depend.mk

realclean: clean
rm -rf log
rm -f errs core *~

.PHONY: all emakebuild test tests debug opt beam targets clean realclean
.PHONY: all tests debug opt clean realclean

docs:

info:
@echo "MAKE_EMAKE = $(MAKE_EMAKE)"
@echo "EMAKEFILE = $(EMAKEFILE)"
@echo "BUILDTARGET = $(BUILDTARGET)"
@echo "TARGET_FILES = $(TARGET_FILES)"
@echo
@echo "ERL_COMPILE_FLAGS = $(ERL_COMPILE_FLAGS)"
@echo "ERL = $(ERL)"
Expand All @@ -143,15 +107,6 @@ info:
@echo

help:
@echo
@echo "This Makefile controls the test of the $(APPLICATION) application."
@echo
@echo "There are two separate ways to perform the test of $(APPLICATION)."
@echo
@echo " a) Run the official OTP test-server (which we do not describe here)"
@echo
@echo " b) Run individual suites using targets in this makefile, target"
@echo " xxx running the testcases contained in $(APPLICATION)_xxx_SUITE."
@echo
@echo "Targets:"
@echo
Expand All @@ -161,10 +116,10 @@ help:
@echo " $(SUITES)"
@echo " Run a specific test suite."
@echo
@echo " beam"
@echo " tests"
@echo " Compile all test-code."
@echo
@echo " clean"
@echo " clean | realclean"
@echo " Remove generated files."
@echo
@echo " info"
Expand All @@ -183,7 +138,7 @@ help:

# Exit with a non-zero status if the output looks to indicate failure.
# diameter_ct:run/1 itself can't tell (it seems).
$(SUITES): log targets
$(SUITES): log tests
$(ERL) -noshell \
-pa $(DIAMETER_TOP)/ebin \
-sname diameter_test_$@ \
Expand All @@ -207,7 +162,7 @@ release_spec:

release_docs_spec:

release_tests_spec: tests
release_tests_spec:
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) $(RELTEST_FILES) $(RELSYSDIR)

Expand Down

0 comments on commit 7bbb717

Please sign in to comment.