From 4462067afc8ab03c8f28dcf6980bb020902ee91f Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 15 Apr 2021 10:50:36 +0200 Subject: [PATCH] 4g: add overlay template path for all suites this allows, without changing the test case, to use a custom template, which is useful for development. By default, nothing changes and the OGT template is used Change-Id: Ifc43ac41b16813116f2559da5223a6fecc186125 --- sysmocom/suites/4g/iperf3_bidir.py | 5 +++++ sysmocom/suites/4g/iperf3_dl.py | 5 +++++ sysmocom/suites/4g/iperf3_ul.py | 5 +++++ sysmocom/suites/4g/ping.py | 5 +++++ sysmocom/suites/4g/rrc_idle_mo_ping.py | 5 +++++ sysmocom/suites/4g/rrc_idle_mt_ping.py | 5 +++++ 6 files changed, 30 insertions(+) diff --git a/sysmocom/suites/4g/iperf3_bidir.py b/sysmocom/suites/4g/iperf3_bidir.py index bb1d73af..3c94a88c 100755 --- a/sysmocom/suites/4g/iperf3_bidir.py +++ b/sysmocom/suites/4g/iperf3_bidir.py @@ -1,5 +1,10 @@ #!/usr/bin/env python3 from osmo_gsm_tester.testenv import * +import os + +# Overlay suite-specific templates folder if it exists +if os.path.isdir(os.path.join(os.path.dirname(__file__), 'templates')): + tenv.set_overlay_template_dir(os.path.join(os.path.dirname(__file__), 'templates')) epc = tenv.epc() enb = tenv.enb() diff --git a/sysmocom/suites/4g/iperf3_dl.py b/sysmocom/suites/4g/iperf3_dl.py index bf5b1f00..9e172c46 100755 --- a/sysmocom/suites/4g/iperf3_dl.py +++ b/sysmocom/suites/4g/iperf3_dl.py @@ -1,5 +1,10 @@ #!/usr/bin/env python3 from osmo_gsm_tester.testenv import * +import os + +# Overlay suite-specific templates folder if it exists +if os.path.isdir(os.path.join(os.path.dirname(__file__), 'templates')): + tenv.set_overlay_template_dir(os.path.join(os.path.dirname(__file__), 'templates')) epc = tenv.epc() enb = tenv.enb() diff --git a/sysmocom/suites/4g/iperf3_ul.py b/sysmocom/suites/4g/iperf3_ul.py index 6c0d25d6..e2437746 100755 --- a/sysmocom/suites/4g/iperf3_ul.py +++ b/sysmocom/suites/4g/iperf3_ul.py @@ -1,5 +1,10 @@ #!/usr/bin/env python3 from osmo_gsm_tester.testenv import * +import os + +# Overlay suite-specific templates folder if it exists +if os.path.isdir(os.path.join(os.path.dirname(__file__), 'templates')): + tenv.set_overlay_template_dir(os.path.join(os.path.dirname(__file__), 'templates')) epc = tenv.epc() enb = tenv.enb() diff --git a/sysmocom/suites/4g/ping.py b/sysmocom/suites/4g/ping.py index a78b8d61..9b9993c6 100755 --- a/sysmocom/suites/4g/ping.py +++ b/sysmocom/suites/4g/ping.py @@ -1,5 +1,10 @@ #!/usr/bin/env python3 from osmo_gsm_tester.testenv import * +import os + +# Overlay suite-specific templates folder if it exists +if os.path.isdir(os.path.join(os.path.dirname(__file__), 'templates')): + tenv.set_overlay_template_dir(os.path.join(os.path.dirname(__file__), 'templates')) epc = tenv.epc() enb = tenv.enb() diff --git a/sysmocom/suites/4g/rrc_idle_mo_ping.py b/sysmocom/suites/4g/rrc_idle_mo_ping.py index 389e5a2e..1fc55d70 100755 --- a/sysmocom/suites/4g/rrc_idle_mo_ping.py +++ b/sysmocom/suites/4g/rrc_idle_mo_ping.py @@ -1,5 +1,10 @@ #!/usr/bin/env python3 from osmo_gsm_tester.testenv import * +import os + +# Overlay suite-specific templates folder if it exists +if os.path.isdir(os.path.join(os.path.dirname(__file__), 'templates')): + tenv.set_overlay_template_dir(os.path.join(os.path.dirname(__file__), 'templates')) epc = tenv.epc() enb = tenv.enb() diff --git a/sysmocom/suites/4g/rrc_idle_mt_ping.py b/sysmocom/suites/4g/rrc_idle_mt_ping.py index 3360dba7..21650e75 100755 --- a/sysmocom/suites/4g/rrc_idle_mt_ping.py +++ b/sysmocom/suites/4g/rrc_idle_mt_ping.py @@ -1,5 +1,10 @@ #!/usr/bin/env python3 from osmo_gsm_tester.testenv import * +import os + +# Overlay suite-specific templates folder if it exists +if os.path.isdir(os.path.join(os.path.dirname(__file__), 'templates')): + tenv.set_overlay_template_dir(os.path.join(os.path.dirname(__file__), 'templates')) epc = tenv.epc() enb = tenv.enb()