Currently many tests fails on mock/koji since /etc/resolv.conf is not
present. The unexpected warning causes them to abort.

After this patch an empty resolv.conf is created and used before issuing
"make check".

Signed-off-by: Timothy Redaelli <[email protected]>
---
 rhel/openvswitch-fedora.spec.in | 2 ++
 rhel/ovn-fedora.spec.in         | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
index 9be31ada0..eec98485f 100644
--- a/rhel/openvswitch-fedora.spec.in
+++ b/rhel/openvswitch-fedora.spec.in
@@ -302,6 +302,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libovn*
 
 %check
 %if %{with check}
+    touch resolv.conf
+    export OVS_RESOLV_CONF=$(pwd)/resolv.conf
     if make check TESTSUITEFLAGS='%{_smp_mflags}' RECHECK=yes; then :;
     else
         cat tests/testsuite.log
diff --git a/rhel/ovn-fedora.spec.in b/rhel/ovn-fedora.spec.in
index 15f3352ca..ea44e49cc 100644
--- a/rhel/ovn-fedora.spec.in
+++ b/rhel/ovn-fedora.spec.in
@@ -212,6 +212,8 @@ rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/openvswitch
 
 %check
 %if %{with check}
+    touch resolv.conf
+    export OVS_RESOLV_CONF=$(pwd)/resolv.conf
     if make check TESTSUITEFLAGS='%{_smp_mflags}' RECHECK=yes; then :;
     else
         cat tests/testsuite.log
-- 
2.20.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to