Commit | Line | Data |
---|---|---|
970ed795 EL |
1 | ############################################################################### |
2 | # Copyright (c) 2000-2014 Ericsson Telecom AB | |
3 | # All rights reserved. This program and the accompanying materials | |
4 | # are made available under the terms of the Eclipse Public License v1.0 | |
5 | # which accompanies this distribution, and is available at | |
6 | # http://www.eclipse.org/legal/epl-v10.html | |
7 | ############################################################################### | |
8 | # Settings for the regression test | |
9 | ||
10 | TOPDIR := $(CURDIR) | |
11 | include $(TOPDIR)/Makefile.regression | |
12 | ||
13 | DIRS := intOper boolOper floatOper bitstrOper octetstrOper charOper charstrOper \ | |
14 | verdictOper recordOper recofOper setOper setofOper setofMatch unionOper \ | |
15 | enumOper arrayOper anytypeOper templateInt templateBool templateFloat templateBitstr \ | |
16 | templateOctetstr templateChar templateCharstr templateRec templateRecof \ | |
17 | templateSet templateSetof templateUnion templateEnum modifiedTemplate \ | |
18 | basicStatem configOper commMessage commProcedure lostTimer controlTimer \ | |
19 | BER BER_x682 ASN1 predefFunction ERC preCompilerFlags functionReference \ | |
20 | nonMandatoryPar logFiles logger_control namedActualParameters \ | |
21 | assignmentNotation omitdef anytype RAW implicitMsgEncoding pattern_quadruples \ | |
22 | macros visibility hexstrOper ucharstrOper objidOper CRTR00015758 slider \ | |
23 | XML ipv6 implicitOmit testcase_defparam transparent HQ16404 cfgFile \ | |
24 | all_from lazyEval tryCatch text2ttcn json junitlogger ttcn2json | |
25 | ||
26 | ifdef DYN | |
27 | DIRS += loggerplugin | |
28 | endif | |
29 | ||
30 | ifdef RT2 | |
31 | DIRS += typeCompat negativeTest | |
32 | endif | |
33 | ||
34 | # List of fake targets: | |
35 | .PHONY: all dep clean run $(DIRS) $(addsuffix /, $(DIRS)) coverage compileonly | |
36 | ||
37 | # Export all variables to the sub-directories. | |
38 | #export | |
39 | ||
40 | all dep clean distclean: | |
41 | $(MAKE) -C compileonly $@ | |
42 | for dir in $(DIRS); do $(MAKE) -C $$dir $@ || exit; done | |
43 | $(RM) report.txt | |
44 | ||
45 | run: | |
46 | for dir in $(DIRS); do $(MAKE) -C $$dir $@ || exit; done | |
47 | ||
48 | ||
49 | # It is assumed, that the TITAN sources are available in `..'. Please note, | |
50 | # that if TITAN was compiled with coverage enabled, only this target will | |
51 | # work properly. | |
52 | coverage: | |
53 | $(LCOV_DIR)/bin/lcov -d .. -z | |
54 | make report LCOV=1 | |
55 | $(LCOV_DIR)/bin/lcov -d .. -c -o regtest_coverage.info | |
56 | $(LCOV_DIR)/bin/genhtml -o regtest_coverage -t "TITAN Regression Test Coverage" regtest_coverage.info | |
57 | ||
58 | compileonly $(DIRS) $(addsuffix /, $(DIRS)): | |
59 | $(MAKE) -C $@ | |
60 | ||
61 | # Build in parallel | |
62 | parallel build-par: compileonly $(DIRS) | |
63 | ||
64 | # To generate a report: | |
65 | # First, build everything (incl. compileonly); possibly in parallel. | |
66 | # Then, run the runnable tests in sequence (avoids garbled output). | |
67 | report.txt: parallel | |
68 | bash -c 'set -o pipefail; $(MAKE) run 2>&1 | tee report.txt' | |
69 | ||
70 | report: report.txt | |
71 | @echo "----------------------------------" | |
72 | @echo "List of tests not 100% successful:" | |
73 | @echo "----------------------------------" | |
74 | @perl vcheck.pl report.txt | |
75 | ||
76 | testclean: | |
77 | $(MAKE) -C .. $@ | |
78 | ||
79 | rclean: | |
80 | $(MAKE) clean 'DIRS=$(filter-out $(TESTDIRS), $(DIRS))' | |
81 | ||
82 | prereq: | |
83 | ./prereq.pl ${MAKELEVEL} | |
84 | ||
85 | $(TOPDIR)/Makefile.personal: | |
86 | ln -s $(TOPDIR)/../$(@F) $(TOPDIR)/ | |
87 | ||
88 | unexport DIRS | |
89 | ||
90 | include Makefile.regression | |
91 | export PLATFORM |