Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Is it posible to execute linux command or executing a bash script using TTCN3?
Is it posible to execute linux command or executing a bash script using TTCN3? [message #1844255] Tue, 07 September 2021 08:54 Go to next message
nguyen nam  is currently offline nguyen nam Friend
Messages: 2
Registered: September 2021
Junior Member
Im currently working on my Test Suit where I have to run several linux command with input that I have in my testcase.

Is there any built-in function or any lib that enable me to do this? Ive been searching around but no result.

Thanks alot :D
Re: Is it posible to execute linux command or executing a bash script using TTCN3? [message #1844273 is a reply to message #1844255] Tue, 07 September 2021 16:53 Go to previous messageGo to next message
Gábor Szalai is currently offline Gábor SzalaiFriend
Messages: 133
Registered: December 2015
Senior Member
Yes, there is.
Namely the PIPE test port:
https://gitlab.eclipse.org/eclipse/titan/titan.TestPorts.PIPEasp

You can execute the command and interact with it via the stdin and stdout
Re: Is it posible to execute linux command or executing a bash script using TTCN3? [message #1844288 is a reply to message #1844273] Wed, 08 September 2021 07:20 Go to previous messageGo to next message
nguyen nam  is currently offline nguyen nam Friend
Messages: 2
Registered: September 2021
Junior Member
Gábor Szalai wrote on Tue, 07 September 2021 16:53
Yes, there is. Namely the PIPE test port: https://gitlab.eclipse.org/eclipse/titan/titan.TestPorts.PIPEasp You can execute the command and interact with it via the stdin and stdout



Thanks for the reply.

I've actually never used any extra ttcn libs on gitlab.eclipse but the ones that my operator setup. So I dont really know what are the dependencies for this libs as I dont see any import in the .ttcn files and what to do with those .cc and .hh files, any suggestion ?

[Updated on: Wed, 08 September 2021 07:48]

Report message to a moderator

Re: Is it posible to execute linux command or executing a bash script using TTCN3? [message #1844292 is a reply to message #1844288] Wed, 08 September 2021 09:35 Go to previous messageGo to next message
Yann Garcia is currently offline Yann GarciaFriend
Messages: 145
Registered: June 2016
Senior Member
Dear All,

Another way could be the external function.

BR\ Yann
Re: Is it posible to execute linux command or executing a bash script using TTCN3? [message #1844318 is a reply to message #1844292] Wed, 08 September 2021 19:42 Go to previous messageGo to next message
Olaf Bergengruen is currently offline Olaf BergengruenFriend
Messages: 122
Registered: November 2018
Senior Member
Hi Yann,

yes, in my implementation I use an external function which sends a query to the user via UDP and waits for a response (the PTC is blocked until the response arrives).
An external MMI server gets these queries and presents them to the user on a nice GUI and upon user response forwards it to the TTCN Tester.

Olaf
Re: Is it posible to execute linux command or executing a bash script using TTCN3? [message #1844322 is a reply to message #1844318] Thu, 09 September 2021 06:43 Go to previous message
Gábor Szalai is currently offline Gábor SzalaiFriend
Messages: 133
Registered: December 2015
Senior Member
For queries over UDP it is better to use UDP or IPL4 test port.

Please note that the blocking of the execution in external function can cause some unexpected problems.

We experienced a lot of weird problem with executing external commands/programs from external function. Like non closable sockets, messed up log files, double or missed events and messages etc.
Previous Topic:titan 8 no release?
Next Topic:[SOLVED] Build Titan with FUNCTION_TEST_RUNTIME := yes
Goto Forum:
  


Current Time: Thu Apr 25 23:40:07 GMT 2024

Powered by FUDForum. Page generated in 0.04819 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top