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 ###############################################################################
9 include $(TOPDIR
)/Makefile.regression
14 CPPFLAGS
+= -I
$(TTCN3_DIR
)/include
15 LDFLAGS
+= -L
$(TTCN3_DIR
)/lib
-L
$(XMLDIR
)/lib
16 LDLIBS
+= -lttcn3
-lcrypto
-lxml2
19 EXES
:= hascontrolpart nocontrolpart twocontrolpart
24 @echo
-e
"*\n* single control part, no config file: should pass\n*"
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
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
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
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
56 @echo
"+++ Success +++"
60 hascontrolpart
: hascontrolpart.o
62 nocontrolpart
: nocontrolpart.
cc
64 twocontrolpart
: hascontrolpart.o alsohascontrolpart.
cc
65 $(LINK.
cc) $^
$(LOADLIBES
) $(LDLIBS
) -o
$@
69 $(TTCN3_COMPILER
) -Lg
$<
72 rm -f
*.o
$(EXES
) *.
cc *.hh
*.log