Attention is currently required from: jolly.
dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43762?usp=email )
Change subject: RSPDefinitions_Templates: use a more realistic data in ts_boundProfilePackage
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43762?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia987f4d802b360b6dd5b3cc400f9e20b215cff9d
Gerrit-Change-Number: 43762
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Mon, 05 Oct 2026 13:18:48 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
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 <osmith(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43774?usp=email )
Change subject: testenv: build package=no components with osmo-dev
......................................................................
testenv: build package=no components with osmo-dev
Handle the case of running with --binary-repo, but setting some test
components to package=no to have them built from source with osmo-dev.
For this to work, the envtype needs to be adjusted and passed through
related functions.
Related: OS#6638#note-12
Change-Id: I060421a0e79aa4d16a0c6f91f5e153f54d0ab825
---
M _testenv/README.md
M _testenv/testenv/cmd.py
M _testenv/testenv/daemons.py
M _testenv/testenv/osmo_dev.py
M _testenv/testenv/podman.py
5 files changed, 19 insertions(+), 12 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/74/43774/1
diff --git a/_testenv/README.md b/_testenv/README.md
index 047abc0..f10d349 100644
--- a/_testenv/README.md
+++ b/_testenv/README.md
@@ -105,7 +105,10 @@
* `package=`: debian package(s) to be installed for running a test component
and the script in `prepare=`. Multiple values separated by spaces. Set to
- `package=no` to not install any package.
+ `package=no` to not install any package, in which case osmo-dev will be used
+ to build the `make=` target. With both `package=no` and `make=no`, testenv
+ assumes that nothing needs to be installed or built before the test component
+ can be started.
* `prepare=`: optional script to run before staring the program (after files
are copied to the test directory). Typically this is used to create configs
diff --git a/_testenv/testenv/cmd.py b/_testenv/testenv/cmd.py
index 0e35d2a..bf4f4f8 100644
--- a/_testenv/testenv/cmd.py
+++ b/_testenv/testenv/cmd.py
@@ -144,7 +144,7 @@
envtype = "binary_repo" if getattr(testenv.args, "binary_repo", True) else "osmo_dev"
if not no_podman and testenv.args.podman:
- return testenv.podman.exec_cmd(cmd, check=check, env=env, **kwargs)
+ return testenv.podman.exec_cmd(cmd, check=check, env=env, envtype=envtype, **kwargs)
logging.debug(f"+ {cmd}")
diff --git a/_testenv/testenv/daemons.py b/_testenv/testenv/daemons.py
index 2abe8c8..0c402e9 100644
--- a/_testenv/testenv/daemons.py
+++ b/_testenv/testenv/daemons.py
@@ -59,11 +59,15 @@
if testenv.args.io_uring:
env["LIBOSMO_IO_BACKEND"] = "IO_URING"
+ envtype = "osmo_dev"
+ if testenv.args.binary_repo and section_data["package"] != "no":
+ envtype = "binary_repo"
+
if testenv.args.podman:
- daemons[section] = testenv.podman.exec_cmd_background(cmd, cwd=cwd, env=env)
+ daemons[section] = testenv.podman.exec_cmd_background(cmd, cwd=cwd, env=env, envtype=envtype)
else:
logging.debug(f"+ {cmd}")
- daemons[section] = subprocess.Popen(cmd, cwd=cwd, env=testenv.cmd.generate_env(env))
+ daemons[section] = subprocess.Popen(cmd, cwd=cwd, env=testenv.cmd.generate_env(env, envtype))
# Wait 200ms and check if it is still running
time.sleep(0.2)
diff --git a/_testenv/testenv/osmo_dev.py b/_testenv/testenv/osmo_dev.py
index 65dbfcc..edbe1b2 100644
--- a/_testenv/testenv/osmo_dev.py
+++ b/_testenv/testenv/osmo_dev.py
@@ -111,7 +111,7 @@
] + extra_opts
cwd = get_osmo_dev_dir()
- if testenv.cmd.run(cmd, cwd=cwd, check=False).returncode:
+ if testenv.cmd.run(cmd, cwd=cwd, check=False, envtype="osmo_dev").returncode:
logging.critical("gen_makefile.py from osmo-dev failed!")
logging.critical("Your osmo-dev.git clone might be outdated, try:")
logging.critical(f"$ git -C {shlex.quote(cwd)} pull")
@@ -141,4 +141,4 @@
sys.exit(1)
logging.info("Building test components")
- testenv.cmd.run(["make"] + targets, cwd=testenv.cmd.make_dir)
+ testenv.cmd.run(["make"] + targets, cwd=testenv.cmd.make_dir, envtype="osmo_dev")
diff --git a/_testenv/testenv/podman.py b/_testenv/testenv/podman.py
index b7ed29d..f78b844 100644
--- a/_testenv/testenv/podman.py
+++ b/_testenv/testenv/podman.py
@@ -80,11 +80,11 @@
)
-def generate_env_podman(env=None):
+def generate_env_podman(env=None, envtype="binary_repo"):
env = env or {}
ret = []
- for key, val in testenv.cmd.generate_env(env, True).items():
+ for key, val in testenv.cmd.generate_env(env, True, envtype=envtype).items():
ret += ["-e", f"{key}={val}"]
return ret
@@ -135,7 +135,7 @@
run_shell_on_stop = True
-def exec_cmd(cmd, podman_opts=None, cwd=None, env=None, **kwargs):
+def exec_cmd(cmd, podman_opts=None, cwd=None, env=None, envtype="binary_repo", **kwargs):
podman_opts = podman_opts or []
env = env or {}
@@ -143,7 +143,7 @@
raise RuntimeError(f"Attempting to execute a command in podman, but the container isn't running anymore: {cmd}")
podman_opts = list(podman_opts)
- podman_opts += generate_env_podman(env)
+ podman_opts += generate_env_podman(env, envtype)
# Attach a fake tty (eclipse-titan won't print colored output otherwise)
podman_opts += ["-t"]
@@ -160,11 +160,11 @@
)
-def exec_cmd_background(cmd, podman_opts=None, cwd=None, env=None):
+def exec_cmd_background(cmd, podman_opts=None, cwd=None, env=None, envtype="binary_repo"):
podman_opts = podman_opts or []
env = env or {}
- podman_opts = list(podman_opts) + generate_env_podman(env)
+ podman_opts = list(podman_opts) + generate_env_podman(env, envtype)
if cwd:
podman_opts += ["-w", cwd]
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43774?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: I060421a0e79aa4d16a0c6f91f5e153f54d0ab825
Gerrit-Change-Number: 43774
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43772?usp=email )
Change subject: testenv: run osmo-dev logic for --binary-repo too
......................................................................
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 https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43772?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: I414e8e052c32acd8c2148b40eb5f75b57d1f293f
Gerrit-Change-Number: 43772
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43771?usp=email )
Change subject: testenv: podman: always mount osmo-dev dir
......................................................................
testenv: podman: always mount osmo-dev dir
Prepare to be able to use osmo-dev for building some test components
from source even if running with --binary-packages. This is needed for
e.g. the bts testsuite, where we should always use master for both
trxcon and osmo-trx-proxy, regardless of the osmo-bts version
(nightly/latest/asan). These are part of the testsuite and not SUT.
Related: OS#6638#note-12
Change-Id: Ie470be84dd7b9f34dfe8ed461710c1964b481984
---
M _testenv/testenv/podman.py
1 file changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/71/43771/1
diff --git a/_testenv/testenv/podman.py b/_testenv/testenv/podman.py
index 0293712..b7ed29d 100644
--- a/_testenv/testenv/podman.py
+++ b/_testenv/testenv/podman.py
@@ -264,11 +264,11 @@
"-e",
"TESTENV_BINARY_REPO=1",
]
- else:
- cmd += [
- "--volume",
- f"{osmo_dev_dir}:{osmo_dev_dir}",
- ]
+
+ cmd += [
+ "--volume",
+ f"{osmo_dev_dir}:{osmo_dev_dir}",
+ ]
if testenv.args.kernel:
if not os.environ.get("TESTENV_NO_KVM") and os.path.exists("/dev/kvm"):
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43771?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: Ie470be84dd7b9f34dfe8ed461710c1964b481984
Gerrit-Change-Number: 43771
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>