fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27054 )
Change subject: PGW_Tests: f_start_prog(): redirect stdout/stderr to files
......................................................................
PGW_Tests: f_start_prog(): redirect stdout/stderr to files
This would allow us to see the output of a program being executed.
Change-Id: I04ab92c13fcd893d39dbb6a8a8af5ff41d207e36
Related: SYS#5602
---
M pgw/PGW_Tests.ttcn
1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/54/27054/1
diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn
index 2bb0ddc..c7faf26 100644
--- a/pgw/PGW_Tests.ttcn
+++ b/pgw/PGW_Tests.ttcn
@@ -23,6 +23,7 @@
charstring mp_local_hostname_c := "127.0.0.1";
charstring mp_local_hostname_u := "127.0.0.1";
+ charstring mp_run_prog_log_path := "/tmp";
charstring mp_run_prog_as_user := "laforge";
charstring mp_ping_hostname := "10.45.0.1";
@@ -402,6 +403,12 @@
run_as_user := mp_run_prog_as_user,
tun_netns_name := g_pars.tun_netns_name
};
+
+ /* Redirect stdout/stderr to the user-specified location */
+ var charstring prefix := mp_run_prog_log_path & "/" & testcasename();
+ sprog.command := sprog.command & " 1>>" & prefix &
".prog.stdout";
+ sprog.command := sprog.command & " 2>>" & prefix &
".prog.stderr";
+
log("Starting a program: ", command);
var UECUPS_StartProgramRes res := f_gtp2_start_program(sprog);
if (res.result != OK) {
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27054
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I04ab92c13fcd893d39dbb6a8a8af5ff41d207e36
Gerrit-Change-Number: 27054
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange