[S] Change in osmo-ttcn3-hacks[master]: testenv/osmo-dev: split get_targets to own func
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40841?usp=email ) Change subject: testenv/osmo-dev: split get_targets to own func ...................................................................... testenv/osmo-dev: split get_targets to own func Split the code for getting osmo-dev targets into a separate function, so this can be reused in the next patch. Change-Id: I2bd7c05102ca472614289870957cdca335c01eaf --- M _testenv/testenv/osmo_dev.py 1 file changed, 16 insertions(+), 11 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/_testenv/testenv/osmo_dev.py b/_testenv/testenv/osmo_dev.py index fd5fa4e..8f9667e 100644 --- a/_testenv/testenv/osmo_dev.py +++ b/_testenv/testenv/osmo_dev.py @@ -51,6 +51,21 @@ sys.exit(1) +def get_targets(cfg): + ret = [] + + for section in cfg: + section_data = cfg[section] + if section == "testsuite": + # Gets built with testenv.testsuite.build() + continue + + if "make" in section_data and section_data["make"] != "no" and section_data["make"] not in ret: + ret += [section_data["make"]] + + return ret + + def init(): global init_done @@ -100,17 +115,7 @@ def make(cfg): - targets = [] - - for section in cfg: - section_data = cfg[section] - if section == "testsuite": - # Gets built with testenv.testsuite.build() - continue - - if "make" in section_data and section_data["make"] != "no" and section_data["make"] not in targets: - targets += [section_data["make"]] - + targets = get_targets(cfg) if not targets: logging.debug("No osmo-dev make targets found in testenv.cfg") return -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40841?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I2bd7c05102ca472614289870957cdca335c01eaf Gerrit-Change-Number: 40841 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: osmith <osmith@sysmocom.de>
participants (1)
-
osmith