| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 # This script can be used by waterfall sheriffs to fetch the status | 7 # This script can be used by waterfall sheriffs to fetch the status |
| 8 # of Valgrind bots on the memory waterfall and test if their local | 8 # of Valgrind bots on the memory waterfall and test if their local |
| 9 # suppressions match the reports on the waterfall. | 9 # suppressions match the reports on the waterfall. |
| 10 | 10 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 LIST_OF_BUILDS=$(cat "$LOGS_DIR/slave_$S" | \ | 75 LIST_OF_BUILDS=$(cat "$LOGS_DIR/slave_$S" | \ |
| 76 awk 'BEGIN { buf = "" } | 76 awk 'BEGIN { buf = "" } |
| 77 { | 77 { |
| 78 if ($0 ~ /<\/td>/) { buf = (buf $0); } | 78 if ($0 ~ /<\/td>/) { buf = (buf $0); } |
| 79 else { | 79 else { |
| 80 if (buf) { print buf; buf="" } | 80 if (buf) { print buf; buf="" } |
| 81 print $0 | 81 print $0 |
| 82 } | 82 } |
| 83 } | 83 } |
| 84 END {if (buf) print buf}' | \ | 84 END {if (buf) print buf}' | \ |
| 85 grep "Failed" | \ | 85 grep "success\|failure" | \ |
| 86 head -n 3 | \ |
| 87 grep "failure" | \ |
| 86 grep -v "failed compile" | \ | 88 grep -v "failed compile" | \ |
| 87 sed "s/.*\/builds\///" | sed "s/\".*//") | 89 sed "s/.*\/builds\///" | sed "s/\".*//") |
| 88 | 90 |
| 89 for BUILD in $LIST_OF_BUILDS | 91 for BUILD in $LIST_OF_BUILDS |
| 90 do | 92 do |
| 91 # We'll fetch a few tiny URLs now, let's use a temp file. | 93 # We'll fetch a few tiny URLs now, let's use a temp file. |
| 92 TMPFILE=$(mktemp -t memory_waterfall.XXXXXX) | 94 TMPFILE=$(mktemp -t memory_waterfall.XXXXXX) |
| 93 download $SLAVE_URL/builds/$BUILD "$TMPFILE" | 95 download $SLAVE_URL/builds/$BUILD "$TMPFILE" |
| 94 | 96 |
| 95 REPORT_FILE="$LOGS_DIR/report_${S}_${BUILD}" | 97 REPORT_FILE="$LOGS_DIR/report_${S}_${BUILD}" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 elif [ "$1" = "blame" ] | 166 elif [ "$1" = "blame" ] |
| 165 then | 167 then |
| 166 echo The blame command died of bitrot. If you need it, please reimplement it. | 168 echo The blame command died of bitrot. If you need it, please reimplement it. |
| 167 echo Reimplementation is blocked on http://crbug.com/82688 | 169 echo Reimplementation is blocked on http://crbug.com/82688 |
| 168 else | 170 else |
| 169 THISNAME=$(basename "${0}") | 171 THISNAME=$(basename "${0}") |
| 170 echo "Usage: $THISNAME fetch|match" | 172 echo "Usage: $THISNAME fetch|match" |
| 171 echo " fetch - Fetch Valgrind logs from the memory waterfall" | 173 echo " fetch - Fetch Valgrind logs from the memory waterfall" |
| 172 echo " match - Test the local suppression files against the downloaded logs" | 174 echo " match - Test the local suppression files against the downloaded logs" |
| 173 fi | 175 fi |
| OLD | NEW |