Sync with 5.4.0
[deliverable/titan.core.git] / regression_test / singlecontrol / Makefile
1 ###############################################################################
2 # Copyright (c) 2000-2015 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 := ..
9 include $(TOPDIR)/Makefile.regression
10
11 CC := $(CXX)
12
13 #CXXFLAGS +=
14 CPPFLAGS += -I$(TTCN3_DIR)/include
15 LDFLAGS += -L$(TTCN3_DIR)/lib -L$(XMLDIR)/lib
16 LDLIBS += -lttcn3 -lcrypto -lxml2
17 #LD := g++
18
19 EXES := hascontrolpart nocontrolpart twocontrolpart
20
21 all: $(EXES)
22
23 run: $(EXES)
24 @echo -e "*\n* single control part, no config file: should pass\n*"
25 ./hascontrolpart
26 @echo -e "*\n* single control part, config file without EXECUTE: should pass\n*"
27 ./hascontrolpart config_noexec.cfg
28 @echo -e "*\n* single control part, config file with EXECUTE: should pass\n*"
29 ./hascontrolpart config1.cfg
30 @echo -e "*\n* single control part, nonexistent config file: should fail\n*"
31 if ./nocontrolpart no_such_thing.cfg; then echo "Should fail"; exit 1; else : ; fi
32 @echo -e "*\n* single control part, partially corrupted config file: should fail\n*"
33 if ./nocontrolpart ouch.cfg ; then echo "Should fail"; exit 1; else : ; fi
34 @echo -e "*\n* single control part, not a config file: should fail\n*"
35 if ./nocontrolpart Makefile ; then echo "Should fail"; exit 1; else : ; fi
36
37 @echo -e "*\n* no control part, no config file: should fail\n*"
38 if ./nocontrolpart; then echo "Should fail"; exit 1; else : ; fi
39 @echo -e "*\n* no control part but config file without EXECUTE: should fail\n*"
40 if ./nocontrolpart config_noexec.cfg; then echo "Should fail"; exit 1; else : ; fi
41 @echo -e "*\n* no control part but config file: should pass\n*"
42 ./nocontrolpart config.cfg
43
44 @echo -e "*\n* no control, no config => error\n*"
45 if ./nocontrolpart ; then echo No control part should fail; exit 1; else : ; fi
46 @echo -e "*\n* no control, config file without EXECUTE => error\n*"
47 if ./nocontrolpart config_noexec.cfg ; then echo No control part should fail; exit 1; else : ; fi
48
49 @echo -e "*\n* more than one control part, no config => error\n*"
50 if ./twocontrolpart ; then echo Multiple control parts should fail; exit 1; else : ; fi
51 @echo -e "*\n* more than one control part, config file without EXECUTE => error\n*"
52 if ./twocontrolpart config_noexec.cfg; then echo Multiple control parts should fail; exit 1; else : ; fi
53 @echo -e "*\n* more than one control part, config file with EXECUTE => pass\n*"
54 ./twocontrolpart config2.cfg
55
56 @echo "+++ Success +++"
57
58
59
60 hascontrolpart: hascontrolpart.o
61
62 nocontrolpart: nocontrolpart.cc
63
64 twocontrolpart: hascontrolpart.o alsohascontrolpart.cc
65 $(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@
66
67
68 %.cc: %.ttcn
69 $(TTCN3_COMPILER) -Lg $<
70
71 clean distclean:
72 rm -f *.o $(EXES) *.cc *.hh *.log
This page took 0.041247 seconds and 5 git commands to generate.