Skip to content

Commit

Permalink
Download srpm.
Browse files Browse the repository at this point in the history
  • Loading branch information
praiskup committed Feb 1, 2024
1 parent 81ac20e commit 3458e1b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
9 changes: 9 additions & 0 deletions mock/integration-tests/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ trap '$MOCKCMD --clean; exit 1' INT HUP QUIT TERM

# With TMT, we have the deps pre-installed by ansible.
if test -z "$TMT_VERSION"; then
MOCKSRPM=$(
cd "$TOPDIR" || exit 1
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"
Expand All @@ -49,6 +55,9 @@ if test -z "$TMT_VERSION"; 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

header "running regression tests"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# created by Packit PR or PUSH workflow. Pick the precise package version built
# from the latest commit in the PR.

_d=$(dirname "$(readlink -f "$0")")

if test -n "$PACKIT_PR_ID"; then
PROJECT=packit/rpm-software-management-mock-$PACKIT_PR_ID
COMMIT=$PACKIT_COMMIT_SHA
Expand All @@ -18,4 +20,4 @@ else
exit 1
fi

install-copr-packages "$PROJECT" "$COMMIT" "$@"
"$_d/install-copr-packages" "$PROJECT" "$COMMIT" "$@"
1 change: 0 additions & 1 deletion mock/integration-tests/testenvironment
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
TESTDIR=$(cd $(dirname $0); pwd; cd ..)
TOPDIR=$(dirname $TESTDIR)
MOCKSRPM=$( (cd $TOPDIR; tito build --srpm --offline |grep Wrote | grep src.rpm | awk '{ print $2}' ))
SIMPLESRPM=$TESTDIR/test-C-1.1-0.src.rpm

#VERBOSE=
Expand Down
4 changes: 4 additions & 0 deletions testing-farm/tests/old-testsuite/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

cd ../../../mock

# Install the tested RPMs
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
echo "The 'make check' testsuite passed."
Expand Down

0 comments on commit 3458e1b

Please sign in to comment.