ci: Pepper in date markers to help debug timing

This should help out with determining what steps take the most time.

Closes: #1459
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon 2018-07-19 13:45:12 -04:00 committed by Atomic Bot
parent 6ac6f3d086
commit b66337e0cb
2 changed files with 11 additions and 5 deletions

View File

@ -1,7 +1,9 @@
#!/usr/bin/bash #!/usr/bin/bash
pkg_upgrade() { pkg_upgrade() {
echo "Running yum -y distro-sync... $(date)"
yum -y distro-sync yum -y distro-sync
echo "Done yum -y distro-sync! $(date)"
} }
make() { make() {
@ -15,7 +17,9 @@ build() {
} }
pkg_install() { pkg_install() {
echo "Running yum -y install... $(date)"
yum -y install "$@" yum -y install "$@"
echo "Done running yum -y install! $(date)"
} }
pkg_install_if_os() { pkg_install_if_os() {
@ -31,25 +35,26 @@ pkg_install_if_os() {
} }
pkg_builddep() { pkg_builddep() {
echo "Running builddep... $(date)"
# This is sadly the only case where it's a different command # This is sadly the only case where it's a different command
if test -x /usr/bin/dnf; then if test -x /usr/bin/dnf; then
dnf builddep -y "$@" dnf builddep -y "$@"
else else
yum-builddep -y "$@" yum-builddep -y "$@"
fi fi
echo "Done running builddep! $(date)"
} }
pkg_install_builddeps() { pkg_install_builddeps() {
pkg=$1 pkg=$1
if test -x /usr/bin/dnf; then if test -x /usr/bin/dnf; then
yum -y install dnf-plugins-core pkg_install dnf-plugins-core 'dnf-command(builddep)'
yum install -y 'dnf-command(builddep)'
# Base buildroot # Base buildroot
pkg_install @buildsys-build pkg_install @buildsys-build
else else
yum -y install yum-utils pkg_install yum-utils
# Base buildroot, copied from the mock config sadly # 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 fi
# builddeps+runtime deps # builddeps+runtime deps
pkg_builddep $pkg pkg_builddep $pkg

View File

@ -41,7 +41,7 @@ datadir_owner=$(stat -c '%u' ${test_compose_datadir})
test ${uid} = ${datadir_owner} test ${uid} = ${datadir_owner}
# Create a consistent cache of the RPMs # Create a consistent cache of the RPMs
echo "Preparing compose tests..." echo "Preparing compose tests... $(date)"
tmp_repo=${test_compose_datadir}/tmp-repo tmp_repo=${test_compose_datadir}/tmp-repo
if test -z "${RPMOSTREE_COMPOSE_CACHEONLY:-}"; then if test -z "${RPMOSTREE_COMPOSE_CACHEONLY:-}"; then
mkdir -p ${test_compose_datadir}/cache mkdir -p ${test_compose_datadir}/cache
@ -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 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 .) (cd ${test_compose_datadir}/cache && createrepo_c .)
fi fi
echo "Done preparing compose tests! $(date)"
rm ${tmp_repo} -rf rm ${tmp_repo} -rf
total=0 total=0