| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright 2013 The Chromium Authors. All rights reserved. | 3 # Copyright 2013 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 # Collect memory usage on the patches from run_stress_test | 7 # Collect memory usage on the patches from run_stress_test |
| 8 | 8 |
| 9 error() { | 9 source "$(dirname ${0})/stress_test_common" |
| 10 echo "error: ${@}" >&2 | |
| 11 } | |
| 12 | 10 |
| 13 main() { | 11 main() { |
| 14 if [ $# -lt 1 ]; then | 12 if [ $# -lt 1 ]; then |
| 15 cat <<EOF | 13 cat <<EOF |
| 16 | 14 |
| 17 USAGE: $(basename ${0}) dir | 15 USAGE: $(basename ${0}) dir |
| 18 | 16 |
| 19 Collect memory usage on the patches from run_stress_test | 17 Collect memory usage on the patches from run_stress_test |
| 20 | 18 |
| 21 EOF | 19 EOF |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 local applied_bsdiff="${out_base}.applied_bsdiff" | 58 local applied_bsdiff="${out_base}.applied_bsdiff" |
| 61 local bsdiff_mem="${out_base}.bsdiff_mem" | 59 local bsdiff_mem="${out_base}.bsdiff_mem" |
| 62 valgrind --tool=massif --massif-out-file="${bsdiff_mem}" bspatch \ | 60 valgrind --tool=massif --massif-out-file="${bsdiff_mem}" bspatch \ |
| 63 "${original}" "${applied_bsdiff}" "${bsdiff_patch}" & | 61 "${original}" "${applied_bsdiff}" "${bsdiff_patch}" & |
| 64 | 62 |
| 65 wait | 63 wait |
| 66 done | 64 done |
| 67 } | 65 } |
| 68 | 66 |
| 69 main "${@}" | 67 main "${@}" |
| OLD | NEW |