Commit ad17377c authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:4382] merge revision info saving part from 5.2.7 to mainline

git-svn-id: file:///svn/toku/tokudb@38734 c7de825b-a66e-492c-adef-691d508d4ae1
parent 06b490b5
...@@ -79,13 +79,14 @@ save_failure() { ...@@ -79,13 +79,14 @@ save_failure() {
dir="$1"; shift dir="$1"; shift
out="$1"; shift out="$1"; shift
envdir="$1"; shift envdir="$1"; shift
rev=$1; shift
exec="$1"; shift exec="$1"; shift
table_size=$1; shift table_size=$1; shift
cachetable_size=$1; shift cachetable_size=$1; shift
num_ptquery=$1; shift num_ptquery=$1; shift
num_update=$1; shift num_update=$1; shift
phase=$1; shift phase=$1; shift
dest="${dir}/${exec}-${table_size}-${cachetable_size}-${num_ptquery}-${num_update}-${phase}-$$" dest="${dir}/${exec}-${table_size}-${cachetable_size}-${num_ptquery}-${num_update}-${phase}-${rev}-$$"
mkdir -p "$dest" mkdir -p "$dest"
mv $out "${dest}/output.txt" mv $out "${dest}/output.txt"
mv core* "${dest}/" mv core* "${dest}/"
...@@ -93,6 +94,7 @@ save_failure() { ...@@ -93,6 +94,7 @@ save_failure() {
} }
run_test() { run_test() {
rev=$1; shift
exec="$1"; shift exec="$1"; shift
table_size="$1"; shift table_size="$1"; shift
cachetable_size="$1"; shift cachetable_size="$1"; shift
...@@ -126,14 +128,14 @@ run_test() { ...@@ -126,14 +128,14 @@ run_test() {
then then
rm -f $tmplog rm -f $tmplog
t2="$(date)" t2="$(date)"
echo "\"$exec\",$table_size,$cachetable_size,$num_ptquery,$num_update,$t0,$t1,$t2,PASS" >> "$mylog" echo "\"$exec\",$rev,$table_size,$cachetable_size,$num_ptquery,$num_update,$t0,$t1,$t2,PASS" >> "$mylog"
else else
save_failure "$mysavedir" $tmplog $envdir $exec $table_size $cachetable_size $num_ptquery $num_update recover save_failure "$mysavedir" $tmplog $envdir $rev $exec $table_size $cachetable_size $num_ptquery $num_update recover
echo "\"$exec\",$table_size,$cachetable_size,$num_ptquery,$num_update,$t0,$t1,$t2,FAIL" >> "$mylog" echo "\"$exec\",$rev,$table_size,$cachetable_size,$num_ptquery,$num_update,$t0,$t1,$t2,FAIL" >> "$mylog"
fi fi
else else
save_failure "$mysavedir" $tmplog $envdir $exec $table_size $cachetable_size $num_ptquery $num_update test save_failure "$mysavedir" $tmplog $envdir $rev $exec $table_size $cachetable_size $num_ptquery $num_update test
echo "\"$exec\",$table_size,$cachetable_size,$num_ptquery,$num_update,$t0,$t1,$t2,FAIL" >> "$mylog" echo "\"$exec\",$rev,$table_size,$cachetable_size,$num_ptquery,$num_update,$t0,$t1,$t2,FAIL" >> "$mylog"
fi fi
cd .. cd ..
rm -rf $rundir "$envdir" rm -rf $rundir "$envdir"
...@@ -142,6 +144,7 @@ run_test() { ...@@ -142,6 +144,7 @@ run_test() {
running=no running=no
loop_test() { loop_test() {
rev=$1; shift
exec="$1"; shift exec="$1"; shift
table_size="$1"; shift table_size="$1"; shift
cachetable_size="$1"; shift cachetable_size="$1"; shift
...@@ -164,7 +167,7 @@ loop_test() { ...@@ -164,7 +167,7 @@ loop_test() {
fi fi
(( ptquery_rand = (ptquery_rand + 1) % 4 )) (( ptquery_rand = (ptquery_rand + 1) % 4 ))
(( update_rand = (update_rand + 1) % 2 )) (( update_rand = (update_rand + 1) % 2 ))
run_test $exec $table_size $cachetable_size $num_ptquery $num_update $mylog $mysavedir run_test $rev $exec $table_size $cachetable_size $num_ptquery $num_update $mylog $mysavedir
done done
} }
...@@ -196,6 +199,8 @@ do ...@@ -196,6 +199,8 @@ do
make CC=icc DEBUG=0 HAVE_CILK=0 clean fastbuild; \ make CC=icc DEBUG=0 HAVE_CILK=0 clean fastbuild; \
make CC=icc DEBUG=0 HAVE_CILK=0 -C src/tests ${testnames[@]}) make CC=icc DEBUG=0 HAVE_CILK=0 -C src/tests ${testnames[@]})
rev=$(svn info | awk '/Revision/ { print $2 }')
cd $src_tests cd $src_tests
running=yes running=yes
...@@ -207,11 +212,11 @@ do ...@@ -207,11 +212,11 @@ do
(( small_cachetable = table_size * 50 )) (( small_cachetable = table_size * 50 ))
suffix="${exec}-${table_size}-${small_cachetable}-$$" suffix="${exec}-${table_size}-${small_cachetable}-$$"
touch "${log}/${suffix}" touch "${log}/${suffix}"
loop_test $exec $table_size $small_cachetable "${log}/${suffix}" "${savedir}/${suffix}" & savepid $! loop_test $rev $exec $table_size $small_cachetable "${log}/${suffix}" "${savedir}/${suffix}" & savepid $!
tail -f "${log}/${suffix}" & savepid $! tail -f "${log}/${suffix}" & savepid $!
suffix="${exec}-${table_size}-1000000000-$$" suffix="${exec}-${table_size}-1000000000-$$"
touch "${log}/${suffix}" touch "${log}/${suffix}"
loop_test $exec $table_size 1000000000 "${log}/${suffix}" "${savedir}/${suffix}" & savepid $! loop_test $rev $exec $table_size 1000000000 "${log}/${suffix}" "${savedir}/${suffix}" & savepid $!
tail -f "${log}/${suffix}" & savepid $! tail -f "${log}/${suffix}" & savepid $!
done done
done done
......
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