osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43776?usp=email )


Change subject: sccp: use osmo-dev to build sccp_demo_user
......................................................................

sccp: use osmo-dev to build sccp_demo_user

Now that we can build test components with osmo-dev while running with
--binary-packages, we can get rid of a lot of extra code that was used
to implement another method for building this test component from
source. The osmo-dev version is also more convenient, because it uses
the normal libosmocore.git clone instead of making a separate one.

Depends: osmo-ci I4def3fa4d88d2f58696b20255b9b0f9fede5536e
Change-Id: I50728c4a11a3ef315a721d745762e56e9489645c
---
M _testenv/testenv/podman_install.py
M sccp/run_sccp_demo_user.sh
M sccp/testenv.cfg
3 files changed, 3 insertions(+), 46 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/76/43776/1

diff --git a/_testenv/testenv/podman_install.py 
b/_testenv/testenv/podman_install.py
index 438f875..c761a41 100644
--- a/_testenv/testenv/podman_install.py
+++ b/_testenv/testenv/podman_install.py
@@ -146,41 +146,6 @@
     show_commit(project, git_dir_project)


-def from_source_sccp_demo_user():
-    sccp_dir = os.path.join(git_dir, "libosmo-sigtran")
-    sccp_demo_user_path = os.path.join(sccp_dir, "examples/sccp_demo_user")
-
-    # Install libraries even if not building sccp_demo_user, because it gets
-    # linked dynamically against them.
-    apt_install(
-        [
-            "libosmo-netif-dev",
-            "libosmocore-dev",
-        ]
-    )
-
-    clone_project("libosmo-sigtran")
-    if not os.path.exists(sccp_demo_user_path):
-        logging.info("Building sccp_demo_user")
-        testenv.cmd.run(["autoreconf", "-fi"], 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"),
-        )
-        testenv.cmd.run(
-            ["make", "-j", f"{jobs}", "sccp_demo_user"],
-            cwd=os.path.join(sccp_dir, "examples"),
-        )
-
-    testenv.cmd.run(["ln", "-s", sccp_demo_user_path, 
"/usr/local/bin/sccp_demo_user"])
-
-
 def from_source_osmo_ns_dummy():
     libosmocore_dir = os.path.join(git_dir, "libosmocore")
     osmo_ns_dummy_path = os.path.join(libosmocore_dir, "utils/osmo-ns-dummy")
@@ -204,8 +169,6 @@

 def from_source(cfg, cfg_name, section):
     program = cfg[section]["program"].split(" ", 1)[0]
-    if program == "run_sccp_demo_user.sh":
-        return from_source_sccp_demo_user()
     if program == "run_osmo_ns_dummy.sh":
         return from_source_osmo_ns_dummy()

diff --git a/sccp/run_sccp_demo_user.sh b/sccp/run_sccp_demo_user.sh
index 88cd507..8cea881 100755
--- a/sccp/run_sccp_demo_user.sh
+++ b/sccp/run_sccp_demo_user.sh
@@ -1,11 +1,4 @@
 #!/bin/sh -ex

-if [ -n "$OSMO_DEV_MAKE_DIR" ]; then
-       # Using osmo-dev: either with or without --podman
-       exec "$OSMO_DEV_MAKE_DIR"/libosmo-sigtran/examples/sccp_demo_user "$@"
-fi
-
-# Using binary packages: as sccp_demo_user is not packaged it gets
-# built by testenv/podman_install.py:from_source_sccp_demo_user()
-# and symlinked to /usr/local/bin.
-exec sccp_demo_user "$@"
+# sccp_demo_user is always built with osmo-dev, even if using --binary-packages
+exec "$OSMO_DEV_MAKE_DIR"/libosmo-sigtran/examples/sccp_demo_user "$@"
diff --git a/sccp/testenv.cfg b/sccp/testenv.cfg
index de7b630..3416409 100644
--- a/sccp/testenv.cfg
+++ b/sccp/testenv.cfg
@@ -5,4 +5,5 @@
 [sccp_demo_user]
 program=run_sccp_demo_user.sh -l 127.0.0.2 -r 127.0.0.1 -C sccp_demo_user.cfg
 make=libosmo-sigtran
+package=no
 copy=sccp_demo_user.cfg

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43776?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I50728c4a11a3ef315a721d745762e56e9489645c
Gerrit-Change-Number: 43776
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <[email protected]>

Reply via email to