Commit 11c5b28a authored by balaskoa's avatar balaskoa
Browse files

Makefiles have been modified to handle dynamic tests


Signed-off-by: default avatarbalaskoa <Jeno.Balasko@ericsson.com>
Change-Id: I9a6ea0631e07436b8d6e65a18dc2e0cc00b242d9
parent 199b53eb
......@@ -54,4 +54,6 @@ dep: $(GENERATED_SOURCES)
makedepend $(CPPFLAGS) $(GENERATED_SOURCES)
run: $(TARGET)
./$(TARGET) OER.cfg
./$(TARGET) OER.cfg 2> result.txt
cat result.txt
grep "Overall verdict: pass" result.txt
......@@ -19,150 +19,52 @@
# Tarasov, Victor
#
##############################################################################
# uncomment this line to use alternative runtime (TITAN_RUNTIME_2)
# RT2 = yes
# This Makefile was generated by the compiler
# of the TTCN-3 Test Executor version 1.4.pl5
# for Matyas Hanko (ethmhk@duna61) on Mon Oct 6 16:26:18 2003
# The following make commands are available:
# - make, make all Builds the executable test suite.
# - make compile Translates TTCN-3 and ASN.1 modules to C++.
# - make clean Removes all generated files.
# - make dep Creates/updates dependency list.
# - make archive Archives all source files.
#
# Set these variables...
#
TOPDIR := ../../..
TOPDIR := ../../../
include $(TOPDIR)/Makefile.regression
# The path of your TTCN-3 Test Executor installation:
# Uncomment this line to override the environment variable.
# TTCN3_DIR =
# Your platform: (SOLARIS, LINUX, FREEBSD or WIN32)
ifndef PLATFORM
PLATFORM = SOLARIS
endif
# Your C++ compiler:
#CXX = g++
# Flags for the C++ preprocessor (and makedepend as well):
CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)/include -I$(XMLDIR)/include/libxml2
ifdef RT2
CPPFLAGS += -DTITAN_RUNTIME_2
endif
ifeq ($(DEBUG), yes)
CPPFLAGS += -DMEMORY_DEBUG
endif
# Flags for the C++ compiler:
CXXFLAGS = -Wall
# Flags for the linker:
LDFLAGS =
# Flags for the TTCN-3 and ASN.1 compiler:
COMPILER_FLAGS = -L
ifdef RT2
COMPILER_FLAGS += -R
endif
# Execution mode: (either ttcn3 or ttcn3-parallel)
ifndef RT2
TTCN3_LIB = ttcn3
else
TTCN3_LIB = ttcn3-rt2
endif
.SUFFIXES: .ttcn .asn .hh
.PHONY: all clean dep run
# The path of your OpenSSL installation:
# If you do not have your own one, leave it unchanged.
OPENSSL_DIR = $(TTCN3_DIR)
TTCN3_LIB = ttcn3$(RT2_SUFFIX)$(DYNAMIC_SUFFIX)
# Directory to store the archived source files:
# Note: you can set any directory except ./archive
ARCHIVE_DIR = ./backup
#
# You may change these variables. Add your files if necessary...
#
# The TTCN-3 modules needed for this project:
TTCN3_MODULES = ISOIEC8825_Testcases.ttcn ETSI_TS_103_097_v131_Testcases.ttcn ITSPKI_Testcases.ttcn
# The ASN.1 modules needed for this project:
ASN1_MODULES = ISOIEC8825.asn ETSITS103097v131.asn ITSPKI.asn IEEE1609dot2BaseTypes.asn IEEE1609dot2.asn EtsiTs103097Module.asn
# C++ source & header files generated by TTCN-3 & ASN.1 compilers:
GENERATED_SOURCES = $(TTCN3_MODULES:.ttcn=.cc) $(ASN1_MODULES:.asn=.cc)
GENERATED_HEADERS = $(TTCN3_MODULES:.ttcn=.hh) $(ASN1_MODULES:.asn=.hh)
# Source & header files of Test Ports and your other modules:
USER_SOURCES =
USER_HEADERS =
GENERATED_SOURCES = $(ASN1_MODULES:.asn=.cc) $(TTCN3_MODULES:.ttcn=.cc)
# All object files needed for the executable test suite:
OBJECTS = $(GENERATED_SOURCES:.cc=.o)
# The name of the executable test suite:
TARGET = OER_EncDec.exe
ifeq ($(COVERAGE), yes)
CPPFLAGS += -fprofile-arcs -ftest-coverage -g
CXXFLAGS += -fprofile-arcs -ftest-coverage -g
LDFLAGS += -fprofile-arcs -ftest-coverage -g -lgcov
GENERATED_HEADERS = $(GENERATED_SOURCES:.cc=.hh)
ifdef CODE_SPLIT
GENERATED_SOURCES := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), .cc _seq.cc _set.cc _seqof.cc _setof.cc _union.cc))
else ifdef SPLIT_TO_SLICES
POSTFIXES := $(foreach file, $(SPLIT_TO_SLICES), $(addsuffix $(file), _part_))
POSTFIXES := $(foreach file, $(POSTFIXES), $(addprefix $(file), .cc))
GENERATED_SOURCES2 := $(foreach file, $(GENERATED_SOURCES:.cc=), $(addprefix $(file), $(POSTFIXES)))
GENERATED_SOURCES += $(GENERATED_SOURCES2)
endif
#
# Do not modify these unless you know what you are doing...
#
SOLARIS_LIBS = -lxnet -L$(XMLDIR)/lib -lxml2 -lresolv -lcurses
SOLARIS8_LIBS = -lxnet -L$(XMLDIR)/lib -lxml2 -lresolv -lnsl -lsocket -lcurses
LINUX_LIBS = -L$(XMLDIR)/lib -lxml2 -lpthread -lrt -lncurses
FREEBSD_LIBS = -L$(XMLDIR)/lib -lxml2 -lncurses
WIN32_LIBS = -L$(XMLDIR)/lib -lxml2 -lncurses
OBJECTS = $(GENERATED_SOURCES:.cc=.o)
#
# Rules for building the executable...
#
all: $(TARGET) ;
TARGET = OER$(EXESUFFIX)
$(TARGET): $(OBJECTS)
$(CXX) $(LDFLAGS) -o $@ $(OBJECTS) -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
-L$(OPENSSL_DIR)/lib -lcrypto $($(PLATFORM)_LIBS)
all: $(TARGET)
.cc.o .c.o:
$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $<
$(TARGET): $(GENERATED_SOURCES) $(USER_SOURCES)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) -L$(OPENSSL_DIR)/lib -lcrypto $($(PLATFORM)_LIBS)
$(GENERATED_SOURCES) $(GENERATED_HEADERS): compile
@if [ ! -f $@ ]; then $(RM) compile; $(MAKE) compile; fi
compile: $(TTCN3_MODULES) $(ASN1_MODULES)
$(TTCN3_DIR)/bin/compiler $(COMPILER_FLAGS) $(TTCN3_MODULES) \
$(ASN1_MODULES) $(ASN1_STATIC_MODULES) - $?
touch $@
run: $(TARGET) OER_EncDec.cfg
./$^ 2> result.txt
cat result.txt
grep "Overall verdict: pass" result.txt
$(TTCN3_COMPILER) $(COMPILER_FLAGS) $^
clean distclean:
-$(RM) $(TARGET) $(OBJECTS) $(GENERATED_HEADERS) \
$(GENERATED_SOURCES) compile *.log *.gcda *.gcno
$(RM) $(TARGET) $(GENERATED_HEADERS) $(GENERATED_SOURCES) $(OBJECTS) *.log Makefile.bak compile
dep: $(GENERATED_SOURCES)
makedepend $(CPPFLAGS) $(USER_SOURCES) $(GENERATED_SOURCES)
makedepend $(CPPFLAGS) $(GENERATED_SOURCES)
archive:
mkdir -p $(ARCHIVE_DIR)
tar -cvhf - $(TTCN3_MODULES) $(ASN1_MODULES) \
$(USER_HEADERS) $(USER_SOURCES) Makefile \
| gzip >$(ARCHIVE_DIR)/$(TARGET)-`date '+%y%m%d-%H%M'`.tgz
run: $(TARGET)
./$(TARGET) OER_EncDec.cfg 2> result.txt
cat result.txt
grep "Overall verdict: pass" result.txt
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment