]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[master] Eliminated noisy cp error message during "make check"
authorThomas Markwalder <tmark@isc.org>
Thu, 9 Jun 2016 11:52:12 +0000 (07:52 -0400)
committerThomas Markwalder <tmark@isc.org>
Thu, 9 Jun 2016 11:52:12 +0000 (07:52 -0400)
    Merges in rt41883.

RELNOTES
client/tests/Makefile.am
client/tests/Makefile.in
common/tests/Makefile.am
common/tests/Makefile.in
server/tests/Makefile.am
server/tests/Makefile.in

index 6863556f01a575ee9f4d4068d87b188b9c68426e..06d420bb599ccc8447dec7c710c193432a655ee2 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -66,6 +66,11 @@ by Eric Young (eay@cryptsoft.com).
   returned in responses.
   [ISC-Bugs #29246]
 
+- Add logic to test directory Makefiles to avoid copying Attfile(s)
+  when building within the source tree.  This eliminates a noisy but
+  otherwise harmless error message when running "make check".
+  [ISC-Bugs #41883]
+
                        Changes since 4.3.4b1
 
 - None
index da69ea923151a2b31f4171f2334f4ec7a21c9d88..5031d0c542a12a7eec1e0bd799c87458ed23fc84 100644 (file)
@@ -34,11 +34,13 @@ duid_unittests_LDADD = $(ATF_LDFLAGS)
 duid_unittests_LDADD += $(DHCPLIBS)
 
 check: $(ATF_TESTS)
-       -cp -n $(top_srcdir)/client/tests/Atffile Atffile
-       -cp -n $(top_srcdir)/client/tests/duid0_test.txt duid0_test.txt
-       -cp -n $(top_srcdir)/client/tests/duid1_test.txt duid1_test.txt
-       -cp -n $(top_srcdir)/client/tests/duid2_test.txt duid2_test.txt
-       -cp -n $(top_srcdir)/client/tests/duid3_test.txt duid3_test.txt
+       @if test $(top_srcdir) != ${top_builddir}; then \
+               cp $(top_srcdir)/client/tests/Atffile Atffile; \
+               cp $(top_srcdir)/client/tests/duid0_test.txt duid0_test.txt; \
+               cp $(top_srcdir)/client/tests/duid1_test.txt duid1_test.txt; \
+               cp $(top_srcdir)/client/tests/duid2_test.txt duid2_test.txt; \
+               cp $(top_srcdir)/client/tests/duid3_test.txt duid3_test.txt; \
+       fi
        sh ${top_builddir}/tests/unittest.sh
 
 distclean-local:
index a17bf101f31ceee7d5face1f28d1053e2aa50522..416adddeacb4a75606d15e4c8f88bd41ba0216d1 100644 (file)
@@ -729,11 +729,13 @@ info:
        @echo "ATF_LIBS=$(ATF_LIBS)"
 
 @HAVE_ATF_TRUE@check: $(ATF_TESTS)
-@HAVE_ATF_TRUE@        -cp -n $(top_srcdir)/client/tests/Atffile Atffile
-@HAVE_ATF_TRUE@        -cp -n $(top_srcdir)/client/tests/duid0_test.txt duid0_test.txt
-@HAVE_ATF_TRUE@        -cp -n $(top_srcdir)/client/tests/duid1_test.txt duid1_test.txt
-@HAVE_ATF_TRUE@        -cp -n $(top_srcdir)/client/tests/duid2_test.txt duid2_test.txt
-@HAVE_ATF_TRUE@        -cp -n $(top_srcdir)/client/tests/duid3_test.txt duid3_test.txt
+@HAVE_ATF_TRUE@        @if test $(top_srcdir) != ${top_builddir}; then \
+@HAVE_ATF_TRUE@                cp $(top_srcdir)/client/tests/Atffile Atffile; \
+@HAVE_ATF_TRUE@                cp $(top_srcdir)/client/tests/duid0_test.txt duid0_test.txt; \
+@HAVE_ATF_TRUE@                cp $(top_srcdir)/client/tests/duid1_test.txt duid1_test.txt; \
+@HAVE_ATF_TRUE@                cp $(top_srcdir)/client/tests/duid2_test.txt duid2_test.txt; \
+@HAVE_ATF_TRUE@                cp $(top_srcdir)/client/tests/duid3_test.txt duid3_test.txt; \
+@HAVE_ATF_TRUE@        fi
 @HAVE_ATF_TRUE@        sh ${top_builddir}/tests/unittest.sh
 
 @HAVE_ATF_TRUE@distclean-local:
index f8d6b0e21e0f83013799da775a516d434b48053e..f6a43e42266dafb15d4b622412ce3a4542d921f0 100644 (file)
@@ -37,7 +37,9 @@ ns_name_unittest_LDADD += ../libdhcp.a  \
        $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a  $(BINDLIBDIR)/libisc.a
 
 check: $(ATF_TESTS)
-       -cp -n $(top_srcdir)/common/tests/Atffile Atffile
+       @if test $(top_srcdir) != ${top_builddir}; then \
+               cp $(top_srcdir)/common/tests/Atffile Atffile; \
+       fi
        sh ${top_builddir}/tests/unittest.sh
 
 distclean-local:
index 7d730ef453cc8f0ece93f4e29732d2e86291480d..9c37fc2b0217f6e8aec370178a45c969424f7c7b 100644 (file)
@@ -762,7 +762,9 @@ uninstall-am:
 
 
 @HAVE_ATF_TRUE@check: $(ATF_TESTS)
-@HAVE_ATF_TRUE@        -cp -n $(top_srcdir)/common/tests/Atffile Atffile
+@HAVE_ATF_TRUE@        @if test $(top_srcdir) != ${top_builddir}; then \
+@HAVE_ATF_TRUE@                cp $(top_srcdir)/common/tests/Atffile Atffile; \
+@HAVE_ATF_TRUE@        fi
 @HAVE_ATF_TRUE@        sh ${top_builddir}/tests/unittest.sh
 
 @HAVE_ATF_TRUE@distclean-local:
index 65a9f7403d0b6911cc36874def78fbd62f8da97c..a87c5e7bee3d5e83cccaceed304dc04c22cdff7b 100644 (file)
@@ -51,7 +51,9 @@ leaseq_unittests_SOURCES = $(DHCPSRC) leaseq_unittest.c
 leaseq_unittests_LDADD = $(DHCPLIBS) $(ATF_LDFLAGS)
 
 check: $(ATF_TESTS)
-       -cp -n $(top_srcdir)/server/tests/Atffile Atffile
+       @if test $(top_srcdir) != ${top_builddir}; then \
+               cp $(top_srcdir)/server/tests/Atffile Atffile; \
+       fi
        sh ${top_builddir}/tests/unittest.sh
 
 distclean-local:
index 0306a730053532a1c27718ef69f57d2cc0efd1b8..b86a952d9c1d7d265b5cba98ef60eb3c3fa9d791 100644 (file)
@@ -1048,7 +1048,9 @@ info:
        @echo "ATF_LIBS=$(ATF_LIBS)"
 
 @HAVE_ATF_TRUE@check: $(ATF_TESTS)
-@HAVE_ATF_TRUE@        -cp -n $(top_srcdir)/server/tests/Atffile Atffile
+@HAVE_ATF_TRUE@        @if test $(top_srcdir) != ${top_builddir}; then \
+@HAVE_ATF_TRUE@                cp $(top_srcdir)/server/tests/Atffile Atffile; \
+@HAVE_ATF_TRUE@        fi
 @HAVE_ATF_TRUE@        sh ${top_builddir}/tests/unittest.sh
 
 @HAVE_ATF_TRUE@distclean-local: