From d0815409335247242383f0adb13c162adabbeb31 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Fri, 15 Nov 2024 14:06:33 +0200 Subject: [PATCH] Eliminate all uses of the now redundant run() in test-suite --- tests/atlocal.in | 7 +------ tests/rpmbuild.at | 30 +++++++++++++++--------------- tests/rpmdb.at | 2 +- tests/rpmmacro.at | 6 +++--- 4 files changed, 20 insertions(+), 25 deletions(-) diff --git a/tests/atlocal.in b/tests/atlocal.in index 18337b56a9..3ec3f1802e 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -110,16 +110,11 @@ setup_env() fi } -run() -{ - "$@" -} - rundebug() { export RPM_CONFIGDIR=${RPMTEST}/@RPM_CONFIGDIR@ cp ${RPMDATA}/macros.debug ${RPM_CONFIGDIR}/macros.d/ - run "$@" + "$@" rm -f ${RPM_CONFIGDIR}/macros.d/macros.debug unset RPM_CONFIGDIR } diff --git a/tests/rpmbuild.at b/tests/rpmbuild.at index c816e00fa7..f3e6990e28 100644 --- a/tests/rpmbuild.at +++ b/tests/rpmbuild.at @@ -25,7 +25,7 @@ AT_KEYWORDS([build]) RPMDB_INIT RPMTEST_CHECK([ -run rpmbuild \ +rpmbuild \ --define "packager Iam" \ -ba ${RPMDATA}/SPECS/hello.spec ], @@ -339,7 +339,7 @@ AT_SETUP([rpmbuild dir layout]) AT_KEYWORDS([build]) RPMDB_INIT RPMTEST_CHECK([ -run rpmbuild \ +rpmbuild \ -bi --target noarch --quiet \ ${RPMDATA}/SPECS/simple.spec runroot_other find /build/BUILD|sort @@ -357,7 +357,7 @@ runroot_other find /build/BUILD|sort [ignore]) RPMTEST_CHECK([ -run rpmbuild \ +rpmbuild \ -bi --target noarch --quiet \ --with setup \ ${RPMDATA}/SPECS/simple.spec @@ -386,7 +386,7 @@ AT_KEYWORDS([build]) RPMDB_INIT RPMTEST_CHECK([ -run rpmbuild \ +rpmbuild \ -ba ${RPMDATA}/SPECS/hello-auto.spec ], [0], @@ -399,7 +399,7 @@ AT_KEYWORDS([build]) RPMDB_INIT RPMTEST_CHECK([ -run rpmbuild -D="nopatches 1" \ +rpmbuild -D="nopatches 1" \ -bp ${RPMDATA}/SPECS/hello-auto.spec ], [0], @@ -526,7 +526,7 @@ AT_KEYWORDS([build]) RPMDB_INIT RPMTEST_CHECK([ -run rpmbuild \ +rpmbuild \ -bp ${RPMDATA}/SPECS/autosetup-noroot.spec ], [0], @@ -535,7 +535,7 @@ run rpmbuild \ RPMTEST_CHECK([ -run rpmbuild \ +rpmbuild \ -bp ${RPMDATA}/SPECS/autosetup-singleroot.spec ], [0], @@ -543,7 +543,7 @@ run rpmbuild \ [ignore]) RPMTEST_CHECK([ -run rpmbuild \ +rpmbuild \ -bp ${RPMDATA}/SPECS/autosetup-singleroot1.spec ], [0], @@ -551,7 +551,7 @@ run rpmbuild \ [ignore]) RPMTEST_CHECK([ -run rpmbuild \ +rpmbuild \ -bp ${RPMDATA}/SPECS/autosetup-singleroot2.spec ], [0], @@ -564,7 +564,7 @@ AT_KEYWORDS([build]) RPMDB_INIT RPMTEST_CHECK([ -run rpmbuild \ +rpmbuild \ -ba --quiet ${RPMDATA}/SPECS/hello-autopatch.spec ], [0], @@ -639,7 +639,7 @@ AT_KEYWORDS([build]) RPMDB_INIT RPMTEST_CHECK([ -run rpmbuild \ +rpmbuild \ --define "packager Iam" \ --rebuild ${RPMDATA}/SRPMS/hello-1.0-1.src.rpm ], @@ -661,8 +661,8 @@ AT_KEYWORDS([build]) RPMDB_INIT RPMTEST_CHECK([ -run rpmbuild -bi ${RPMDATA}/SPECS/hello.spec &> /dev/null -run rpmbuild --quiet -bl --short-circuit ${RPMDATA}/SPECS/hello.spec +rpmbuild -bi ${RPMDATA}/SPECS/hello.spec &> /dev/null +rpmbuild --quiet -bl --short-circuit ${RPMDATA}/SPECS/hello.spec ], [0], [], @@ -763,7 +763,7 @@ AT_KEYWORDS([build]) RPMDB_INIT RPMTEST_CHECK([ -run rpmbuild \ +rpmbuild \ -ta "${RPMDATA}/SOURCES/hello-2.0.tar.gz" ], [0], @@ -2653,7 +2653,7 @@ AT_KEYWORDS([build]) RPMDB_INIT RPMTEST_CHECK([ -run rpmbuild \ +rpmbuild \ --quiet -bd ${RPMDATA}/SPECS/hello.spec ls ls ${RPMTEST}/build/*/*.rpm | wc --lines ], diff --git a/tests/rpmdb.at b/tests/rpmdb.at index 400d7f8130..80cddcbb59 100644 --- a/tests/rpmdb.at +++ b/tests/rpmdb.at @@ -83,7 +83,7 @@ AT_KEYWORDS([rpmdb]) # This needs to run *without* RPMDB_INIT to test behavior on read-only mount RPMTEST_CHECK([ -run rpmdb --exportdb > rdonly.list +rpmdb --exportdb > rdonly.list test -s rdonly.list ], [0], diff --git a/tests/rpmmacro.at b/tests/rpmmacro.at index 968d48ee7d..4906a63088 100644 --- a/tests/rpmmacro.at +++ b/tests/rpmmacro.at @@ -1118,7 +1118,7 @@ AT_SETUP([lua library path]) AT_KEYWORDS([macros lua]) RPMTEST_CHECK([ RPMDB_INIT -f=$(run rpm --eval "%{_rpmconfigdir}/lua/foo.lua") +f=$(rpm --eval "%{_rpmconfigdir}/lua/foo.lua") echo "bar = 'graak'" > ${RPMTEST}/${f} runroot rpm \ --eval '%{lua:require "foo"; print(bar)}' @@ -1396,7 +1396,7 @@ thing %bad-name 123 EOF -run rpm --macros "macros.bad" --eval "%foo" +rpm --macros "macros.bad" --eval "%foo" ], [0], [bar @@ -1664,7 +1664,7 @@ AT_SETUP([rpmlua hooks]) AT_KEYWORDS([lua]) RPMTEST_CHECK([ -run rpm --load /data/macros.hooks \ +rpm --load /data/macros.hooks \ --eval "%hook_this" ], [0],