osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39934?usp=email ) Change subject: sccp: testenv: fix run with asan + latest binaries ...................................................................... sccp: testenv: fix run with asan + latest binaries When running against osmocom:nightly:asan, build sccp_demo_user with --enable-sanitize. Otherwise this code is not running with asan and doesn't even start (as the libraries we link against are built with --enable-sanitize). When running against osmocom:latest, check out the latest tag instead of current master. Fixes: OS#5899 Change-Id: I5307125560694feae9f0978ebd27607a77ed8675 --- M _testenv/testenv/podman_install.py 1 file changed, 22 insertions(+), 2 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/_testenv/testenv/podman_install.py b/_testenv/testenv/podman_install.py index 2c5ae5a..a27abd8 100644 --- a/_testenv/testenv/podman_install.py +++ b/_testenv/testenv/podman_install.py @@ -20,7 +20,12 @@ global sccp_dir global jobs - git_dir = os.path.join(testenv.args.cache, "git") + # Make the git dir we clone into specific to the repository we build + # against. Replace ":" because the libtool scripts fail to escape it when + # setting LD_LIBRARY_PATH, leading to "cannot open shared object file" + # errors. + git_dir = os.path.join(testenv.args.cache, "git", f"build_against_{testenv.args.binary_repo}".replace(":", "_")) + sccp_dir = os.path.join(git_dir, "libosmo-sigtran") jobs = multiprocessing.cpu_count() + 1 @@ -97,6 +102,14 @@ logging.debug("libosmo-sigtran: already cloned") return + branch = "master" + if testenv.args.binary_repo.endswith(":latest"): + ls_remote = testenv.cmd.run( + ["git", "ls-remote", "--tags", "https://gerrit.osmocom.org/libosmo-sigtran"], capture_output=True, text=True + ) + branch = ls_remote.stdout.split("\n")[-2].split("refs/tags/")[1].split("^")[0] + + logging.info(f"libosmo-sigtran: cloning {branch}") testenv.cmd.run( [ "git", @@ -105,6 +118,8 @@ "clone", "--depth", "1", + "--branch", + branch, "https://gerrit.osmocom.org/libosmo-sigtran", ] ) @@ -126,7 +141,12 @@ clone_libosmo_sigtran() logging.info("Building sccp_demo_user") testenv.cmd.run(["autoreconf", "-fi"], cwd=sccp_dir) - testenv.cmd.run(["./configure"], cwd=sccp_dir) + + configure_cmd = ["./configure"] + if testenv.args.binary_repo.endswith(":asan"): + configure_cmd += ["--enable-sanitize"] + testenv.cmd.run(configure_cmd, cwd=sccp_dir) + testenv.cmd.run( ["make", "-j", f"{jobs}", "libosmo-sigtran.la"], cwd=os.path.join(sccp_dir, "src"), -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39934?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: I5307125560694feae9f0978ebd27607a77ed8675 Gerrit-Change-Number: 39934 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: osmith <osmith@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de>