Debian Codegraph @

regression_test/singlecontrol/Makefile

raw symbols SCIP
1 ##############################################################################
2 # Copyright (c) 2000-2021 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 v2.0
5 # which accompanies this distribution, and is available at
6 # https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
7 #
8 # Contributors:
9 # Balasko, Jeno
10 # Raduly, Csaba
11 # Szabados, Kristof
12 #
13 ##############################################################################
14 TOPDIR := ..
15 include $(TOPDIR)/Makefile.regression
16
17 CC := $(CXX)
18
19 #CXXFLAGS +=
20 CPPFLAGS += -I$(TTCN3_DIR)/include
21 LDFLAGS += -L$(TTCN3_DIR)/lib -L$(XMLDIR)/lib
22 LDLIBS += -lttcn3 -lcrypto -lxml2
23 #LD := g++
24
25 EXES := hascontrolpart nocontrolpart twocontrolpart
26
27 all: $(EXES)
28
29 run: $(EXES)
30 @echo -e "*\n* single control part, no config file: should pass\n*"
31 ./hascontrolpart
32 @echo -e "*\n* single control part, config file without EXECUTE: should pass\n*"
33 ./hascontrolpart config_noexec.cfg
34 @echo -e "*\n* single control part, config file with EXECUTE: should pass\n*"
35 ./hascontrolpart config1.cfg
36 @echo -e "*\n* single control part, nonexistent config file: should fail\n*"
37 if ./nocontrolpart no_such_thing.cfg; then echo "Should fail"; exit 1; else : ; fi
38 @echo -e "*\n* single control part, partially corrupted config file: should fail\n*"
39 if ./nocontrolpart ouch.cfg ; then echo "Should fail"; exit 1; else : ; fi
40 @echo -e "*\n* single control part, not a config file: should fail\n*"
41 if ./nocontrolpart Makefile ; then echo "Should fail"; exit 1; else : ; fi
42
43 @echo -e "*\n* no control part, no config file: should fail\n*"
44 if ./nocontrolpart; then echo "Should fail"; exit 1; else : ; fi
45 @echo -e "*\n* no control part but config file without EXECUTE: should fail\n*"
46 if ./nocontrolpart config_noexec.cfg; then echo "Should fail"; exit 1; else : ; fi
47 @echo -e "*\n* no control part but config file: should pass\n*"
48 ./nocontrolpart config.cfg
49
50 @echo -e "*\n* no control, no config => error\n*"
51 if ./nocontrolpart ; then echo No control part should fail; exit 1; else : ; fi
52 @echo -e "*\n* no control, config file without EXECUTE => error\n*"
53 if ./nocontrolpart config_noexec.cfg ; then echo No control part should fail; exit 1; else : ; fi
54
55 @echo -e "*\n* more than one control part, no config => error\n*"
56 if ./twocontrolpart ; then echo Multiple control parts should fail; exit 1; else : ; fi
57 @echo -e "*\n* more than one control part, config file without EXECUTE => error\n*"
58 if ./twocontrolpart config_noexec.cfg; then echo Multiple control parts should fail; exit 1; else : ; fi
59 @echo -e "*\n* more than one control part, config file with EXECUTE => pass\n*"
60 ./twocontrolpart config2.cfg
61
62 @echo "+++ Success +++"
63
64
65
66 hascontrolpart: hascontrolpart.o
67
68 nocontrolpart: nocontrolpart.cc
69
70 twocontrolpart: hascontrolpart.o alsohascontrolpart.cc
71 $(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@
72
73
74 %.cc: %.ttcn
75 $(TTCN3_COMPILER) -Lg $<
76
77 clean distclean:
78 rm -f *.o $(EXES) *.cc *.hh *.log