Commit 6cd9b435 authored by garciay's avatar garciay
Browse files

Update document

parent 3b5e397b
Loading
Loading
Loading
Loading
+111 −6
Original line number Diff line number Diff line
1. Open STF 407 UEdit32 project
1. Installation de cygwin

2. Start TrafficCapture
Install Cygwin (http://www.cygwin.com/), including the following packages:

	gcc
	gcc-core (not the version 4.x, check in /etc/alternatives)
	gcc-g++
	gdb
	subversion
	flex
	bison
	boost
	boost-devel
	libboost
	make
	diffutils
	autoconf
	automake
	gcc-mingw
	gcc-mingw-core
	gcc-mingw-g++


If you are using gcc version 4 then the executable test suite will very likely return immediately with the error code 5. 
This is a known incompatibility between Telelogic's runtime and gcc4 on cygwin and it should not happen since you have read the manual from the beginning. 
This may happen anyway if you have both versions installed on the system. 
In this case, you shall execute the command below to set gcc v3.0 as default compiler:
		/usr/bin/set-gcc-default-3.sh


2. Make your Elvior TTCN-3 tool accessible (there should not be any space in their path)

	mkdir /opt
	cd /opt
	ln -s /cygdrive/c/Program\ Files/Elvior  /opt/

3. Install boost-mingw-gcc345-1.38.0 package
	copy archive file boost-mingw-gcc345-1.38.0.tar.gz in /opt
	extract it using command 'tar xvzf ./boost-mingw-gcc345-1.38.0.tar.gz'
	ln -s boost-mingw-gcc345-1.38.0 /opt/boost-mingw


4. Install Boost 1.33.1 package
	copy archive file boost_1_33_1.tar.bz2 in /opt
	extract it using commands
		bzip2 -d boost_1_33_1.tar.bz2
		tar xvf boost_1_33_1.tar
	ln -s boost_1_33_1/boost /usr/include/boost

Note that if a directory /usr/include/boost already exist, move it into /usr/include/boost_<version>, where <version> is the version specified in current /usr/include/boost/version.hpp file (e.g. 1_46_1)


5. Install Boost 1.39.0 package
	copy archive file boost_1_39_0.tar.gz in /usr/local
	extract it using commands 'tar xvzf boost_1_39_0.tar.gz'
	ln -s /usr/local/boost_1_39_0 /usr/local/boost
	ln -s /usr/local/boost_1_39_0/ /usr/local/include/boost_1_39_0

6. install WinPcap package
	Download and unzip the pack. We will use for this example WpdPack_4_0_1.zip.
	Copy libraries like this:
		WpdPack\Lib\libpacket.a to cygwin\lib\
		WpdPack\Lib\libwpcap.a to cygwin\lib\ 

	Create a folder /usr/include/pcap/
	Copy all headers from WpdPack\Include to /usr/include/pcap/
	Be sure you have installed Winpcap libraries and that they are in your path by typing:
	    which Packet.dll
	    which wpcap.dll 


6. Install specific files
	Copy libboost_regex-mt.dll into /opt/boost-mingw-gcc345-1.38.0/lib/libboost_regex-mt.dll
	Copy libboost_regex-mt.dll into C:\WINDOWS\system32\boost_regex-mt.dll (Warning: file is renamed)
	Copy boost thread boost_thread-mt.dll into C:\WINDOWS\system32\boost_regex-mt.dll


7. Patch Elvior TTCN-3 tool
	copy MM\TciCD\*.a in C:\Program Files\Elvior\TestCastT3\Lib\C
	copy MM\Tri\*.a in C:\Program Files\Elvior\TestCastT3\Lib\C
	copy STF435_INT_Test_3GR9\adapter\mm\* C:\Program Files\Elvior\TestCastT3\Lib\C

8. How to compile TrafficCapture process
	cd <STF_main_path>/adapter/src/Capture
	make clean ; make

Note that <STF_main_path> is the path of STF project, e.g. ~/STF435_INT_Test_3GR9

9. How to compile the test adapter and the codec
	cd <STF_main_path>/adapter
	Compiler: T3DK_TOOL=mmagic make > out.txt 2>&1
It produces two outputs:
	- TestExecution-SA.exe, this is the test adapter binary file
	- 

Note that <STF_main_path> is the path of STF project, e.g. ~/STF435_INT_Test_3GR9

10. How to compile t3devkit
	Copy t3devkit directory in <STF_main_path> directory 
	cd <STF_main_path>/t3devkit
	make distclean
	./autogen.sh
	./configure --target=mingw32 --with-mmagic=/opt/Elvior/TestCastT3 --with-target-cppflags=-I/opt/boost-mingw/include --with-target-ldflags=-L/opt/boost-mingw/lib


Note that <STF_main_path> is the path of STF project, e.g. ~/STF435_INT_Test_3GR9

12. Start TrafficCapture
	1- Open a cygwin window
	2- In ~/dev/g++/STF407/adapter/src/Capture, execute ./TrafficCapture.exe -Lall


3. Start Elvior TEE
13. Start Elvior TEE
	1- Start application
	2- Load project STF407_ATS.mmsln

4. Execute a TC in automatic mode
14. Execute a TC in automatic mode
	1- Verify that SUT is set to C:\cygwin\home\yann\dev\g++\STF407\adapter\TestExecution-SA.exe -Lall
	2- Click on menu item Build/Test Mode (Ctrl-T)
	3- The TestExecution-SA ODS windows shall appear, with message "TCP/IP connection with MessageMagic established" 
	4- Cklick on menu item Build/Run Main Script (F5)

5. Execute a TC in automatic mode
15. Execute a TC in automatic mode
	1- change directory to /home/yann/dev/g++/STF407/adapter
	2- Execute ./TestExecution-SA.exe -Lall

6. Logs:
16. Logs:
	1- Open a cygwin window
	2- In C:\temp\LibSip.log, Codec logs
	3- On Elvior, TTCN-3 logs