aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Puschmann <andre@softwareradiosystems.com>2021-05-10 16:41:48 +0200
committerAndre Puschmann <andre@softwareradiosystems.com>2021-05-10 16:56:31 +0200
commit9d75ccb9c805f9f73daa1aba65420b68c7346d1b (patch)
tree965c0dbe300746172abba6683d74c8d26d9ca727
parentb9c9612fc1c0a0f57889d0e808b9b0c4278a1043 (diff)
open5gs: fix stopping of open5gs components after test finishesHEADmaster
use RemoteProcessSafeExit() for launching all open5gs components to make sure they are stopped at the end as well. Change-Id: Ia1439577d60f9694da70c4e42c621100c8ef295e
-rw-r--r--src/osmo_gsm_tester/obj/hss_open5gs.py3
-rw-r--r--src/osmo_gsm_tester/obj/mme_open5gs.py3
-rw-r--r--src/osmo_gsm_tester/obj/pcrf_open5gs.py3
-rw-r--r--src/osmo_gsm_tester/obj/sgwc_open5gs.py3
-rw-r--r--src/osmo_gsm_tester/obj/sgwu_open5gs.py3
-rw-r--r--src/osmo_gsm_tester/obj/smf_open5gs.py3
-rw-r--r--src/osmo_gsm_tester/obj/upf_open5gs.py3
7 files changed, 14 insertions, 7 deletions
diff --git a/src/osmo_gsm_tester/obj/hss_open5gs.py b/src/osmo_gsm_tester/obj/hss_open5gs.py
index 211d09a..8ffb3b0 100644
--- a/src/osmo_gsm_tester/obj/hss_open5gs.py
+++ b/src/osmo_gsm_tester/obj/hss_open5gs.py
@@ -75,8 +75,9 @@ class Open5gsHSS(log.Origin):
remote_binary = self.remote_inst.child('bin', Open5gsHSS.BINFILE)
args = (remote_binary, '-c', self.remote_config_file)
+ remote_run_dir = util.Dir(util.Dir(Open5gsHSS.REMOTE_DIR).child(Open5gsHSS.BINFILE))
- self.process = self.rem_host.RemoteProcess(Open5gsHSS.BINFILE, args, remote_env=remote_env)
+ self.process = self.rem_host.RemoteProcessSafeExit(Open5gsHSS.BINFILE, remote_run_dir, args, remote_env=remote_env)
self.testenv.remember_to_stop(self.process)
self.process.launch()
diff --git a/src/osmo_gsm_tester/obj/mme_open5gs.py b/src/osmo_gsm_tester/obj/mme_open5gs.py
index 0b3d633..25202f5 100644
--- a/src/osmo_gsm_tester/obj/mme_open5gs.py
+++ b/src/osmo_gsm_tester/obj/mme_open5gs.py
@@ -81,8 +81,9 @@ class Open5gsMME(log.Origin):
self.rem_host.setcap_net_admin(remote_binary)
args = (remote_binary, '-c', self.remote_config_file)
+ remote_run_dir = util.Dir(util.Dir(Open5gsMME.REMOTE_DIR).child(Open5gsMME.BINFILE))
- self.process = self.rem_host.RemoteProcess(Open5gsMME.BINFILE, args)
+ self.process = self.rem_host.RemoteProcessSafeExit(Open5gsMME.BINFILE, remote_run_dir, args)
self.testenv.remember_to_stop(self.process)
self.process.launch()
diff --git a/src/osmo_gsm_tester/obj/pcrf_open5gs.py b/src/osmo_gsm_tester/obj/pcrf_open5gs.py
index 4f93a47..5383b4f 100644
--- a/src/osmo_gsm_tester/obj/pcrf_open5gs.py
+++ b/src/osmo_gsm_tester/obj/pcrf_open5gs.py
@@ -75,8 +75,9 @@ class Open5gsPCRF(log.Origin):
remote_binary = self.remote_inst.child('bin', Open5gsPCRF.BINFILE)
args = (remote_binary, '-c', self.remote_config_file)
+ remote_run_dir = util.Dir(util.Dir(Open5gsPCRF.REMOTE_DIR).child(Open5gsPCRF.BINFILE))
- self.process = self.rem_host.RemoteProcess(Open5gsPCRF.BINFILE, args, remote_env=remote_env)
+ self.process = self.rem_host.RemoteProcessSafeExit(Open5gsPCRF.BINFILE, remote_run_dir, args, remote_env=remote_env)
self.testenv.remember_to_stop(self.process)
self.process.launch()
diff --git a/src/osmo_gsm_tester/obj/sgwc_open5gs.py b/src/osmo_gsm_tester/obj/sgwc_open5gs.py
index efc4568..394f1e7 100644
--- a/src/osmo_gsm_tester/obj/sgwc_open5gs.py
+++ b/src/osmo_gsm_tester/obj/sgwc_open5gs.py
@@ -72,8 +72,9 @@ class Open5gsSGWC(log.Origin):
remote_binary = self.remote_inst.child('bin', Open5gsSGWC.BINFILE)
args = (remote_binary, '-c', self.remote_config_file)
+ remote_run_dir = util.Dir(util.Dir(Open5gsSGWC.REMOTE_DIR).child(Open5gsSGWC.BINFILE))
- self.process = self.rem_host.RemoteProcess(Open5gsSGWC.BINFILE, args, remote_env=remote_env)
+ self.process = self.rem_host.RemoteProcessSafeExit(Open5gsSGWC.BINFILE, remote_run_dir, args, remote_env=remote_env)
self.testenv.remember_to_stop(self.process)
self.process.launch()
diff --git a/src/osmo_gsm_tester/obj/sgwu_open5gs.py b/src/osmo_gsm_tester/obj/sgwu_open5gs.py
index b97dd92..79fab8d 100644
--- a/src/osmo_gsm_tester/obj/sgwu_open5gs.py
+++ b/src/osmo_gsm_tester/obj/sgwu_open5gs.py
@@ -72,8 +72,9 @@ class Open5gsSGWU(log.Origin):
remote_binary = self.remote_inst.child('bin', Open5gsSGWU.BINFILE)
args = (remote_binary, '-c', self.remote_config_file)
+ remote_run_dir = util.Dir(util.Dir(Open5gsSGWU.REMOTE_DIR).child(Open5gsSGWU.BINFILE))
- self.process = self.rem_host.RemoteProcess(Open5gsSGWU.BINFILE, args, remote_env=remote_env)
+ self.process = self.rem_host.RemoteProcessSafeExit(Open5gsSGWU.BINFILE, remote_run_dir, args, remote_env=remote_env)
self.testenv.remember_to_stop(self.process)
self.process.launch()
diff --git a/src/osmo_gsm_tester/obj/smf_open5gs.py b/src/osmo_gsm_tester/obj/smf_open5gs.py
index 5241dc2..eda1aa2 100644
--- a/src/osmo_gsm_tester/obj/smf_open5gs.py
+++ b/src/osmo_gsm_tester/obj/smf_open5gs.py
@@ -75,8 +75,9 @@ class Open5gsSMF(log.Origin):
remote_binary = self.remote_inst.child('bin', Open5gsSMF.BINFILE)
args = (remote_binary, '-c', self.remote_config_file)
+ remote_run_dir = util.Dir(util.Dir(Open5gsSMF.REMOTE_DIR).child(Open5gsSMF.BINFILE))
- self.process = self.rem_host.RemoteProcess(Open5gsSMF.BINFILE, args, remote_env=remote_env)
+ self.process = self.rem_host.RemoteProcessSafeExit(Open5gsSMF.BINFILE, remote_run_dir, args, remote_env=remote_env)
self.testenv.remember_to_stop(self.process)
self.process.launch()
diff --git a/src/osmo_gsm_tester/obj/upf_open5gs.py b/src/osmo_gsm_tester/obj/upf_open5gs.py
index f22a6d7..78a520f 100644
--- a/src/osmo_gsm_tester/obj/upf_open5gs.py
+++ b/src/osmo_gsm_tester/obj/upf_open5gs.py
@@ -79,8 +79,9 @@ class Open5gsUPF(log.Origin):
self.rem_host.setcap_net_admin(remote_binary)
args = (remote_binary, '-c', self.remote_config_file)
+ remote_run_dir = util.Dir(util.Dir(Open5gsUPF.REMOTE_DIR).child(Open5gsUPF.BINFILE))
- self.process = self.rem_host.RemoteProcess(Open5gsUPF.BINFILE, args)
+ self.process = self.rem_host.RemoteProcessSafeExit(Open5gsUPF.BINFILE, remote_run_dir, args)
self.testenv.remember_to_stop(self.process)
self.process.launch()