osmith has uploaded this change for review.

View Change

testenv: cmd: pass all env vars without --podman

As suggested by Pau, pass all environment variables to through testenv
if it is running without podman. This way a custom TTCN3_DIR,
TTCN3_BIN_DIR and more variables that may make sense when running
directly on the host, work as expected.

Closes: OS#6544
Change-Id: I5e710a1ee7185a3f6f4f1e98f201f3f6fda2be55
---
M _testenv/testenv/cmd.py
1 file changed, 7 insertions(+), 0 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/84/37884/1
diff --git a/_testenv/testenv/cmd.py b/_testenv/testenv/cmd.py
index cb8386a..6f502fc 100644
--- a/_testenv/testenv/cmd.py
+++ b/_testenv/testenv/cmd.py
@@ -78,6 +78,13 @@

for var in env:
ret[var] = env[var]
+
+ # Without podman: pass all environment variables from host (OS#6544)
+ if not podman:
+ for var in os.environ:
+ if var not in ret:
+ ret[var] = os.environ.get(var)
+
return ret



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

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