osmith has submitted this change. (
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, 12 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
diff --git a/_testenv/testenv/podman_install.py b/_testenv/testenv/podman_install.py
index 66777a6..a8293ef 100644
--- a/_testenv/testenv/podman_install.py
+++ b/_testenv/testenv/podman_install.py
@@ -96,9 +96,17 @@
testenv.cmd.run(["apt-get", "-q", "install",
"-y", "--no-install-recommends"] + pkgs)
+def show_commit(project, cwd):
+ cmd = ["git", "-P", "-C", cwd, "-c",
"color.ui=always", "log", "-1", "--oneline"]
+ logging.info(f"{project}: showing current commit")
+ testenv.cmd.run(cmd, no_podman=True)
+
+
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 +137,7 @@
url,
]
)
+ show_commit(project, git_dir_project)
def from_source_sccp_demo_user():
@@ -144,8 +153,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 +179,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: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I2837a41c919a9f7ef8c315ce5aa48fb4fe3f9a85
Gerrit-Change-Number: 40303
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>