From 4a98456ce3f8e2fe16b950ed0060de0f6fe486ab Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Tue, 8 Jun 2021 14:42:46 -0700 Subject: [PATCH] gating: Switch test to run parted directly Tests should run the installed package, not the source. So use the test from RHEL 8.5.0 instead of from Fedora. Resolves: rhbz#1968763 --- tests/simple/run_tests.sh | 31 +++++-------------------------- tests/tests.yml | 21 ++++++++++----------- 2 files changed, 15 insertions(+), 37 deletions(-) diff --git a/tests/simple/run_tests.sh b/tests/simple/run_tests.sh index 9d40419..2d0079c 100755 --- a/tests/simple/run_tests.sh +++ b/tests/simple/run_tests.sh @@ -1,29 +1,8 @@ #!/bin/sh set -eux -: ${1?"Usage: $0 TESTSDIR"} - -TESTSDIR="$1" -SOURCEDIR="${TESTSDIR}/source/" -PACKAGE=parted - -cd "${TESTSDIR}" -if [ ! -e ${PACKAGE}.spec ]; then - echo "Missing ${PACKAGE}.spec" - pwd - ls - exit 1 -fi - -# This runs from the ./tests/ directory -# Install the dependencies from the spec which MUST be copied over by tests.yml -dnf -y build-dep ${PACKAGE}.spec - -# Flattened sources from standard-role-sources -cd "${SOURCEDIR}" || exit - -# Rebuild the package in place, also runs the %check -# skip %prep, it was already run on the source before it was copied over -rpmbuild --noprep --nodeps -bb --build-in-place "${TESTSDIR}/${PACKAGE}.spec" -RET=$? -exit ${RET} +# make a small disk image +fallocate -l 100M ./disk.img +parted -s ./disk.img mklabel gpt +parted -s ./disk.img 'mkpart root 1MiB 100%' +parted -m -s ./disk.img u s p diff --git a/tests/tests.yml b/tests/tests.yml index 5fde476..fd6548d 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -1,14 +1,13 @@ --- +# Run a simple parted test - hosts: localhost - tags: - - classic roles: - - role: standard-test-source - required_packages: - - dnf - - rpm-build - - git - - role: standard-test-basic - tests: - - simple: - run: "./run_tests.sh {{ tenv_workdir }}" + - role: standard-test-basic + tags: + - classic + required_packages: + - parted + + tests: + - simple: + run: ./run_tests.sh