osmith submitted this change.

View Change

Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve
testenv: fix passing env vars to daemons

When running without podman, environment variables from the host are
passed to the daemons started by testenv. This feature regressed by
calling generate_env with the wrong parameter order, using envtype for
podman:
def generate_env(env=None, podman=False, envtype="binary_repo"):

Fixes: SYS#8280
Fixes: 6cbec87b ("testenv: build package=no components with osmo-dev")
Change-Id: I5b6423a6671d36d824e488f1443cb9c16358c955
---
M _testenv/testenv/daemons.py
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/_testenv/testenv/daemons.py b/_testenv/testenv/daemons.py
index e6085b6..3ee1e6d 100644
--- a/_testenv/testenv/daemons.py
+++ b/_testenv/testenv/daemons.py
@@ -67,7 +67,7 @@
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, envtype))
+ daemons[section] = subprocess.Popen(cmd, cwd=cwd, env=testenv.cmd.generate_env(env, envtype=envtype))

# Wait 200ms and check if it is still running
time.sleep(0.2)

To view, visit change 43885. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I5b6423a6671d36d824e488f1443cb9c16358c955
Gerrit-Change-Number: 43885
Gerrit-PatchSet: 1
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>