osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40116?usp=email )
Change subject: start-testsuite: fix passing $TEST to ttcn3_start
......................................................................
start-testsuite: fix passing $TEST to ttcn3_start
Fix that testenv / ttcn3_start kept running after the testsuites were
already done. This was caused by passing an empty string to ttcn3_start
as test argument, which causes it to still use the config file, but run
in a single test mode:
https://gitlab.eclipse.org/eclipse/titan/titan.core/-/blob/9.0.0/mctr2/mctr…
After the first test ran, ttcn3_start sends "emtc" to the testsuite,
which replies with "MTC cannot be terminated." as it is still in
MC_EXECUTING_TESTCASE instead of MC_READY:
https://gitlab.eclipse.org/eclipse/titan/titan.core/-/blob/9.0.0/mctr2/cli/…
The ttcn3_start script then waits forever for the "MTC terminated.."
string, which doesn't come since "emtc" isn't sent to the testsuite a
second time:
https://gitlab.eclipse.org/eclipse/titan/titan.core/-/blob/9.0.0/mctr2/mctr…
Fixes: 050ba48c ("buildsystem: build out-of-tree")
Change-Id: Ic50de8350e20d101417c5689058b64fe6547126f
---
M start-testsuite.sh
1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/16/40116/1
diff --git a/start-testsuite.sh b/start-testsuite.sh
index 8c55779..b8283ce 100755
--- a/start-testsuite.sh
+++ b/start-testsuite.sh
@@ -55,11 +55,17 @@
# below is for the debian packages
TTCN3_BIN_DIR="${TTCN3_BIN_DIR:-/usr/bin}"
TITAN_LIBRARY_PATH="${TITAN_LIBRARY_PATH:-/usr/lib/titan:/usr/ttcn3/lib}"
+
+# Run ttcn3_start with LD_LIBRARY_PATH. Do not put $TEST in quotes as it can be
+# empty and must be omitted in that case. Otherwise ttcn3_start tries to stop
+# the testsuite after the first test, which fails with "MTC cannot be
+# terminated" and then ttcn3_start keeps running even after the testsuite has
+# stopped.
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$BUILDDIR/$SUITE_DIR:$TITAN_LIBRARY_PATH" \
"$TTCN3_BIN_DIR/ttcn3_start" \
"$BUILDDIR/$SUITE_DIR/$SUITE_NAME" \
"$CFG" \
- "$TEST"
+ $TEST
expected="$TOPDIR/$SUITE_DIR/expected-results.xml"
if [ ! -f "$expected" ]; then
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40116?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ic50de8350e20d101417c5689058b64fe6547126f
Gerrit-Change-Number: 40116
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>