All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-networking][PATCH] squid: don't do squid-conf-tests at build time
@ 2016-08-25  9:36 jackie.huang
  0 siblings, 0 replies; only message in thread
From: jackie.huang @ 2016-08-25  9:36 UTC (permalink / raw)
  To: openembedded-devel

From: Jackie Huang <jackie.huang@windriver.com>

* squid-conf-tests is a test to run "squid -k parse -f"
  to perse the config files, which should not be run
  at build time since we are cross compiling, so remove
  it when compiling test-suite

* Fix the directories of the conf files for squid-conf-tests
  so that it can run on the target and add it for ptest

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
 ...d-don-t-do-squid-conf-tests-at-build-time.patch | 63 ++++++++++++++++++++++
 .../recipes-daemons/squid/squid_3.5.20.bb          |  6 +++
 2 files changed, 69 insertions(+)
 create mode 100644 meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch

diff --git a/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch b/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch
new file mode 100644
index 0000000..a5e5547
--- /dev/null
+++ b/meta-networking/recipes-daemons/squid/files/squid-don-t-do-squid-conf-tests-at-build-time.patch
@@ -0,0 +1,63 @@
+From 54a9c2ba60adc7ec2724786662fd398e7c03999f Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Thu, 25 Aug 2016 15:22:57 +0800
+Subject: [PATCH] squid: don't do squid-conf-tests at build time
+
+* squid-conf-tests is a test to run "squid -k parse -f"
+  to perse the config files, which should not be run
+  at build time since we are cross compiling, so remove
+  it but it will be added back for the runtime ptest.
+
+* Fix the directories of the conf files for squid-conf-tests
+  so that it can run on the target board.
+
+Upstream-Status: Inappropriate [cross compile specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ test-suite/Makefile.am | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am
+index d5468be..77fc480 100644
+--- a/test-suite/Makefile.am
++++ b/test-suite/Makefile.am
+@@ -41,8 +41,7 @@ TESTS += debug \
+ 	MemPoolTest\
+ 	mem_node_test\
+ 	mem_hdr_test\
+-	$(ESI_TESTS) \
+-	squid-conf-tests
++	$(ESI_TESTS)
+ 
+ ## Sort by alpha - any build failures are significant.
+ check_PROGRAMS += debug \
+@@ -125,19 +124,19 @@ VirtualDeleteOperator_SOURCES = VirtualDeleteOperator.cc $(DEBUG_SOURCE)
+ ##$(TARGLIB): $(LIBOBJS)
+ ##	$(AR_R) $(TARGLIB) $(LIBOBJS)
+ 
+-squid-conf-tests: $(top_builddir)/src/squid.conf.default $(srcdir)/squidconf/*
++squid-conf-tests: /etc/squid.conf.default squidconf/*
+ 	@failed=0; cfglist="$?"; rm -f $@ || $(TRUE); \
+ 	for cfg in $$cfglist ; do \
+-		$(top_builddir)/src/squid -k parse -f $$cfg || \
++		squid -k parse -f $$cfg || \
+ 			{ echo "FAIL: squid.conf test: $$cfg" | \
+-				sed s%$(top_builddir)/src/%% | \
+-				sed s%$(srcdir)/squidconf/%% ; \
++				sed s%/etc/%% | \
++				sed s%squidconf/%% ; \
+ 				failed=1; break; \
+ 			}; \
+ 		if test "$$failed" -eq 0; then \
+ 			echo "PASS: squid.conf test: $$cfg" | \
+-				sed s%$(top_builddir)/src/%% | \
+-				sed s%$(srcdir)/squidconf/%% ; \
++				sed s%/etc/%% | \
++				sed s%squidconf/%% ; \
+ 		else break; fi; \
+ 	done; \
+ 	if test "$$failed" -eq 0; then cp $(TRUE) $@ ; fi
+-- 
+2.8.3
+
diff --git a/meta-networking/recipes-daemons/squid/squid_3.5.20.bb b/meta-networking/recipes-daemons/squid/squid_3.5.20.bb
index 760eca8..fe1b027 100644
--- a/meta-networking/recipes-daemons/squid/squid_3.5.20.bb
+++ b/meta-networking/recipes-daemons/squid/squid_3.5.20.bb
@@ -20,6 +20,7 @@ SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${MIN_VER}/${BPN}-${P
            file://run-ptest \
            file://volatiles.03_squid \
            file://set_sysroot_patch.patch \
+           file://squid-don-t-do-squid-conf-tests-at-build-time.patch \
 "
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=c492e2d6d32ec5c1aad0e0609a141ce9 \
@@ -66,6 +67,11 @@ do_install_ptest() {
 
     # do NOT need to rebuild Makefile itself
     sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
+
+    # Add squid-conf-tests for runtime tests
+    sed -e 's/^\(runtest-TESTS:\)/\1 squid-conf-tests/' \
+        -e "s/\(list=' \$(TESTS)\)/\1 squid-conf-tests/" \
+        -i ${D}${PTEST_PATH}/${TESTDIR}/Makefile
 }
 
 do_install_append() {
-- 
2.8.3



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-25  9:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-25  9:36 [meta-networking][PATCH] squid: don't do squid-conf-tests at build time jackie.huang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.