From: Joe Buck Date: Tue, 19 Feb 2013 18:37:49 +0000 (-0800) Subject: testing: updating hadoop-internal test X-Git-Tag: v0.58~29^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3ff0fe0fc7eb2413ce7533f1b11400ad74aecbb1;p=ceph.git testing: updating hadoop-internal test Small tweaks to the hadoop-internal test to better use existing environment varaibles. Signed-off-by: Joe Buck Reviewed-by: Noah Watkins --- diff --git a/qa/workunits/hadoop-internal-tests/test.sh b/qa/workunits/hadoop-internal-tests/test.sh index bfbb38c73cd5..f37783ef3f8f 100755 --- a/qa/workunits/hadoop-internal-tests/test.sh +++ b/qa/workunits/hadoop-internal-tests/test.sh @@ -1,9 +1,7 @@ #!/bin/bash -e -BASE=/tmp/cephtest -TLIB=binary/usr/local/lib -export LD_LIBRARY_PATH=$BASE/$TLIB -CEPH_CONF_FILE=$BASE/ceph.conf +# bail if $TESTDIR is not set as this test will fail in that scenario +[ -z $TESTDIR ] && { echo "\$TESTDIR needs to be set, but is not. Exiting."; exit 1; } POOL_SIZES=`seq 1 8` POOL_BASE=hadoop @@ -18,7 +16,7 @@ cat << EOF > $outfile ceph.conf.file - $CEPH_CONF_FILE + $CEPH_CONF ceph.data.pools @@ -32,12 +30,15 @@ echo creating hadoop test pools for size in $POOL_SIZES; do name=${POOL_BASE}$size echo creating pool $name - ./ceph osd pool create $name 100 100 - ./ceph osd pool set $name size $size + #./ceph osd pool create $name 100 100 + #./ceph osd pool set $name size $size + ceph osd pool create $name 100 100 + ceph osd pool set $name size $size echo making pool $name a data pool - poolid=`./ceph osd dump | sed -n "s/^pool \([0-9]*\) '$name'.*/\1/p"` - ./ceph mds add_data_pool $poolid + poolid=`ceph osd dump | sed -n "s/^pool \([0-9]*\) '$name'.*/\1/p"` + ceph mds add_data_pool $poolid + #./ceph mds add_data_pool $poolid done def_repl_conf=`mktemp` @@ -48,13 +49,13 @@ cust_repl_conf=`mktemp` echo generating custom replication hadoop config $cust_repl_conf gen_hadoop_conf $cust_repl_conf $POOL_NAMES -pushd $BASE/hadoop +pushd $TESTDIR/hadoop echo running default replication hadoop tests -ant -Dextra.library.path=$BASE/$TLIB -Dhadoop.conf.file=$def_repl_conf -Dtestcase=TestCephDefaultReplication test +ant -Dextra.library.path=$LD_LIBRARY_PATH -Dhadoop.conf.file=$def_repl_conf -Dtestcase=TestCephDefaultReplication test echo running custom replication hadoop tests -ant -Dextra.library.path=$BASE/$TLIB -Dhadoop.conf.file=$def_repl_conf -Dtestcase=TestCephCustomReplication test +ant -Dextra.library.path=$LD_LIBRARY_PATH -Dhadoop.conf.file=$cust_repl_conf -Dtestcase=TestCephCustomReplication test popd