Commit 63ba7879 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:4871] add --commit option to fractal tree tests script


git-svn-id: file:///svn/toku/tokudb@43446 c7de825b-a66e-492c-adef-691d508d4ae1
parent 933390a5
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
function usage() { function usage() {
echo "run.fractal.tree.tests.bash - run the nightly fractal tree test suite" echo "run.fractal.tree.tests.bash - run the nightly fractal tree test suite"
echo "[--ftcc=$ftcc] [--BDBVERSION=$BDBVERSION] [--ctest_model=$ctest_model]" echo "[--ftcc=$ftcc] [--BDBVERSION=$BDBVERSION] [--ctest_model=$ctest_model]"
echo "[--commit=$commit]"
return 1 return 1
} }
...@@ -32,6 +33,7 @@ productname=$tokudb_name ...@@ -32,6 +33,7 @@ productname=$tokudb_name
ftcc=icc ftcc=icc
BDBVERSION=5.3 BDBVERSION=5.3
ctest_model=Nightly ctest_model=Nightly
commit=1
while [ $# -gt 0 ] ; do while [ $# -gt 0 ] ; do
arg=$1; shift arg=$1; shift
if [[ $arg =~ --(.*)=(.*) ]] ; then if [[ $arg =~ --(.*)=(.*) ]] ; then
...@@ -82,25 +84,29 @@ fi ...@@ -82,25 +84,29 @@ fi
export GCCVERSION=$($ftcc --version|head -1|cut -f3 -d" ") export GCCVERSION=$($ftcc --version|head -1|cut -f3 -d" ")
svnbase=~/svn.build if [[ $commit -eq 1 ]]; then
if [ ! -d $svnbase ] ; then mkdir $svnbase ; fi svnbase=~/svn.build
if [ ! -d $svnbase ] ; then mkdir $svnbase ; fi
# checkout the build dir # checkout the build dir
buildbase=$svnbase/tokudb.build buildbase=$svnbase/tokudb.build
if [ ! -d $buildbase ] ; then if [ ! -d $buildbase ] ; then
mkdir $buildbase mkdir $buildbase
fi fi
# make the build directory, possibly on multiple machines simultaneously, there can be only one # make the build directory, possibly on multiple machines simultaneously, there can be only one
builddir=$buildbase/$date builddir=$buildbase/$date
pushd $buildbase pushd $buildbase
while [ ! -d $date ] ; do while [ ! -d $date ] ; do
(svn mkdir $svnserver/tokudb.build/$date -m "" ; (svn mkdir $svnserver/tokudb.build/$date -m "" ;
svn co -q $svnserver/tokudb.build/$date) || rm -rf $date svn co -q $svnserver/tokudb.build/$date) || rm -rf $date
done done
popd popd
tracefilepfx=$builddir/$productname+$ftcc-$GCCVERSION+bdb-$BDBVERSION+$nodename+$system+$release+$arch tracefilepfx=$builddir/$productname+$ftcc-$GCCVERSION+bdb-$BDBVERSION+$nodename+$system+$release+$arch
else
tracefilepfx=$FULLTOKUDBDIR/test-trace
fi
function getsysinfo() { function getsysinfo() {
tracefile=$1; shift tracefile=$1; shift
...@@ -162,8 +168,9 @@ rm notes.txt ...@@ -162,8 +168,9 @@ rm notes.txt
tag=$(head -n1 Testing/TAG) tag=$(head -n1 Testing/TAG)
cp -r Testing/$tag $resultsdir cp -r Testing/$tag $resultsdir
cf=$(my_mktemp ftresult) if [[ $commit -eq 1 ]]; then
cat "$resultsdir/trace" | awk ' cf=$(my_mktemp ftresult)
cat "$resultsdir/trace" | awk '
/[0-9]+% tests passed, [0-9]+ tests failed out of [0-9]+/ { /[0-9]+% tests passed, [0-9]+ tests failed out of [0-9]+/ {
fail=$4; fail=$4;
total=$9; total=$9;
...@@ -174,9 +181,9 @@ cat "$resultsdir/trace" | awk ' ...@@ -174,9 +181,9 @@ cat "$resultsdir/trace" | awk '
} }
print "PASS=" pass print "PASS=" pass
}' >"$cf" }' >"$cf"
get_latest_svn_revision $FULLTOKUDBDIR >>"$cf" get_latest_svn_revision $FULLTOKUDBDIR >>"$cf"
echo -n " " >>"$cf" echo -n " " >>"$cf"
cat "$resultsdir/trace" | awk ' cat "$resultsdir/trace" | awk '
BEGIN { BEGIN {
FS=": "; FS=": ";
} }
...@@ -184,8 +191,8 @@ BEGIN { ...@@ -184,8 +191,8 @@ BEGIN {
print $2; print $2;
exit exit
}' >>"$cf" }' >>"$cf"
(echo; echo) >>"$cf" (echo; echo) >>"$cf"
cat "$resultsdir/trace" | awk ' cat "$resultsdir/trace" | awk '
BEGIN { BEGIN {
printit=0 printit=0
} }
...@@ -196,9 +203,10 @@ BEGIN { ...@@ -196,9 +203,10 @@ BEGIN {
print $0 print $0
} }
}' >>"$cf" }' >>"$cf"
svn add $resultsdir svn add $resultsdir
svn commit -F "$cf" $resultsdir svn commit -F "$cf" $resultsdir
rm $cf rm $cf
fi
################################################################################ ################################################################################
## run valgrind on icc debug build ## run valgrind on icc debug build
...@@ -238,8 +246,9 @@ rm notes.txt ...@@ -238,8 +246,9 @@ rm notes.txt
tag=$(head -n1 Testing/TAG) tag=$(head -n1 Testing/TAG)
cp -r Testing/$tag $resultsdir cp -r Testing/$tag $resultsdir
cf=$(my_mktemp ftresult) if [[ $commit -eq 1 ]]; then
cat "$resultsdir/trace" | awk ' cf=$(my_mktemp ftresult)
cat "$resultsdir/trace" | awk '
BEGIN { BEGIN {
errs=0; errs=0;
look=0; look=0;
...@@ -270,9 +279,9 @@ END { ...@@ -270,9 +279,9 @@ END {
} }
print "PASS=" pass print "PASS=" pass
}' >"$cf" }' >"$cf"
get_latest_svn_revision $FULLTOKUDBDIR >>"$cf" get_latest_svn_revision $FULLTOKUDBDIR >>"$cf"
echo -n " " >>"$cf" echo -n " " >>"$cf"
cat "$resultsdir/trace" | awk ' cat "$resultsdir/trace" | awk '
BEGIN { BEGIN {
FS=": "; FS=": ";
} }
...@@ -280,8 +289,8 @@ BEGIN { ...@@ -280,8 +289,8 @@ BEGIN {
print $2; print $2;
exit exit
}' >>"$cf" }' >>"$cf"
(echo; echo) >>"$cf" (echo; echo) >>"$cf"
cat "$resultsdir/trace" | awk ' cat "$resultsdir/trace" | awk '
BEGIN { BEGIN {
printit=0 printit=0
} }
...@@ -292,9 +301,10 @@ BEGIN { ...@@ -292,9 +301,10 @@ BEGIN {
print $0 print $0
} }
}' >>"$cf" }' >>"$cf"
svn add $resultsdir svn add $resultsdir
svn commit -F "$cf" $resultsdir svn commit -F "$cf" $resultsdir
rm $cf rm $cf
fi
################################################################################ ################################################################################
## run gcov on gcc debug build ## run gcov on gcc debug build
...@@ -334,8 +344,9 @@ rm notes.txt ...@@ -334,8 +344,9 @@ rm notes.txt
tag=$(head -n1 Testing/TAG) tag=$(head -n1 Testing/TAG)
cp -r Testing/$tag $resultsdir cp -r Testing/$tag $resultsdir
cf=$(my_mktemp ftresult) if [[ $commit -eq 1 ]]; then
cat "$resultsdir/trace" | awk ' cf=$(my_mktemp ftresult)
cat "$resultsdir/trace" | awk '
BEGIN { BEGIN {
ORS=" "; ORS=" ";
} }
...@@ -354,9 +365,9 @@ END { ...@@ -354,9 +365,9 @@ END {
} }
print "PASS=" pass print "PASS=" pass
}' >"$cf" }' >"$cf"
get_latest_svn_revision $FULLTOKUDBDIR >>"$cf" get_latest_svn_revision $FULLTOKUDBDIR >>"$cf"
echo -n " " >>"$cf" echo -n " " >>"$cf"
cat "$resultsdir/trace" | awk ' cat "$resultsdir/trace" | awk '
BEGIN { BEGIN {
FS=": "; FS=": ";
} }
...@@ -364,8 +375,8 @@ BEGIN { ...@@ -364,8 +375,8 @@ BEGIN {
print $2; print $2;
exit exit
}' >>"$cf" }' >>"$cf"
(echo; echo) >>"$cf" (echo; echo) >>"$cf"
cat "$resultsdir/trace" | awk ' cat "$resultsdir/trace" | awk '
BEGIN { BEGIN {
printit=0 printit=0
} }
...@@ -376,8 +387,9 @@ BEGIN { ...@@ -376,8 +387,9 @@ BEGIN {
print $0 print $0
} }
}' >>"$cf" }' >>"$cf"
svn add $resultsdir svn add $resultsdir
svn commit -F "$cf" $resultsdir svn commit -F "$cf" $resultsdir
rm $cf rm $cf
fi
exit 0 exit 0
...@@ -4,4 +4,4 @@ pushd $(dirname $0) &>/dev/null ...@@ -4,4 +4,4 @@ pushd $(dirname $0) &>/dev/null
SCRIPTDIR=$PWD SCRIPTDIR=$PWD
popd &>/dev/null popd &>/dev/null
exec $SCRIPTDIR/run.fractal.tree.tests.bash --ctest_model=Experimental "$@" exec $SCRIPTDIR/run.fractal.tree.tests.bash --ctest_model=Experimental --commit=0 "$@"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment