diff -Nru zookeeper-3.3.4+dfsg1/debian/changelog zookeeper-3.3.4+dfsg1/debian/changelog --- zookeeper-3.3.4+dfsg1/debian/changelog 2012-01-23 09:18:32.000000000 +0000 +++ zookeeper-3.3.4+dfsg1/debian/changelog 2012-01-23 10:31:11.000000000 +0000 @@ -1,3 +1,14 @@ +zookeeper (3.3.4+dfsg1-2ubuntu2) precise; urgency=low + + [ Clint Byrum ] + * d/patches/fix-broken-c-client-test.patch: Fixes the unit test so it + will pass with EINVAL which is the correct error. (LP: #912935) + + [ James Page ] + * d/rules: Enable execution of C client and core Java tests. + + -- Clint Byrum Fri, 06 Jan 2012 13:58:23 -0800 + zookeeper (3.3.4+dfsg1-2ubuntu1) precise; urgency=low [ Clint Byrum ] @@ -26,6 +37,15 @@ -- James Page Mon, 12 Dec 2011 13:31:47 +0000 +zookeeper (3.3.4+dfsg1-1ubuntu1) UNRELEASED; urgency=low + + * d/patches/fix-broken-c-client-test.patch: Fixes the unit test so it + will pass with EINVAL which is the correct error. (LP: #912935) + * d/rules: fail package build on failure of C client unit test or of + main zookeper java unit test suite. + + -- Clint Byrum Fri, 06 Jan 2012 13:58:23 -0800 + zookeeper (3.3.4+dfsg1-1) unstable; urgency=low [ James Page ] diff -Nru zookeeper-3.3.4+dfsg1/debian/patches/fix-broken-c-client-unittest.patch zookeeper-3.3.4+dfsg1/debian/patches/fix-broken-c-client-unittest.patch --- zookeeper-3.3.4+dfsg1/debian/patches/fix-broken-c-client-unittest.patch 1970-01-01 00:00:00.000000000 +0000 +++ zookeeper-3.3.4+dfsg1/debian/patches/fix-broken-c-client-unittest.patch 2012-01-23 10:00:05.000000000 +0000 @@ -0,0 +1,20 @@ +Description: Loosens C client unit test to allow multiple errors + The test incorrectly assumes that ENOENT will eb returned on a clearly + incorrectly formatted hostname. Some other C library implementations + may do this, so we accept ENOENT or EINVAL. +Author: Clint Byrum +Bug: https://issues.apache.org/jira/browse/ZOOKEEPER-1353 +Bug-Ubuntu: http://pad.lv/912935 +Forwarded: yes + +--- zookeeper-3.3.4+dfsg1.orig/src/c/tests/TestZookeeperInit.cc ++++ zookeeper-3.3.4+dfsg1/src/c/tests/TestZookeeperInit.cc +@@ -230,7 +230,7 @@ public: + const string INVALID_HOST("host1:1111+host:123"); + zh=zookeeper_init(INVALID_HOST.c_str(),0,0,0,0,0); + CPPUNIT_ASSERT(zh==0); +- CPPUNIT_ASSERT_EQUAL(ENOENT,errno); ++ CPPUNIT_ASSERT((ENOENT|EINVAL) & errno); + } + void testNonexistentHost() + { diff -Nru zookeeper-3.3.4+dfsg1/debian/patches/series zookeeper-3.3.4+dfsg1/debian/patches/series --- zookeeper-3.3.4+dfsg1/debian/patches/series 2012-01-23 08:54:20.000000000 +0000 +++ zookeeper-3.3.4+dfsg1/debian/patches/series 2012-01-23 10:00:05.000000000 +0000 @@ -3,3 +3,4 @@ debian/disable-cygwin-detection fixes/ZOOKEEPER-705 fixes/ZOOKEEPER-1033 +fix-broken-c-client-unittest.patch diff -Nru zookeeper-3.3.4+dfsg1/debian/rules zookeeper-3.3.4+dfsg1/debian/rules --- zookeeper-3.3.4+dfsg1/debian/rules 2012-01-23 08:57:06.000000000 +0000 +++ zookeeper-3.3.4+dfsg1/debian/rules 2012-01-23 10:00:40.000000000 +0000 @@ -52,21 +52,21 @@ done dh_install -#ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) -#override_dh_auto_test-arch: -# # C testing starts/stops zookeeper -# # this ensures that all the right classes are found -# for jar in jline log4j-1.2 xercesImpl xmlParserAPIs; do \ -# ln -sf /usr/share/java/$$jar.jar build/lib/$$jar.jar; \ -# done; -# # Execute multi-threaded test suite -# $(MAKE) -C src/c zktest-mt -# cd src/c && ./zktest-mt -# -#override_dh_auto_test-indep: -# # Run core Java test suite against zookeeper -# ant -Dversion=$(DEB_UPSTREAM_VERSION) -DlastRevision=-1 test-core-java -#endif +ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) +override_dh_auto_test-arch: + # C testing starts/stops zookeeper + # this ensures that all the right classes are found + for jar in jline log4j-1.2 xercesImpl xmlParserAPIs; do \ + ln -sf /usr/share/java/$$jar.jar build/lib/$$jar.jar; \ + done; + # Execute multi-threaded test suite + $(MAKE) -C src/c zktest-mt + cd src/c && ./zktest-mt + +override_dh_auto_test-indep: + # Run core Java test suite against zookeeper + ant -Dversion=$(DEB_UPSTREAM_VERSION) -DlastRevision=-1 test-core-java +endif override_dh_clean: dh_clean --exclude=src/java \