Author: mahadev Date: Tue Apr 14 04:55:06 2009 New Revision: 764673 URL: http://svn.apache.org/viewvc?rev=764673&view=rev Log: ZOOKEEPER-361. integrate cppunit testing as part of hudson patch process. (giri via mahadev)
Modified: hadoop/zookeeper/trunk/CHANGES.txt hadoop/zookeeper/trunk/build.xml hadoop/zookeeper/trunk/src/c/tests/TestZookeeperInit.cc hadoop/zookeeper/trunk/src/c/tests/zkServer.sh Modified: hadoop/zookeeper/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=764673&r1=764672&r2=764673&view=diff ============================================================================== --- hadoop/zookeeper/trunk/CHANGES.txt (original) +++ hadoop/zookeeper/trunk/CHANGES.txt Tue Apr 14 04:55:06 2009 @@ -84,6 +84,9 @@ ZOOKEEPER-343. add tests that specifically verify the zkmain and qpmain classes. (phunt via mahadev) + ZOOKEEPER-361. integrate cppunit testing as part of hudson patch +process. (giri via mahadev) + NEW FEATURES: Modified: hadoop/zookeeper/trunk/build.xml URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/build.xml?rev=764673&r1=764672&r2=764673&view=diff ============================================================================== --- hadoop/zookeeper/trunk/build.xml (original) +++ hadoop/zookeeper/trunk/build.xml Tue Apr 14 04:55:06 2009 @@ -597,6 +597,17 @@ </exec> </target> + <target name="call-test-cppunit" description="to execute cppunit tests"> + <antcall target="create-cppunit-configure"> + <param name="cppunit" value="true"/> + </antcall> + <antcall target="create-cppunit-makefile"/> + <antcall target="test-cppunit"> + <param name="cppunit" value="true"/> + </antcall> + </target> + + <target name="test-cppunit" depends="compile_jute, jar, create-cppunit-makefile" if="cppunit" description="to run cppunit test cases"> <property name="fuser.bin" value="/sbin"/> @@ -638,7 +649,7 @@ <!-- yet to implement --> </target> - <target name="test-core" depends="test-init,test-category,junit.run"/> + <target name="test-core" depends="test-init, test-category, junit.run, call-test-cppunit"/> <!-- ====================================================== --> <!-- Run optional third-party tool targets --> Modified: hadoop/zookeeper/trunk/src/c/tests/TestZookeeperInit.cc URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/tests/TestZookeeperInit.cc?rev=764673&r1=764672&r2=764673&view=diff ============================================================================== --- hadoop/zookeeper/trunk/src/c/tests/TestZookeeperInit.cc (original) +++ hadoop/zookeeper/trunk/src/c/tests/TestZookeeperInit.cc Tue Apr 14 04:55:06 2009 @@ -78,7 +78,7 @@ void testBasic() { - const string EXPECTED_HOST("localhost:2121"); + const string EXPECTED_HOST("127.0.0.1:2121"); const int EXPECTED_ADDRS_COUNT =1; const int EXPECTED_RECV_TIMEOUT=10000; clientid_t cid; Modified: hadoop/zookeeper/trunk/src/c/tests/zkServer.sh URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/tests/zkServer.sh?rev=764673&r1=764672&r2=764673&view=diff ============================================================================== --- hadoop/zookeeper/trunk/src/c/tests/zkServer.sh (original) +++ hadoop/zookeeper/trunk/src/c/tests/zkServer.sh Tue Apr 14 04:55:06 2009 @@ -24,7 +24,12 @@ if [ "x$1" == "xstartClean" ] then - rm -rf /tmp/zkdata + if [ "x${base_dir}" == "x" ] + then + rm -rf /tmp/zkdata + else + rm -rf ${base_dir}/build/tmp + fi fi # Make sure nothing is left over from before @@ -32,12 +37,13 @@ case $1 in start|startClean) - mkdir -p /tmp/zkdata if [ "x${base_dir}" == "x" ] then - java -cp ../../zookeeper-dev.jar:../../src/java/lib/log4j-1.2.15.jar:../../conf org.apache.zookeeper.server.ZooKeeperServerMain 22181 /tmp/zkdata &> /tmp/zk.log & + mkdir -p /tmp/zkdata + java -cp ../../zookeeper-dev.jar:../../src/java/lib/log4j-1.2.15.jar:../../conf org.apache.zookeeper.server.ZooKeeperServerMain 22181 /tmp/zkdata &> /tmp/zk.log & else - java -cp ${base_dir}/zookeeper-dev.jar:${base_dir}/src/java/lib/log4j-1.2.15.jar:${base_dir}/conf org.apache.zookeeper.server.ZooKeeperServerMain 22181 /tmp/zkdata &> /tmp/zk.log & + mkdir -p ${base_dir}/build/tmp/zkdata + java -cp ${base_dir}/zookeeper-dev.jar:${base_dir}/src/java/lib/log4j-1.2.15.jar:${base_dir}/conf org.apache.zookeeper.server.ZooKeeperServerMain 22181 ${base_dir}/build/tmp/zkdata &> ${base_dir}/build/tmp/zk.log & fi sleep 5 ;;