software/simpleran: do not run Amarisoft init scripts with lte_mock
Problem
The enb wrapper runs sudo -n /opt/amarisoft/rm-tmp-lte enb. The ue wrapper runs sudo /opt/amarisoft/rm-tmp-lte ue. rm-tmp-lte removes /tmp/.lte$1*. These files belong to all Amarisoft services on the host, in all partitions.
The SR tests use lte_mock, but the wrappers still run rm-tmp-lte, init-sdr and init-enb. When a node runs the SR tests and a real lteenb, the test removes the files of the real lteenb. The real lteenb then stops with "License error: runtime error (...) Runtime error 7". On simbox006, each SR test run stopped the real enb in slappart2.
Changes
- The
[amarisoft]section ofinstance.cfggives themockoption. The value istruewhenlte_mockis set, and empty when it is not. - When
mockis set, these wrappers do not run the scripts inamarisoft['dir']:- enb:
rm-tmp-lte,init-sdr,init-enb - ue:
rm-tmp-lte,init-sdr,init-ue - core-network (mme and ims):
init-mme - test-model:
init-sdr,init-enb
- enb:
- Without
lte_mock, the generated wrappers are the same as before. - The enb tests of
test.pyandtest_ors.pysetcom_ws_portto 9101. The default address is 127.0.1.2:9001, and a real lteenb on the test node can use the same address. Then the amarisoft statistics come from the real lteenb and not from the mock. Thecheck-baseband-latencyandrx-saturatedpromises fail, and setUpClass of the enb and gnb tests fails. -
test_enb_sh_wrapper_mockandtest_ue_sh_wrapper_mockverify that the wrappers of a mock instance do not callrm-tmp-lte,init-sdr,init-enb,init-ueorinit-mme.
Test
Test suite: https://erp5js.nexedi.net/#/test_suite_module/2449