osmith has submitted this change. ( 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(-)
Approvals:
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
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 24ef731..7b5e734 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: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I060421a0e79aa4d16a0c6f91f5e153f54d0ab825
Gerrit-Change-Number: 43774
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43775?usp=email )
Change subject: bts: use osmo-dev to build osmo-trx-proxy, trxcon
......................................................................
bts: use osmo-dev to build osmo-trx-proxy, trxcon
Both test components are considered to be part of the testsuite and
shall always be built from source (current master in jenkins). Set
package=no to do this and remove legacy fake-trx code for latest that
was only kept because I had assumed we must install osmo-trx-proxy and
trxcon through binary packages.
Related: OS#6638#note-12
Depends: osmo-ci Id7521e9941f651608b39e8b7b2a6437a0e483022
Change-Id: Ifb6761b3fc15a29404dd0ea17b039fde30053d13
---
D bts/run_fake_trx.sh
M bts/testenv_generic.cfg
M bts/testenv_hopping.cfg
M bts/testenv_oml.cfg
4 files changed, 6 insertions(+), 34 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/bts/run_fake_trx.sh b/bts/run_fake_trx.sh
deleted file mode 100755
index a1d869e..0000000
--- a/bts/run_fake_trx.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-# Most BTS_Tests require to have fake_trx running.
-# fake trx is part of osmo-trx
-
-if [ "$TESTENV_BINARY_REPO" = 1 ]; then
- # testenv with --binary-repo -> osmocom-bb-trx-toolkit package
- FAKE_TRX_DIR="/usr/share/osmocom-bb/trx_toolkit"
-elif [ -n "$TESTENV_SRC_DIR" ]; then
- # testenv without --binary-repo -> osmocom-bb cloned via osmo-dev
- FAKE_TRX_DIR="$TESTENV_SRC_DIR"/osmocom-bb/src/target/trx_toolkit
-fi
-
-FAKE_TRX_DIR="${FAKE_TRX_DIR:-../../osmo-trx/osmocom-bb/src/target/trx_toolkit}"
-
-cd "$FAKE_TRX_DIR"
-exec ./fake_trx.py --trx TRX1@127.0.0.1:5700/1 --trx TRX2@127.0.0.1:5700/2 --trx TRX3@127.0.0.1:5700/3
diff --git a/bts/testenv_generic.cfg b/bts/testenv_generic.cfg
index 87831cd..4807d7f 100644
--- a/bts/testenv_generic.cfg
+++ b/bts/testenv_generic.cfg
@@ -12,17 +12,13 @@
prepare=require_ulimit_r.sh 32
program=osmo-trx-proxy
make=osmo-trx
-package=osmo-trx-proxy
+package=no
copy=osmo-trx-proxy.cfg
-# TODO: Remove *_latest after osmo-trx >= 1.9.0 was released
-program_latest=run_fake_trx.sh
-make_latest=.make.osmocom-bb.clone
-package_latest=osmocom-bb-trx-toolkit
[trxcon]
program=trxcon
make=trxcon
-package=osmocom-bb-trxcon
+package=no
[bts]
prepare=require_ulimit_r.sh 30
diff --git a/bts/testenv_hopping.cfg b/bts/testenv_hopping.cfg
index b9fadc3..a7fba70 100644
--- a/bts/testenv_hopping.cfg
+++ b/bts/testenv_hopping.cfg
@@ -15,17 +15,13 @@
prepare=require_ulimit_r.sh 32
program=osmo-trx-proxy
make=osmo-trx
-package=osmo-trx-proxy
+package=no
copy=osmo-trx-proxy.cfg
-# TODO: Remove *_latest after osmo-trx >= 1.9.0 was released
-program_latest=run_fake_trx.sh
-make_latest=.make.osmocom-bb.clone
-package_latest=osmocom-bb-trx-toolkit
[trxcon]
program=trxcon
make=trxcon
-package=osmocom-bb-trxcon
+package=no
[bts]
prepare=require_ulimit_r.sh 30
diff --git a/bts/testenv_oml.cfg b/bts/testenv_oml.cfg
index a7f561d..11d09e4 100644
--- a/bts/testenv_oml.cfg
+++ b/bts/testenv_oml.cfg
@@ -6,17 +6,13 @@
prepare=require_ulimit_r.sh 32
program=osmo-trx-proxy
make=osmo-trx
-package=osmo-trx-proxy
+package=no
copy=osmo-trx-proxy.cfg
-# TODO: Remove *_latest after osmo-trx >= 1.9.0 was released
-program_latest=run_fake_trx.sh
-make_latest=.make.osmocom-bb.clone
-package_latest=osmocom-bb-trx-toolkit
[trxcon]
program=trxcon
make=trxcon
-package=osmocom-bb-trxcon
+package=no
[bts]
prepare=osmo-config-merge osmo-bts.cfg osmo-bts-oml.confmerge > osmo-bts-oml.cfg && require_ulimit_r.sh 30
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43775?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: Ifb6761b3fc15a29404dd0ea17b039fde30053d13
Gerrit-Change-Number: 43775
Gerrit-PatchSet: 4
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/43767?usp=email )
Change subject: jobs/ttcn3: build-with-osmo-dev -> init-osmo-dev
......................................................................
jobs/ttcn3: build-with-osmo-dev -> init-osmo-dev
It was requested that we always build osmo-trx-proxy and trxcon from
current master, even if running with "--binary-repo osmocom:latest".
Make the variable that controls osmo-dev initialization more descriptive
in preparation for this. With the previous name it may sound like we
build all Osmocom programs/libraries from source with osmo-dev (which we
don't).
Related: OS#6638#note-12
Change-Id: Ife365606e6887afdbb642b01ddbfdbe3c563e88d
---
M jobs/ttcn3-testsuites-testenv.yml
1 file changed, 5 insertions(+), 5 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
diff --git a/jobs/ttcn3-testsuites-testenv.yml b/jobs/ttcn3-testsuites-testenv.yml
index 32ad11b..20b0b66 100644
--- a/jobs/ttcn3-testsuites-testenv.yml
+++ b/jobs/ttcn3-testsuites-testenv.yml
@@ -654,13 +654,13 @@
# ---------------------------------------------
- ttcn3-onomondo-ipa-test:
testsuite: ipad
- build-with-osmo-dev: true
+ init-osmo-dev: true
timer: H 17 * * *
- ttcn3-onomondo-eim-test:
testsuite: eim
args: -c all
- build-with-osmo-dev: true
+ init-osmo-dev: true
timer: H 17 * * *
- job-template:
@@ -698,7 +698,7 @@
KERNEL="{kernel}"
# Converting to lowercase is needed as jenkins-job-builder sets it to "True" / "False"
- BUILD_WITH_OSMO_DEV="$(echo '{build-with-osmo-dev}' | tr '[:upper:]' '[:lower:]')"
+ INIT_OSMO_DEV="$(echo '{init-osmo-dev}' | tr '[:upper:]' '[:lower:]')"
podman pull "$IMAGE"
@@ -739,7 +739,7 @@
uptime | grep --color=always -o "load.*"
- if $BUILD_WITH_OSMO_DEV; then
+ if $INIT_OSMO_DEV; then
src/osmo-ttcn3-hacks/testenv.py init osmo-dev
fi
@@ -798,4 +798,4 @@
colormap: xterm
email: jenkins-notifications(a)lists.osmocom.org
args: ""
- build-with-osmo-dev: false
+ init-osmo-dev: false
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/43767?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ife365606e6887afdbb642b01ddbfdbe3c563e88d
Gerrit-Change-Number: 43767
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: osmith.
fixeria has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43775?usp=email )
Change subject: bts: use osmo-dev to build osmo-trx-proxy, trxcon
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43775?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: Ifb6761b3fc15a29404dd0ea17b039fde30053d13
Gerrit-Change-Number: 43775
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 06 Oct 2026 11:02:35 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: osmith.
fixeria has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43773?usp=email )
Change subject: testenv: cmd: init_env: split up by envtype
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43773?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: Ib5532d8eab0a05d5390a92e88dcc67f5ab00eba9
Gerrit-Change-Number: 43773
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 06 Oct 2026 11:00:55 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: fixeria.
pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-trx/+/43784?usp=email )
Change subject: libosmo-trx: osmo_trxc_setformat_cb(): document all params
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/43784?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ic6efb19e3f4543f43b1b8612bbbfb73632f2b572
Gerrit-Change-Number: 43784
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 06 Oct 2026 10:58:54 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: osmith.
fixeria has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43772?usp=email )
Change subject: testenv: run osmo-dev logic for --binary-repo too
......................................................................
Patch Set 2: Code-Review+2
--
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: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I414e8e052c32acd8c2148b40eb5f75b57d1f293f
Gerrit-Change-Number: 43772
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 06 Oct 2026 10:58:51 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes