From 160136a2362dbd8b1e274238ed74007a2575d4d2 Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Wed, 21 Jun 2023 14:42:45 +0200 Subject: [PATCH] import sources --- .gitignore | 4 ++-- tests/test-brotli-with-curl.sh | 34 ++++++++++++++++++++++++++++++++++ tests/tests.yml | 12 ++++++++++++ 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 tests/test-brotli-with-curl.sh create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore index 463a397..bd50d76 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/v1.0.6.tar.gz -/v1.0.6.tar.gz +/v*.tar.gz +*.src.rpm diff --git a/tests/test-brotli-with-curl.sh b/tests/test-brotli-with-curl.sh new file mode 100644 index 0000000..6a875d5 --- /dev/null +++ b/tests/test-brotli-with-curl.sh @@ -0,0 +1,34 @@ +#!/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 +SRPM_URL=$(yum repoquery -q --srpm curl --location) +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 +make $(rpm --eval '%{_smp_mflags}') + +# 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