Skip to content
Snippets Groups Projects
Commit d4482ab3 authored by balaskoa's avatar balaskoa
Browse files

Hello World refinement - restricted for 2 passed TCs + make clean added


Signed-off-by: default avatarbalaskoa <jeno.balasko@ericsson.com>
parent b15ab1cd
No related branches found
No related tags found
No related merge requests found
...@@ -42,4 +42,5 @@ else ...@@ -42,4 +42,5 @@ else
$(MAKE) CXX='$(CXX)' CXXFLAGS='$(CXXFLAGS)' LDFLAGS='$(LDFLAGS)' && \ $(MAKE) CXX='$(CXX)' CXXFLAGS='$(CXXFLAGS)' LDFLAGS='$(LDFLAGS)' && \
(sleep 5 && echo 'Hello, TTCN-3!') | ttcn3_start MyExample MyExample.cfg && \ (sleep 5 && echo 'Hello, TTCN-3!') | ttcn3_start MyExample MyExample.cfg && \
logformat -o MyExample_merged.log *.log logformat -o MyExample_merged.log *.log
cd $(DEMODIR) && make clean
endif endif
...@@ -20,4 +20,4 @@ ConsoleMask := TTCN_ERROR | TTCN_TESTCASE | TTCN_STATISTICS ...@@ -20,4 +20,4 @@ ConsoleMask := TTCN_ERROR | TTCN_TESTCASE | TTCN_STATISTICS
[EXECUTE] [EXECUTE]
MyExample.control MyExample.control
hello_world.control #hello_world.control --see in MyExample2.cfg
/****************************************************************************** /******************************************************************************
* Copyright (c) 2000-2017 Ericsson Telecom AB * Copyright (c) 2000-2017 Ericsson Telecom AB
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Balasko, Jeno * Balasko, Jeno
* Lovassy, Arpad * Lovassy, Arpad
* Szabo, Janos Zoltan – initial implementation * Szabo, Janos Zoltan – initial implementation
* *
******************************************************************************/ ******************************************************************************/
// TTCN-3 version of "Hello, world!" // TTCN-3 version of "Hello, world!"
module MyExample module MyExample
{ {
type port PCOType message type port PCOType message
{ {
inout charstring; inout charstring;
} }
type component MTCType type component MTCType
{ {
port PCOType MyPCO; port PCOType MyPCO;
} }
testcase HelloW() runs on MTCType system MTCType testcase HelloW() runs on MTCType system MTCType
{ {
map(mtc:MyPCO, system:MyPCO); map(mtc:MyPCO, system:MyPCO);
MyPCO.send("Hello, world!"); MyPCO.send("Hello, world!");
setverdict(pass); setverdict(pass);
} }
testcase HelloW2() runs on MTCType system MTCType testcase HelloW2() runs on MTCType system MTCType
{ {
timer T := 1.0; timer T := 1.0;
map(mtc:MyPCO, system:MyPCO); map(mtc:MyPCO, system:MyPCO);
MyPCO.send("Hello, world!"); MyPCO.send("Hello, world!");
T.start; T.start;
alt { alt {
[] MyPCO.receive("Hello, TTCN-3!") { T.stop; setverdict(pass); } [] MyPCO.receive("Hello, TTCN-3!") { T.stop; setverdict(pass); }
[] T.timeout { setverdict(inconc); } [] T.timeout { setverdict(pass); }
[] MyPCO.receive { T.stop; setverdict(fail); } [] MyPCO.receive { T.stop; setverdict(fail); }
} }
} }
control control
{ {
execute(HelloW()); execute(HelloW());
execute(HelloW2()); execute(HelloW2());
//1 pass, 1 inconc expected }
}
} }
###############################################################################
# Copyright (c) 2000-2017 Ericsson Telecom AB
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Balasko, Jeno
# Delic, Adam
# Lovassy, Arpad
# Szabo, Bence Janos
# Szabo, Janos Zoltan – initial implementation
#
###############################################################################
[LOGGING]
LogFile := "MyExample-%n-%r.log"
FileMask := LOG_ALL
ConsoleMask := TTCN_ERROR | TTCN_TESTCASE | TTCN_STATISTICS
[EXECUTE]
#Not all testcases run to pass!
#Expected result:
#This is just a demo
MyExample.control
hello_world.control
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment