osmith has uploaded this change for review.
eim: set mp_restop_path using TESTENV_SRC_DIR
* Use $TESTENV_SRC_DIR instead of ../../, as the latter may not always be
the directory where the sources get cloned.
* Adjust the path in eIM_Tests.cfg instead of copying restop.py to the
logs dir and starting it from there.
* Change onomondo-eim/contrib/rest_api_usage_example/restop.py to
onomondo-eim/contrib/restop.py as that seems to be the proper path
on current master:
https://gerrit.osmocom.org/plugins/gitiles/onomondo-eim/+/refs/heads/master/contrib/restop.py
Change-Id: I2ee9a487b2eb77485f09133918d91d6d7275d4c6
---
A eim/prepare.sh
M eim/testenv.cfg
2 files changed, 11 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/96/43496/1
diff --git a/eim/prepare.sh b/eim/prepare.sh
new file mode 100755
index 0000000..1cb2d57
--- /dev/null
+++ b/eim/prepare.sh
@@ -0,0 +1,9 @@
+#!/bin/sh -ex
+
+# Set mp_restop_path
+RESTOP="$TESTENV_SRC_DIR"/onomondo-eim/contrib/restop.py
+test -e "$RESTOP"
+sed \
+ -i \
+ "s,^eIM_Tests\.mp_restop_path := .*,eIM_Tests.mp_restop_path := \"$RESTOP\"," \
+ eIM_Tests.cfg
diff --git a/eim/testenv.cfg b/eim/testenv.cfg
index bf404f5..b375fec 100644
--- a/eim/testenv.cfg
+++ b/eim/testenv.cfg
@@ -1,7 +1,8 @@
[testsuite]
program=eIM_Tests
config=eIM_Tests.cfg
-copy=../../onomondo-eim/contrib/rest_api_usage_example/restop.py ../ipad/example_ca/pki/private/alttest.key ../ipad/example_ca/pki/issued/alttest.crt
+copy=../ipad/example_ca/pki/private/alttest.key ../ipad/example_ca/pki/issued/alttest.crt
+prepare=prepare.sh
[eim]
program=onomondo-eim -c "$TESTENV_INSTALL_DIR"/etc/osmocom/onomondo-eim.config -r "$TESTENV_INSTALL_DIR"/usr/lib/onomondo-eim -m ./mnesia_db -l debug
To view, visit change 43496. To unsubscribe, or for help writing mail filters, visit settings.