osmith has uploaded this change for review.

View Change

testenv: run osmo-dev logic for --binary-repo too

Check if the testsuite we are running has any test components with
package=no. If that is the case, check if osmo-dev is initialized and
attempt to build the components with osmo-dev. The actual building needs
further work done in follow-up patches.

Related: OS#6638#note-12
Change-Id: I414e8e052c32acd8c2148b40eb5f75b57d1f293f
---
M _testenv/testenv.py
M _testenv/testenv/osmo_dev.py
2 files changed, 12 insertions(+), 2 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/72/43772/1
diff --git a/_testenv/testenv.py b/_testenv/testenv.py
index 01f6d95..5d6b043 100755
--- a/_testenv/testenv.py
+++ b/_testenv/testenv.py
@@ -35,7 +35,8 @@
testenv.testsrcdir_cfg.init()
testenv.testenv_cfg.init()

- if not testenv.args.binary_repo:
+ osmo_dev_has_any_targets = testenv.osmo_dev.has_any_targets()
+ if osmo_dev_has_any_targets:
testenv.osmo_dev.check_init_needed()

testenv.podman_install.init()
@@ -52,7 +53,7 @@
testenv.testsuite.build()

# Build all components first
- if not testenv.args.binary_repo:
+ if osmo_dev_has_any_targets:
for cfg_name, cfg in testenv.testenv_cfg.cfgs.items():
testenv.testenv_cfg.set_current(cfg_name)
testenv.osmo_dev.init(cfg)
diff --git a/_testenv/testenv/osmo_dev.py b/_testenv/testenv/osmo_dev.py
index 8f2fcfd..d67c5eb 100644
--- a/_testenv/testenv/osmo_dev.py
+++ b/_testenv/testenv/osmo_dev.py
@@ -59,11 +59,20 @@
continue

if "make" in section_data and section_data["make"] != "no" and section_data["make"] not in ret:
+ if testenv.args.binary_repo and section_data.get("package", "no") != "no":
+ continue
ret += [section_data["make"]]

return ret


+def has_any_targets():
+ for cfg in testenv.testenv_cfg.cfgs.values():
+ if get_targets(cfg):
+ return True
+ return False
+
+
def init(cfg):
extra_opts = []
if testenv.args.asan:

To view, visit change 43772. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I414e8e052c32acd8c2148b40eb5f75b57d1f293f
Gerrit-Change-Number: 43772
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith@sysmocom.de>