[S] Change in osmo-ttcn3-hacks[master]: testenv: build virtphy from src with --binary-repo
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38851?usp=email ) Change subject: testenv: build virtphy from src with --binary-repo ...................................................................... testenv: build virtphy from src with --binary-repo Add logic to build virtphy from source when running with --binary-repo. This extra code path is needed because we currently don't have virtphy packaged (like trxcon and sccp_demo_user), and we need to build the libosmocore binary package instead of building completely from source as we would do it with osmo-dev. Use ".split(" ", 1)[0]" on the program= value to only look at its first word, so we can later on use it in testenv.cfg file as follows: [virtphy] program=virtphy -s /tmp/osmocom_l2 Change-Id: I37bac8509b2601286e4feab099782f82c8338dca --- M _testenv/testenv/podman_install.py 1 file changed, 20 insertions(+), 1 deletion(-) Approvals: osmith: Looks good to me, approved pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/_testenv/testenv/podman_install.py b/_testenv/testenv/podman_install.py index 3c38285..9033c14 100644 --- a/_testenv/testenv/podman_install.py +++ b/_testenv/testenv/podman_install.py @@ -13,6 +13,7 @@ git_dir = None bb_dir = None trxcon_dir = None +virtphy_dir = None sccp_dir = None jobs = None @@ -21,12 +22,14 @@ global git_dir global bb_dir global trxcon_dir + global virtphy_dir global sccp_dir global jobs git_dir = os.path.join(testenv.args.cache, "git") bb_dir = os.path.join(git_dir, "osmocom-bb") trxcon_dir = os.path.join(bb_dir, "src/host/trxcon") + virtphy_dir = os.path.join(bb_dir, "src/host/virt_phy") sccp_dir = os.path.join(git_dir, "libosmo-sigtran") jobs = multiprocessing.cpu_count() + 1 @@ -148,6 +151,20 @@ testenv.cmd.run(["ln", "-s", trxcon_in_srcdir, "/usr/local/bin/trxcon"]) +def from_source_virtphy(): + virtphy_in_srcdir = os.path.join(virtphy_dir, "src/virtphy") + + if not os.path.exists(virtphy_in_srcdir): + clone_osmocom_bb() + apt_install(["libosmocore-dev"]) + logging.info("Building virtphy") + testenv.cmd.run(["autoreconf", "-fi"], cwd=virtphy_dir) + testenv.cmd.run(["./configure"], cwd=virtphy_dir) + testenv.cmd.run(["make", "-j", f"{jobs}"], cwd=virtphy_dir) + + testenv.cmd.run(["ln", "-s", virtphy_in_srcdir, "/usr/local/bin/virtphy"]) + + def from_source_sccp_demo_user(): sccp_demo_user_path = os.path.join(sccp_dir, "examples/sccp_demo_user") @@ -178,9 +195,11 @@ def from_source(cfg, cfg_name, section): - program = cfg[section]["program"] + program = cfg[section]["program"].split(" ", 1)[0] if program == "trxcon": return from_source_trxcon() + if program == "virtphy": + return from_source_virtphy() if program == "run_fake_trx.sh": return clone_osmocom_bb() if program == "run_sccp_demo_user.sh": -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38851?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: I37bac8509b2601286e4feab099782f82c8338dca Gerrit-Change-Number: 38851 Gerrit-PatchSet: 2 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> Gerrit-Reviewer: pespin <pespin@sysmocom.de>
participants (1)
-
osmith