Panu Matilainen d90bd6
From b7606b9dbebba90fb4868fd01e9c05abe05d9586 Mon Sep 17 00:00:00 2001
Panu Matilainen d90bd6
Message-Id: <b7606b9dbebba90fb4868fd01e9c05abe05d9586.1559904592.git.pmatilai@redhat.com>
Panu Matilainen d90bd6
From: Panu Matilainen <pmatilai@redhat.com>
Panu Matilainen d90bd6
Date: Fri, 7 Jun 2019 13:12:18 +0300
Panu Matilainen d90bd6
Subject: [PATCH] Use a pre-determined buildhost in test-suite to avoid DNS
Panu Matilainen d90bd6
 usage
Panu Matilainen d90bd6
Panu Matilainen d90bd6
A misconfigured DNS can cause bogus test-suite failures and hideous
Panu Matilainen d90bd6
slow-down for no reason of our own. Use a preset, predictable
Panu Matilainen d90bd6
buildhost name to avoid such issues.
Panu Matilainen d90bd6
---
Panu Matilainen d90bd6
 tests/atlocal.in | 6 +++---
Panu Matilainen d90bd6
 1 file changed, 3 insertions(+), 3 deletions(-)
Panu Matilainen d90bd6
Panu Matilainen d90bd6
diff --git a/tests/atlocal.in b/tests/atlocal.in
Panu Matilainen d90bd6
index a44c067bf..fcbf783d7 100644
Panu Matilainen d90bd6
--- a/tests/atlocal.in
Panu Matilainen d90bd6
+++ b/tests/atlocal.in
Panu Matilainen d90bd6
@@ -45,20 +45,20 @@ fi
Panu Matilainen d90bd6
 
Panu Matilainen d90bd6
 function run()
Panu Matilainen d90bd6
 {
Panu Matilainen d90bd6
-    "$@" --define "_tmppath ${RPMTEST}/tmp" --define "_topdir ${TOPDIR}" --dbpath="${RPMTEST}/var/lib/rpm/"
Panu Matilainen d90bd6
+    "$@" --define "_buildhost testhost" --define "_tmppath ${RPMTEST}/tmp" --define "_topdir ${TOPDIR}" --dbpath="${RPMTEST}/var/lib/rpm/"
Panu Matilainen d90bd6
 }
Panu Matilainen d90bd6
 
Panu Matilainen d90bd6
 function rundebug()
Panu Matilainen d90bd6
 {
Panu Matilainen d90bd6
     cp ${top_srcdir}/macros.debug ${RPM_CONFIGDIR}/macros.d/
Panu Matilainen d90bd6
-    "$@" --define "_tmppath ${RPMTEST}/tmp" --define "_topdir ${TOPDIR}" --dbpath="${RPMTEST}/var/lib/rpm/"
Panu Matilainen d90bd6
+    "$@" --define "_buildhost testhost" --define "_tmppath ${RPMTEST}/tmp" --define "_topdir ${TOPDIR}" --dbpath="${RPMTEST}/var/lib/rpm/"
Panu Matilainen d90bd6
     rm -f ${RPM_CONFIGDIR}/macros.d/macros.debug
Panu Matilainen d90bd6
 }
Panu Matilainen d90bd6
 
Panu Matilainen d90bd6
 function runroot()
Panu Matilainen d90bd6
 {
Panu Matilainen d90bd6
     (unset RPM_CONFIGDIR RPM_POPTEXEC_PATH; cd ${RPMTEST} && \
Panu Matilainen d90bd6
-     MAGIC="/magic/magic" FAKECHROOT_BASE="${RPMTEST}" fakechroot "$@" --define "_topdir /build" --noplugins
Panu Matilainen d90bd6
+     MAGIC="/magic/magic" FAKECHROOT_BASE="${RPMTEST}" fakechroot "$@" --define "_buildhost testhost" --define "_topdir /build" --noplugins
Panu Matilainen d90bd6
     )
Panu Matilainen d90bd6
 }
Panu Matilainen d90bd6
 
Panu Matilainen d90bd6
-- 
Panu Matilainen d90bd6
2.21.0
Panu Matilainen d90bd6