a643db2f5f95b48f1ba3460a37ea8116c86ea9ce
[deliverable/titan.core.git] / regression_test / text2ttcn / Makefile
1 ##############################################################################
2 # Copyright (c) 2000-2016 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 # Contributors:
9 # Balasko, Jeno
10 # Baranyi, Botond
11 # Szabados, Kristof
12 #
13 ##############################################################################
14 TOPDIR := ../
15 include $(TOPDIR)/Makefile.regression
16
17 MAKE_PROG := $(MAKE)
18
19 TTCN_FILES := array_test.ttcn bitstring_test.ttcn boolean_test.ttcn charstring_test.ttcn enum_test.ttcn float_test.ttcn functions.ttcn hexstring_test.ttcn integer_test.ttcn octetstring_test.ttcn record_test.ttcn recordof_test.ttcn set_test.ttcn setof_test.ttcn types.ttcn ucharstring_test.ttcn union_test.ttcn objid_test.ttcn
20 TTCN_PARALLEL_FILES := component_test.ttcn
21
22 SINGLE_CFG := text2ttcn_1.cfg
23 PARALLEL_CFG := text2ttcn_2.cfg
24
25 SINGLE_FILES := $(TTCN_FILES) $(SINGLE_CFG)
26 PARALLEL_FILES := $(TTCN_FILES) $(TTCN_PARALLEL_FILES) $(PARALLEL_CFG)
27
28 RUNNABLE := text2ttcn
29
30 ifeq ($(PLATFORM), WIN32)
31 RUNNABLE := $(RUNNABLE).exe
32 endif
33
34 COVERAGE_FLAG :=
35 ifeq ($(COVERAGE), yes)
36 COVERAGE_FLAG += -C
37 endif
38
39 DIR_SINGLE := dir_single_mode
40 DIR_PARALLEL := dir_parallel_mode
41 GENERATED_DIRS := $(DIR_SINGLE) $(DIR_PARALLEL)
42
43 # List of fake targets:
44 .PHONY: all clean run run_single run_parallel runall
45
46 all: $(GENERATED_DIRS)
47
48 $(DIR_SINGLE):
49 mkdir $@
50 cd $@ && for file in $(SINGLE_FILES); do ln -s ../$$file || exit; done
51 cd $@ && $(TTCN3_DIR)/bin/ttcn3_makefilegen $(COVERAGE_FLAG) -sM -e $(RUNNABLE) ./* && $(MAKE_PROG)
52
53 $(DIR_PARALLEL):
54 mkdir $@
55 cd $@ && for file in $(PARALLEL_FILES); do ln -s ../$$file || exit; done
56 cd $@ && $(TTCN3_DIR)/bin/ttcn3_makefilegen $(COVERAGE_FLAG) -M -e $(RUNNABLE) ./* && $(MAKE_PROG)
57
58 run: $(GENERATED_DIRS)
59 cd $(DIR_SINGLE) && ./$(RUNNABLE) $(SINGLE_CFG) && grep "Overall verdict: pass" *.log
60 cd $(DIR_PARALLEL) && $(TTCN3_DIR)/bin/ttcn3_start $(RUNNABLE) $(PARALLEL_CFG) && grep "Overall verdict: pass" *.log
61
62 # To run all tests, possibly in parallel
63 run_single: $(DIR_SINGLE)
64 cd $(DIR_SINGLE) && ./$(RUNNABLE) $(SINGLE_CFG) && grep "Overall verdict: pass" *.log
65
66 run_parallel: $(DIR_PARALLEL)
67 cd $(DIR_PARALLEL) && $(TTCN3_DIR)/bin/ttcn3_start $(RUNNABLE) $(PARALLEL_CFG) && grep "Overall verdict: pass" *.log
68
69 runall: run_single run_parallel
70
71 clean distclean:
72 rm -rf $(GENERATED_DIRS)
73
This page took 0.032847 seconds and 4 git commands to generate.