Commit | Line | Data |
---|---|---|
d44e3c4f | 1 | ############################################################################## |
2 | # Copyright (c) 2000-2016 Ericsson Telecom AB | |
970ed795 EL |
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 | |
d44e3c4f | 7 | # |
8 | # Contributors: | |
9 | # Balasko, Jeno | |
10 | # Beres, Szabolcs | |
11 | # Raduly, Csaba | |
12 | # Szabados, Kristof | |
14e21cff | 13 | # Szabo, Bence Janos |
d44e3c4f | 14 | # |
15 | ############################################################################## | |
970ed795 EL |
16 | TOPDIR := ../../../ |
17 | include $(TOPDIR)/Makefile.regression | |
18 | ||
19 | FILES := assignment.ttcn assignment.cfg | |
20 | RUNNABLE := assignment | |
21 | CFG := assignment.cfg | |
22 | DIR_SINGLE := dir_single_mode | |
23 | DIR_PARALLEL := dir_parallel_mode | |
24 | GENERATED_DIRS := $(DIR_SINGLE) $(DIR_PARALLEL) | |
25 | ||
3abe9331 | 26 | COVERAGE_FLAG := |
27 | ifeq ($(COVERAGE), yes) | |
28 | COVERAGE_FLAG += -C | |
29 | endif | |
30 | ||
97421534 | 31 | ifdef DYN |
32 | ifeq ($(PLATFORM), WIN32) | |
1076e2d0 | 33 | export PATH+=:$(TTCN3_DIR)/lib:$(ABS_SRC)/$(DIR_SINGLE):$(ABS_SRC)/$(DIR_PARALLEL): |
97421534 | 34 | else |
1076e2d0 | 35 | export LD_LIBRARY_PATH+=:$(ABS_SRC)/$(DIR_SINGLE):$(ABS_SRC)/$(DIR_PARALLEL): |
97421534 | 36 | endif |
37 | endif | |
38 | ||
970ed795 EL |
39 | MAKE_PROG := $(MAKE) |
40 | ||
41 | # List of fake targets: | |
42 | .PHONY: all clean run run_single run_parallel runall | |
43 | ||
44 | all: $(GENERATED_DIRS) | |
45 | ||
46 | dir_single_mode: | |
47 | mkdir $@ | |
48 | cd $@ && for file in $(FILES); do ln -s ../$$file || exit; done | |
14e21cff | 49 | cd $@ && $(TTCN3_DIR)/bin/ttcn3_makefilegen $(COVERAGE_FLAG) $(SPLIT_FLAG) -s ./* && $(MAKE_PROG) |
970ed795 EL |
50 | |
51 | dir_parallel_mode: | |
52 | mkdir $@ | |
53 | cd $@ && for file in $(FILES); do ln -s ../$$file || exit; done | |
14e21cff | 54 | cd $@ && $(TTCN3_DIR)/bin/ttcn3_makefilegen $(COVERAGE_FLAG) $(SPLIT_FLAG) ./* && $(MAKE_PROG) |
970ed795 EL |
55 | |
56 | run: $(GENERATED_DIRS) | |
57 | cd $(DIR_SINGLE) && ./$(RUNNABLE) $(CFG) | |
58 | cd $(DIR_PARALLEL) && $(TTCN3_DIR)/bin/ttcn3_start $(RUNNABLE) $(CFG) | |
59 | ||
60 | # To run all tests, possibly in parallel | |
61 | run_single: $(DIR_SINGLE) | |
62 | cd $(DIR_SINGLE) && ./$(RUNNABLE) $(CFG) | |
63 | run_parallel: $(DIR_PARALLEL) | |
64 | cd $(DIR_PARALLEL) && $(TTCN3_DIR)/bin/ttcn3_start $(RUNNABLE) $(CFG) | |
65 | runall: run_single run_parallel | |
66 | ||
67 | clean distclean: | |
68 | rm -rf $(GENERATED_DIRS) | |
69 |