osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40372?usp=email )
Change subject: testenv: add TESTENV_INSTALL_DIR ...................................................................... testenv: add TESTENV_INSTALL_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, 13 insertions(+), 10 deletions(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve diff --git a/_testenv/testenv/cmd.py b/_testenv/testenv/cmd.py index f84769d..24dc110 100644 --- a/_testenv/testenv/cmd.py +++ b/_testenv/testenv/cmd.py @@ -8,26 +8,28 @@ import testenv.testsuite env_extra = {} -usr_dir = None +install_dir = None def init_env(): global env_extra - global usr_dir + global install_dir if testenv.args.podman: - if not testenv.args.binary_repo: - usr_dir = os.path.join(testenv.args.cache, "podman", "usr") + if testenv.args.binary_repo: + install_dir = "/" + else: + install_dir = os.path.join(testenv.args.cache, "podman") else: - usr_dir = os.path.join(testenv.args.cache, "host", "usr") + install_dir = os.path.join(testenv.args.cache, "host") - if usr_dir: - pkg_config_path = os.path.join(usr_dir, "lib/pkgconfig") + if not testenv.args.binary_repo: + pkg_config_path = os.path.join(install_dir, "usr/lib/pkgconfig") if "PKG_CONFIG_PATH" in os.environ: pkg_config_path += f":{os.environ.get('PKG_CONFIG_PATH')}" pkg_config_path += ":/usr/lib/pkgconfig" - ld_library_path = os.path.join(usr_dir, "lib") + ld_library_path = os.path.join(install_dir, "usr/lib") if "LD_LIBRARY_PATH" in os.environ: ld_library_path += f":{os.environ.get('LD_LIBRARY_PATH')}" ld_library_path += ":/usr/lib" @@ -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_INSTALL_DIR"] = install_dir env_extra["TERM"] = os.environ.get("TERM", "dumb") @@ -71,8 +74,8 @@ if testenv.args.action == "run" and testenv.testsuite.ttcn3_hacks_dir: path += f":{os.path.join(testenv.testsuite.ttcn3_hacks_dir, testenv.args.testsuite)}" - if usr_dir: - path += f":{os.path.join(usr_dir, 'bin')}" + if install_dir and install_dir != "/": + path += f":{os.path.join(install_dir, 'usr/bin')}" if podman: path += ":/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -- 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: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I0a45e67c40a2c1d2220ef301e3e51178939f60b6 Gerrit-Change-Number: 40372 Gerrit-PatchSet: 3 Gerrit-Owner: osmith <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <[email protected]> Gerrit-Reviewer: osmith <[email protected]> Gerrit-Reviewer: pespin <[email protected]>
