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 | TOPDIR := ../\r | |
9 | include $(TOPDIR)/Makefile.regression\r | |
10 | \r | |
11 | MAKE_PROG := $(MAKE)\r | |
12 | \r | |
13 | 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 | |
14 | TTCN_PARALLEL_FILES := component_test.ttcn | |
15 | \r | |
16 | SINGLE_CFG := text2ttcn_1.cfg | |
17 | PARALLEL_CFG := text2ttcn_2.cfg\r | |
18 | ||
19 | SINGLE_FILES := $(TTCN_FILES) $(SINGLE_CFG) | |
20 | PARALLEL_FILES := $(TTCN_FILES) $(TTCN_PARALLEL_FILES) $(PARALLEL_CFG)\r | |
21 | \r | |
22 | RUNNABLE := text2ttcn\r | |
23 | \r | |
24 | ifeq ($(PLATFORM), WIN32)\r | |
25 | RUNNABLE := $(RUNNABLE).exe\r | |
26 | endif\r | |
27 | \r | |
28 | DIR_SINGLE := dir_single_mode\r | |
29 | DIR_PARALLEL := dir_parallel_mode\r | |
30 | GENERATED_DIRS := $(DIR_SINGLE) $(DIR_PARALLEL)\r | |
31 | \r | |
32 | # List of fake targets:\r | |
33 | .PHONY: all clean run run_single run_parallel runall\r | |
34 | \r | |
35 | all: $(GENERATED_DIRS)\r | |
36 | \r | |
37 | $(DIR_SINGLE):\r | |
38 | mkdir $@\r | |
39 | cd $@ && for file in $(SINGLE_FILES); do ln -s ../$$file || exit; done\r | |
40 | cd $@ && $(TTCN3_DIR)/bin/ttcn3_makefilegen -s -e $(RUNNABLE) ./* && $(MAKE_PROG)\r | |
41 | \r | |
42 | $(DIR_PARALLEL):\r | |
43 | mkdir $@\r | |
44 | cd $@ && for file in $(PARALLEL_FILES); do ln -s ../$$file || exit; done\r | |
45 | cd $@ && $(TTCN3_DIR)/bin/ttcn3_makefilegen -e $(RUNNABLE) ./* && $(MAKE_PROG)\r | |
46 | \r | |
47 | run: $(GENERATED_DIRS)\r | |
48 | cd $(DIR_SINGLE) && ./$(RUNNABLE) $(SINGLE_CFG) && grep "Overall verdict: pass" *.log\r | |
49 | cd $(DIR_PARALLEL) && $(TTCN3_DIR)/bin/ttcn3_start $(RUNNABLE) $(PARALLEL_CFG) && grep "Overall verdict: pass" *.log\r | |
50 | \r | |
51 | # To run all tests, possibly in parallel\r | |
52 | run_single: $(DIR_SINGLE)\r | |
53 | cd $(DIR_SINGLE) && ./$(RUNNABLE) $(SINGLE_CFG) && grep "Overall verdict: pass" *.log\r | |
54 | \r | |
55 | run_parallel: $(DIR_PARALLEL) \r | |
56 | cd $(DIR_PARALLEL) && $(TTCN3_DIR)/bin/ttcn3_start $(RUNNABLE) $(PARALLEL_CFG) && grep "Overall verdict: pass" *.log\r | |
57 | \r | |
58 | runall: run_single run_parallel\r | |
59 | \r | |
60 | clean distclean:\r | |
61 | rm -rf $(GENERATED_DIRS)\r | |
62 | \r |