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


Change subject: testenv: add TESTENV_USR_DIR
......................................................................

testenv: add TESTENV_USR_DIR

This is useful for e.g. the new 5gc testsuite.

Suggested-by: Pau Espin Pedrol <[email protected]>
Change-Id: I0a45e67c40a2c1d2220ef301e3e51178939f60b6
---
M _testenv/testenv/cmd.py
1 file changed, 5 insertions(+), 2 deletions(-)



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

diff --git a/_testenv/testenv/cmd.py b/_testenv/testenv/cmd.py
index f84769d..5e01017 100644
--- a/_testenv/testenv/cmd.py
+++ b/_testenv/testenv/cmd.py
@@ -16,12 +16,14 @@
     global usr_dir

     if testenv.args.podman:
-        if not testenv.args.binary_repo:
+        if testenv.args.binary_repo:
+            usr_dir = "/usr"
+        else:
             usr_dir = os.path.join(testenv.args.cache, "podman", "usr")
     else:
         usr_dir = os.path.join(testenv.args.cache, "host", "usr")

-    if usr_dir:
+    if not testenv.args.binary_repo:
         pkg_config_path = os.path.join(usr_dir, "lib/pkgconfig")
         if "PKG_CONFIG_PATH" in os.environ:
             pkg_config_path += f":{os.environ.get('PKG_CONFIG_PATH')}"
@@ -38,6 +40,7 @@
     env_extra["CCACHE_DIR"] = testenv.args.ccache
     env_extra["TESTENV_CACHE_DIR"] = testenv.args.cache
     env_extra["TESTENV_SRC_DIR"] = testenv.src_dir
+    env_extra["TESTENV_USR_DIR"] = usr_dir

     env_extra["TERM"] = os.environ.get("TERM", "dumb")


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40372?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: I0a45e67c40a2c1d2220ef301e3e51178939f60b6
Gerrit-Change-Number: 40372
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <[email protected]>

Reply via email to