osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40303?usp=email )
Change subject: testenv: podman_install: show checked out commits
......................................................................
testenv: podman_install: show checked out commits
When running with --podman --binary-repo and a testsuite needs a
component for which we don't have a binary package (such as
sccp_demo_user), we need to clone the source and build it.
Show the commit from which we are building / have already built the
component.
Suggested-by: Pau Espin Pedrol <pespin(a)sysmocom.de>
Change-Id: I2837a41c919a9f7ef8c315ce5aa48fb4fe3f9a85
---
M _testenv/testenv/podman_install.py
1 file changed, 13 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/03/40303/1
diff --git a/_testenv/testenv/podman_install.py b/_testenv/testenv/podman_install.py
index 66777a6..13552b4 100644
--- a/_testenv/testenv/podman_install.py
+++ b/_testenv/testenv/podman_install.py
@@ -96,9 +96,18 @@
testenv.cmd.run(["apt-get", "-q", "install",
"-y", "--no-install-recommends"] + pkgs)
+def show_commit(project, cwd):
+ cmd = ["git", "-C", cwd, "-c",
"color.ui=always", "log", "-1", "--oneline"]
+ env = {"GIT_PAGER": "cat"}
+ logging.info(f"{project}: showing current commit")
+ testenv.cmd.run(cmd, no_podman=True, env=env)
+
+
def clone_project(project):
- if os.path.exists(os.path.join(git_dir, project)):
+ git_dir_project = os.path.join(git_dir, project)
+ if os.path.exists(git_dir_project):
logging.debug(f"{project}: already cloned")
+ show_commit(project, git_dir_project)
return
branch = "master"
@@ -129,6 +138,7 @@
url,
]
)
+ show_commit(project, git_dir_project)
def from_source_sccp_demo_user():
@@ -144,8 +154,8 @@
]
)
+ clone_project("libosmo-sigtran")
if not os.path.exists(sccp_demo_user_path):
- clone_project("libosmo-sigtran")
logging.info("Building sccp_demo_user")
testenv.cmd.run(["autoreconf", "-fi"], cwd=sccp_dir)
@@ -170,8 +180,8 @@
libosmocore_dir = os.path.join(git_dir, "libosmocore")
osmo_ns_dummy_path = os.path.join(libosmocore_dir, "utils/osmo-ns-dummy")
+ clone_project("libosmocore")
if not os.path.exists(osmo_ns_dummy_path):
- clone_project("libosmocore")
logging.info("Building osmo-ns-dummy")
testenv.cmd.run(["autoreconf", "-fi"], cwd=libosmocore_dir)
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40303?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: I2837a41c919a9f7ef8c315ce5aa48fb4fe3f9a85
Gerrit-Change-Number: 40303
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>