osmith has uploaded this change for review.

View Change

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, 18 insertions(+), 2 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/34/39934/1
diff --git a/_testenv/testenv/podman_install.py b/_testenv/testenv/podman_install.py
index 2c5ae5a..dd7d74d 100644
--- a/_testenv/testenv/podman_install.py
+++ b/_testenv/testenv/podman_install.py
@@ -20,7 +20,8 @@
global sccp_dir
global jobs

- git_dir = os.path.join(testenv.args.cache, "git")
+ git_dir = os.path.join(testenv.args.cache, "git", f"build_against_{testenv.args.binary_repo}")
+
sccp_dir = os.path.join(git_dir, "libosmo-sigtran")
jobs = multiprocessing.cpu_count() + 1

@@ -97,6 +98,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 +114,8 @@
"clone",
"--depth",
"1",
+ "--branch",
+ branch,
"https://gerrit.osmocom.org/libosmo-sigtran",
]
)
@@ -126,7 +137,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", "--enable-static", "--disable-shared"]
+ 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 change 39934. To unsubscribe, or for help writing mail filters, visit settings.

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