Skip to content

Commit

Permalink
ci: Pepper in date markers to help debug timing
Browse files Browse the repository at this point in the history
This should help out with determining what steps take the most time.
  • Loading branch information
jlebon committed Jul 19, 2018
1 parent 654e849 commit a5cb2e1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
13 changes: 9 additions & 4 deletions ci/libbuild.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/usr/bin/bash

pkg_upgrade() {
echo "Running yum -y distro-sync... $(date)"
yum -y distro-sync
echo "Done yum -y distro-sync! $(date)"
}

make() {
Expand All @@ -15,7 +17,9 @@ build() {
}

pkg_install() {
echo "Running yum -y install... $(date)"
yum -y install "$@"
echo "Done running yum -y install! $(date)"
}

pkg_install_if_os() {
Expand All @@ -31,25 +35,26 @@ pkg_install_if_os() {
}

pkg_builddep() {
echo "Running builddep... $(date)"
# This is sadly the only case where it's a different command
if test -x /usr/bin/dnf; then
dnf builddep -y "$@"
else
yum-builddep -y "$@"
fi
echo "Done running builddep! $(date)"
}

pkg_install_builddeps() {
pkg=$1
if test -x /usr/bin/dnf; then
yum -y install dnf-plugins-core
yum install -y 'dnf-command(builddep)'
pkg_install dnf-plugins-core 'dnf-command(builddep)'
# Base buildroot
pkg_install @buildsys-build
else
yum -y install yum-utils
pkg_install yum-utils
# Base buildroot, copied from the mock config sadly
yum -y install bash bzip2 coreutils cpio diffutils system-release findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz
pkg_install bash bzip2 coreutils cpio diffutils system-release findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz
fi
# builddeps+runtime deps
pkg_builddep $pkg
Expand Down
3 changes: 2 additions & 1 deletion tests/compose
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ datadir_owner=$(stat -c '%u' ${test_compose_datadir})
test ${uid} = ${datadir_owner}

# Create a consistent cache of the RPMs
echo "Preparing compose tests..."
echo "Preparing compose tests... $(date)"
tmp_repo=${test_compose_datadir}/tmp-repo
if test -z "${RPMOSTREE_COMPOSE_CACHEONLY:-}"; then
mkdir -p ${test_compose_datadir}/cache
Expand All @@ -51,6 +51,7 @@ if test -z "${RPMOSTREE_COMPOSE_CACHEONLY:-}"; then
rpm-ostree compose --repo=${tmp_repo} tree --download-only --cachedir=${test_compose_datadir}/cache ${dn}/composedata/fedora-base.json
(cd ${test_compose_datadir}/cache && createrepo_c .)
fi
echo "Done preparing compose tests! $(date)"
rm ${tmp_repo} -rf

total=0
Expand Down

0 comments on commit a5cb2e1

Please sign in to comment.