Commit 7467b279 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5291 add USE_VALGRIND option to control NVALGRIND, and update

nightly tests to use gcc optimized build too


git-svn-id: file:///svn/toku/tokudb@46099 c7de825b-a66e-492c-adef-691d508d4ae1
parent 02dd82a9
......@@ -120,8 +120,10 @@ else ()
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ip -ipo1")
endif ()
endif ()
## but we do want -DNVALGRIND
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE NVALGRIND=1)
if (NOT USE_VALGRIND)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE NVALGRIND=1)
endif ()
if (CMAKE_CXX_COMPILER_ID MATCHES Intel)
set(CMAKE_C_FLAGS "-std=c99 ${CMAKE_C_FLAGS}")
......
......@@ -448,4 +448,112 @@ BEGIN {
rm $cf
fi
################################################################################
## run valgrind on icc debug build
resultsdir=$tracefilepfx-Debug
mkdir $resultsdir
tracefile=$tracefilepfx-Debug/trace
getsysinfo $tracefile
mkdir -p $FULLTOKUDBDIR/gccopt >/dev/null 2>&1
cd $FULLTOKUDBDIR/gccopt
CC=gcc47 CXX=g++47 cmake \
-D CMAKE_BUILD_TYPE=Release \
-D INTEL_CC=OFF \
-D USE_VALGRIND=ON \
-D BUILD_TESTING=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$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 \
2>&1 | tee -a $tracefile
set -e
cp $tracefile notes.txt
set +e
ctest -D ${ctest_model}Submit -A notes.txt \
2>&1 | tee -a $tracefile
set -e
rm notes.txt
tag=$(head -n1 Testing/TAG)
cp -r Testing/$tag $resultsdir
if [[ $commit -eq 1 ]]; then
cf=$(my_mktemp ftresult)
cat "$resultsdir/trace" | awk '
BEGIN {
errs=0;
look=0;
ORS=" ";
}
/[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;
if (fail>0) {
print "FAIL=" fail
}
print "PASS=" pass
}' >"$cf"
get_latest_svn_revision $FULLTOKUDBDIR >>"$cf"
echo -n " " >>"$cf"
cat "$resultsdir/trace" | awk '
BEGIN {
FS=": ";
}
/Build name/ {
print $2;
exit
}' >>"$cf"
(echo; echo) >>"$cf"
cat "$resultsdir/trace" | awk '
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) {
print $0
}
}' >>"$cf"
svn add $resultsdir
svn commit -F "$cf" $resultsdir
rm $cf
fi
exit 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