Commit b4b92a0c authored by timurrrr@chromium.org's avatar timurrrr@chromium.org

Improve waterfall.sh - fetch only reports and failed test names rather then the whole stdio

TEST=`./tools/valgrind/waterfall.sh fetch` then `./tools/valgrind/waterfall.sh match`
Review URL: http://codereview.chromium.org/6057006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71653 0039d316-1c4b-4281-b951-d872f2087c98
parent e2e7ab6d
...@@ -45,6 +45,9 @@ download() { ...@@ -45,6 +45,9 @@ download() {
fetch_logs() { fetch_logs() {
# Fetch Valgrind logs from the waterfall {{{1 # Fetch Valgrind logs from the waterfall {{{1
# TODO(timurrrr,maruel): use JSON, see
# http://build.chromium.org/p/chromium.memory/json/help
rm -rf "$LOGS_DIR" # Delete old logs rm -rf "$LOGS_DIR" # Delete old logs
mkdir "$LOGS_DIR" mkdir "$LOGS_DIR"
...@@ -64,25 +67,42 @@ fetch_logs() { ...@@ -64,25 +67,42 @@ fetch_logs() {
# We speed up the 'fetch' step by skipping the builds/tests which succeeded. # We speed up the 'fetch' step by skipping the builds/tests which succeeded.
# TODO(timurrrr): OTOH, we won't be able to check # TODO(timurrrr): OTOH, we won't be able to check
# if some suppression is not used anymore. # if some suppression is not used anymore.
LIST_OF_BUILDS=$(grep "<a href=\"\.\./builders/.*/builds/[0-9]\+.*failed" \ LIST_OF_BUILDS=$(grep "rev.*<a href=\"\.\./builders/.*/builds/[0-9]\+" \
"$LOGS_DIR/slave_$S" | grep -v "failed compile" | \ "$LOGS_DIR/slave_$S" | head -n 2 | \
sed "s/.*\/builds\///" | sed "s/\".*//" | head -n 2) grep "failed" | grep -v "failed compile" | \
sed "s/.*\/builds\///" | sed "s/\".*//")
for BUILD in $LIST_OF_BUILDS for BUILD in $LIST_OF_BUILDS
do do
BUILD_RESULTS="$LOGS_DIR/slave_${S}_build_${BUILD}" # We'll fetch a few tiny URLs now, let's use a temp file.
download $SLAVE_URL/builds/$BUILD "$BUILD_RESULTS" TMPFILE=$(mktemp)
LIST_OF_TESTS=$(grep "<a href=\"[0-9]\+/steps/memory.*/logs/stdio\"" \ download $SLAVE_URL/builds/$BUILD "$TMPFILE"
"$BUILD_RESULTS" | \
sed "s/.*a href=\"//" | sed "s/\".*//") REPORT_FILE="$LOGS_DIR/report_${S}_${BUILD}"
for TEST in $LIST_OF_TESTS rm -f $REPORT_FILE 2>/dev/null || true # make sure it doesn't exist
REPORT_URLS=$(grep -o "[0-9]\+/steps/memory.*/logs/[0-9A-F]\{16\}" \
"$TMPFILE" || true) # `true` is to succeed on empty output
FAILED_TESTS=$(grep -o "[0-9]\+/steps/memory.*/logs/[A-Za-z0-9.]\+" \
"$TMPFILE" | grep -v "[0-9A-F]\{16\}" | grep -v "stdio" \
|| true)
for REPORT in $REPORT_URLS
do do
REPORT_FILE=$(echo "report_${S}_$TEST" | sed "s/\/logs\/stdio//" | \ download "$SLAVE_URL/builds/$REPORT/text" "$TMPFILE"
sed "s/\/steps//" | sed "s/\//_/g") echo "" >> "$TMPFILE" # Add a newline at the end
echo -n "." cat "$TMPFILE" | tr -d '\r' >> "$REPORT_FILE"
download $SLAVE_URL/builds/$TEST "$LOGS_DIR/$REPORT_FILE"
echo $SLAVE_URL/builds/$TEST >> "$LOGS_DIR/$REPORT_FILE"
done done
for FAILURE in $FAILED_TESTS
do
echo -n "FAILED:" >> "$REPORT_FILE"
echo "$FAILURE" | sed -e "s/.*\/logs\///" -e "s/\/.*//" \
>> "$REPORT_FILE"
done
rm "$TMPFILE"
echo $SLAVE_URL/builds/$BUILD >> "$REPORT_FILE"
done done
echo " DONE" echo " DONE"
done done
...@@ -99,10 +119,9 @@ match_gtest_excludes() { ...@@ -99,10 +119,9 @@ match_gtest_excludes() {
do do
echo echo
echo "Test failures on ${PLATFORM}:" | sed "s/%20/ /" echo "Test failures on ${PLATFORM}:" | sed "s/%20/ /"
grep "\[ FAILED \] .* ([0-9]\+ ms)" -R "$LOGS_DIR"/*${PLATFORM}* | \ grep -h -o "^FAILED:.*" -R "$LOGS_DIR"/*${PLATFORM}* | \
grep -v "FAILS\|FLAKY" | \ grep -v "FAILS\|FLAKY" | sort | uniq | \
sed -e "s/.*%20//" -e "s/_[1-9]\+:/:/" \ sed -e "s/^FAILED://" -e "s/^/ /"
-e "s/\[ FAILED \] //" -e "s/ ([0-9]\+ ms)//" -e "s/^/ /"
# Don't put any operators between "grep | sed" and "RESULT=$PIPESTATUS" # Don't put any operators between "grep | sed" and "RESULT=$PIPESTATUS"
RESULT=$PIPESTATUS RESULT=$PIPESTATUS
......
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