Skip to content

Commit

Permalink
sort out standard outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
praiskup committed Feb 1, 2024
1 parent 3458e1b commit d2dfd83
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
32 changes: 16 additions & 16 deletions mock/integration-tests/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,27 @@ if test -z "$TMT_VERSION"; then
tito build --srpm --offline | grep Wrote | grep src.rpm | awk '{ print $2 }'
)
test -e "$MOCKSRPM" || exit 1

if [ -e /usr/bin/dnf ]; then
header "pre-populating the cache (DNF)"
runcmd "$MOCKCMD --init --dnf"
header "clean up"
runcmd "$MOCKCMD --offline --clean"
else
header "pre-populating the cache (YUM)"
runcmd "$MOCKCMD --init"
fi
header "installing dependencies for $MOCKSRPM"
runcmd "$MOCKCMD --disable-plugin=tmpfs --installdeps $MOCKSRPM"
if [ ! -e $CHROOT/usr/include/python* ]; then
echo "installdeps test FAILED. could not find /usr/include/python*"
exit 1
fi
else
set -- /tmp/mock-test-srpms/mock-*.src.rpm
MOCKSRPM=$1
fi

if [ -e /usr/bin/dnf ]; then
header "pre-populating the cache (DNF)"
runcmd "$MOCKCMD --init --dnf"
header "clean up"
runcmd "$MOCKCMD --offline --clean"
else
header "pre-populating the cache (YUM)"
runcmd "$MOCKCMD --init"
fi
header "installing dependencies for $MOCKSRPM"
runcmd "$MOCKCMD --disable-plugin=tmpfs --installdeps $MOCKSRPM"
if [ ! -e $CHROOT/usr/include/python* ]; then
echo "installdeps test FAILED. could not find /usr/include/python*"
exit 1
fi

header "running regression tests"
sh ${TESTDIR}/runregressions.sh
fails=$?
Expand Down
6 changes: 2 additions & 4 deletions testing-farm/tests/old-testsuite/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh -eux
#!/bin/bash -eux

cd ../../../mock

Expand All @@ -8,11 +8,9 @@ install-mock-packages-built-by-packit mock-core-configs mock
# Download the tested SRPM
SRPM_DOWNLOAD_DIR=/tmp/mock-test-srpms install-mock-packages-built-by-packit mock

if make check >the-log 2>&1; then
grep -e FAILED: -e PASSED: the-log
if (make check > >(tee the-log | grep -e FAILED: -e PASSED:) 2>&1) >&2; then
echo "The 'make check' testsuite passed."
else
grep -e FAILED: -e PASSED: the-log
cat the-log
exit 1
fi

0 comments on commit d2dfd83

Please sign in to comment.