| 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 |
| 11 set -e | 11 set -e |
| 12 | 12 |
| 13 THISDIR=$(dirname "${0}") | 13 THISDIR=$(dirname "${0}") |
| 14 LOGS_DIR=$THISDIR/waterfall.tmp | 14 LOGS_DIR=$THISDIR/waterfall.tmp |
| 15 WATERFALL_PAGE="https://build.chromium.org/p/chromium.memory/builders" | 15 WATERFALL_PAGE="https://build.chromium.org/p/chromium.memory/builders" |
| 16 WATERFALL_FYI_PAGE="https://build.chromium.org/p/chromium.memory.fyi/builders" | 16 WATERFALL_FULL_PAGE="https://build.chromium.org/p/chromium.memory.full/builders" |
| 17 | 17 |
| 18 download() { | 18 download() { |
| 19 # Download a file. | 19 # Download a file. |
| 20 # $1 = URL to download | 20 # $1 = URL to download |
| 21 # $2 = Path to the output file | 21 # $2 = Path to the output file |
| 22 # {{{1 | 22 # {{{1 |
| 23 if [ "$(which curl)" != "" ] | 23 if [ "$(which curl)" != "" ] |
| 24 then | 24 then |
| 25 if ! curl -s -o "$2" "$1" | 25 if ! curl -s -o "$2" "$1" |
| 26 then | 26 then |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 shift $((OPTIND-1)) | 221 shift $((OPTIND-1)) |
| 222 if [ $# != 0 ]; then | 222 if [ $# != 0 ]; then |
| 223 usage | 223 usage |
| 224 exit 1 | 224 exit 1 |
| 225 fi | 225 fi |
| 226 fi | 226 fi |
| 227 | 227 |
| 228 if [ "$CMD" = "fetch" ]; then | 228 if [ "$CMD" = "fetch" ]; then |
| 229 echo "Fetching $NUMBUILDS builds" | 229 echo "Fetching $NUMBUILDS builds" |
| 230 fetch_logs "$WATERFALL_PAGE" | 230 fetch_logs "$WATERFALL_PAGE" |
| 231 fetch_logs "$WATERFALL_FYI_PAGE" | 231 fetch_logs "$WATERFALL_FULL_PAGE" |
| 232 elif [ "$CMD" = "fetch_layout" ]; then | 232 elif [ "$CMD" = "fetch_layout" ]; then |
| 233 echo "Fetching $NUMBUILDS builds" | 233 echo "Fetching $NUMBUILDS builds" |
| 234 fetch_logs "$WATERFALL_FYI_PAGE" layout_only | 234 fetch_logs "$WATERFALL_FULL_PAGE" layout_only |
| 235 elif [ "$CMD" = "match" ]; then | 235 elif [ "$CMD" = "match" ]; then |
| 236 match_suppressions $@ | 236 match_suppressions $@ |
| 237 match_gtest_excludes | 237 match_gtest_excludes |
| 238 elif [ "$CMD" = "blame" ]; then | 238 elif [ "$CMD" = "blame" ]; then |
| 239 echo The blame command died of bitrot. If you need it, please reimplement it. | 239 echo The blame command died of bitrot. If you need it, please reimplement it. |
| 240 echo Reimplementation is blocked on http://crbug.com/82688 | 240 echo Reimplementation is blocked on http://crbug.com/82688 |
| 241 else | 241 else |
| 242 usage | 242 usage |
| 243 exit 1 | 243 exit 1 |
| 244 fi | 244 fi |
| OLD | NEW |