diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..4ca9235 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-10 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/tests/test-brotli-with-curl.sh b/tests/test-brotli-with-curl.sh new file mode 100644 index 0000000..83ee499 --- /dev/null +++ b/tests/test-brotli-with-curl.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# exit immediately if any command returns non-zero exit code +set -e + +# print commands as they are executed by the shell interpreter +set -x + +# list of upstream tests to run +CURL_TESTS="314 315 316" + +# obtain source RPM of curl as there could be more than one +# url, use head to pick the first one +SRPM_URL=$(yum repoquery -q --srpm curl --location | head -n 1) +SRPM=${SRPM_URL##*/} +curl -Lo "$SRPM" "$SRPM_URL" + +# install build-time deps +yum -y builddep "$SRPM" + +# extract source RPM +rpmdev-extract "$SRPM" +cd "${SRPM%.rpm}" + +# local build of curl +rpmbuild --nodeps -bc curl.spec \ + --define "_sourcedir $PWD" \ + --define "_builddir $PWD" + +# local build of upstream tests +cd curl-*/build-full/tests + +# https://bugzilla.redhat.com/show_bug.cgi?id=2043092 +export RPM_ARCH=$(uname -m) +export RPM_PACKAGE_RELEASE=2 +export RPM_PACKAGE_VERSION=8.9.1 +export RPM_PACKAGE_NAME=curl + +make -j$(nproc) + +# run selected upstream tests +srcdir=../../tests perl -I../../tests ../../tests/runtests.pl -a -p -v $CURL_TESTS diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..bf2ff8e --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,12 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + tests: + - simple: + dir: . + run: ./test-brotli-with-curl.sh + required_packages: + - curl + - rpmdevtools