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

fixes to nightly fractal tree test script:

 - update to yesterday before letting ctest update to today, for each run
   (so failures get emailed right)
 - use a third of the cores as -j
 - don't build tag databases
 - swap memcheck and coverage to prioritize getting more results out earlier
refs #5159


git-svn-id: file:///svn/toku/tokudb@45043 c7de825b-a66e-492c-adef-691d508d4ae1
parent 36331477
......@@ -63,6 +63,7 @@ release=$(uname -r | sanitize)
arch=$(uname -m | sanitize)
date=$(date +%Y%m%d)
ncpus=$(grep bogomips /proc/cpuinfo | wc -l)
njobs=$(echo "$ncpus / 3" | bc)
# setup intel compiler env
if [ $ftcc = icc ] ; then
......@@ -150,6 +151,8 @@ function my_mktemp() {
mktemp /tmp/$(whoami).$1.XXXXXXXXXX
}
yesterday="$(date -u -d yesterday +%F) 03:59:00 +0000"
################################################################################
## run tests on icc release build
resultsdir=$tracefilepfx-Release
......@@ -168,11 +171,17 @@ cmake \
-D BDBDIR=$BDBDIR \
-D RUN_LONG_TESTS=ON \
-D USE_CILK=OFF \
-D USE_CTAGS=OFF \
-D USE_GTAGS=OFF \
-D USE_ETAGS=OFF \
-D USE_CSCOPE=OFF \
.. 2>&1 | tee -a $tracefile
cmake --system-information $resultsdir/sysinfo
make clean
# update to yesterday exactly just before ctest does nightly update
svn up -q -r "{$yesterday}" ..
set +e
ctest -j$ncpus \
ctest -j$njobs \
-D ${ctest_model}Start \
-D ${ctest_model}Update \
-D ${ctest_model}Configure \
......@@ -237,33 +246,39 @@ else
longtests=OFF
fi
################################################################################
## run valgrind on icc debug build
resultsdir=$tracefilepfx-Debug
## run gcov on gcc debug build
resultsdir=$tracefilepfx-Coverage
mkdir $resultsdir
tracefile=$tracefilepfx-Debug/trace
tracefile=$tracefilepfx-Coverage/trace
getsysinfo $tracefile
mkdir -p $FULLTOKUDBDIR/Debug >/dev/null 2>&1
cd $FULLTOKUDBDIR/Debug
mkdir -p $FULLTOKUDBDIR/Coverage >/dev/null 2>&1
cd $FULLTOKUDBDIR/Coverage
cmake \
-D CMAKE_BUILD_TYPE=Debug \
-D INTEL_CC=ON \
-D BUILD_TESTING=ON \
-D USE_GCOV=ON \
-D USE_BDB=OFF \
-D RUN_LONG_TESTS=$longtests \
-D USE_CILK=OFF \
-D USE_CTAGS=OFF \
-D USE_GTAGS=OFF \
-D USE_ETAGS=OFF \
-D USE_CSCOPE=OFF \
.. 2>&1 | tee -a $tracefile
cmake --system-information $resultsdir/sysinfo
make clean
# update to yesterday exactly just before ctest does nightly update
svn up -q -r "{$yesterday}" ..
set +e
ctest -j$ncpus \
ctest -j$njobs \
-D ${ctest_model}Start \
-D ${ctest_model}Update \
-D ${ctest_model}Configure \
-D ${ctest_model}Build \
-D ${ctest_model}Test \
-D ${ctest_model}MemCheck \
-D ${ctest_model}Coverage \
2>&1 | tee -a $tracefile
set -e
......@@ -280,30 +295,18 @@ if [[ $commit -eq 1 ]]; then
cf=$(my_mktemp ftresult)
cat "$resultsdir/trace" | awk '
BEGIN {
errs=0;
look=0;
ORS=" ";
}
/Percentage Coverage:/ {
covpct=$3;
}
/[0-9]+% tests passed, [0-9]+ tests failed out of [0-9]+/ {
fail=$4;
total=$9;
pass=total-fail;
}
/^Memory checking results:/ {
look=1;
FS=" - ";
}
/Errors while running CTest/ {
look=0;
FS=" ";
}
{
if (look) {
errs+=$2;
}
}
END {
print "ERRORS=" errs;
print "COVERAGE=" covpct
if (fail>0) {
print "FAIL=" fail
}
......@@ -325,7 +328,6 @@ BEGIN {
printit=0
}
/[0-9]*\% tests passed, [0-9]* tests failed out of [0-9]*/ { printit=1 }
/Memory check project/ { printit=0 }
/^ Site:/ { printit=0 }
{
if (printit) {
......@@ -338,33 +340,39 @@ BEGIN {
fi
################################################################################
## run gcov on gcc debug build
resultsdir=$tracefilepfx-Coverage
## run valgrind on icc debug build
resultsdir=$tracefilepfx-Debug
mkdir $resultsdir
tracefile=$tracefilepfx-Coverage/trace
tracefile=$tracefilepfx-Debug/trace
getsysinfo $tracefile
mkdir -p $FULLTOKUDBDIR/Coverage >/dev/null 2>&1
cd $FULLTOKUDBDIR/Coverage
mkdir -p $FULLTOKUDBDIR/Debug >/dev/null 2>&1
cd $FULLTOKUDBDIR/Debug
cmake \
-D CMAKE_BUILD_TYPE=Debug \
-D INTEL_CC=ON \
-D BUILD_TESTING=ON \
-D USE_GCOV=ON \
-D USE_BDB=OFF \
-D RUN_LONG_TESTS=$longtests \
-D USE_CILK=OFF \
-D USE_CTAGS=OFF \
-D USE_GTAGS=OFF \
-D USE_ETAGS=OFF \
-D USE_CSCOPE=OFF \
.. 2>&1 | tee -a $tracefile
cmake --system-information $resultsdir/sysinfo
make clean
# update to yesterday exactly just before ctest does nightly update
svn up -q -r "{$yesterday}" ..
set +e
ctest -j$ncpus \
ctest -j$njobs \
-D ${ctest_model}Start \
-D ${ctest_model}Update \
-D ${ctest_model}Configure \
-D ${ctest_model}Build \
-D ${ctest_model}Test \
-D ${ctest_model}Coverage \
-D ${ctest_model}MemCheck \
2>&1 | tee -a $tracefile
set -e
......@@ -381,18 +389,30 @@ if [[ $commit -eq 1 ]]; then
cf=$(my_mktemp ftresult)
cat "$resultsdir/trace" | awk '
BEGIN {
errs=0;
look=0;
ORS=" ";
}
/Percentage Coverage:/ {
covpct=$3;
}
/[0-9]+% tests passed, [0-9]+ tests failed out of [0-9]+/ {
fail=$4;
total=$9;
pass=total-fail;
}
/^Memory checking results:/ {
look=1;
FS=" - ";
}
/Errors while running CTest/ {
look=0;
FS=" ";
}
{
if (look) {
errs+=$2;
}
}
END {
print "COVERAGE=" covpct
print "ERRORS=" errs;
if (fail>0) {
print "FAIL=" fail
}
......@@ -414,6 +434,7 @@ BEGIN {
printit=0
}
/[0-9]*\% tests passed, [0-9]* tests failed out of [0-9]*/ { printit=1 }
/Memory check project/ { printit=0 }
/^ Site:/ { printit=0 }
{
if (printit) {
......
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