Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: courgette/run_stress_test

Issue 22935012: Factored common functionality out of the Courgette stress test scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « courgette/run_mem_test ('k') | courgette/stress_test_common » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 # Stress test and size measurement for courgette patches. 7 # Stress test and size measurement for courgette patches.
8 8
9 error() { 9 source "$(dirname ${0})/stress_test_common"
10 echo "error: ${@}" >&2
11 }
12 10
13 outdir_prefix="stress_test_" 11 outdir_prefix="stress_test_"
14 time="/usr/bin/time" 12 time="/usr/bin/time"
15 13
16 if [ $# -lt 2 ]; then 14 if [ $# -lt 2 ]; then
17 cat <<EOF 15 cat <<EOF
18 16
19 USAGE: $(basename ${0}) [-s] dir1 dir2 [outdir] 17 USAGE: $(basename ${0}) [-s] dir1 dir2 [outdir]
20 18
21 -s only test files supported by courgette 19 -s only test files supported by courgette
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 courgette -supported "${file1}" >/dev/null 154 courgette -supported "${file1}" >/dev/null
157 if [ "${?}" -ne 0 ]; then 155 if [ "${?}" -ne 0 ]; then
158 continue; 156 continue;
159 fi 157 fi
160 fi 158 fi
161 run_test "${file1}" "${file2}" 159 run_test "${file1}" "${file2}"
162 done 2>&1 | tee -a "${log}" 160 done 2>&1 | tee -a "${log}"
163 161
164 date >> "${log}" 162 date >> "${log}"
165 163
166 count_result() {
167 if [ ! -z "${1}" ]; then
168 echo $(cat "${log}" | grep "^${1} " | wc -l)
169 else
170 echo 0
171 fi
172 }
173
174 cat <<EOF | tee -a "${log}" 164 cat <<EOF | tee -a "${log}"
175 $(count_result "PASS_COURGETTE") successful courgette patches 165 $(count_result "PASS_COURGETTE") successful courgette patches
176 $(count_result "FAIL_COURGETTE") failed courgette patches (search log for \ 166 $(count_result "FAIL_COURGETTE") failed courgette patches (search log for \
177 "^FAIL_COURGETTE") 167 "^FAIL_COURGETTE")
178 $(count_result "FAIL_DISASSEMBLE") failed to disassemble/assemble (search log \ 168 $(count_result "FAIL_DISASSEMBLE") failed to disassemble/assemble (search log \
179 for "^FAIL_DISASSEMBLE") 169 for "^FAIL_DISASSEMBLE")
180 $(count_result "PASS_BSDIFF") succesful bsdiff patches 170 $(count_result "PASS_BSDIFF") succesful bsdiff patches
181 $(count_result "FAIL_BSDIFF") failed bsdiff patches 171 $(count_result "FAIL_BSDIFF") failed bsdiff patches
182 $(count_result "BEST_COURGETTE") patch(es) where courgette (bz2) is smaller 172 $(count_result "BEST_COURGETTE") patch(es) where courgette (bz2) is smaller
183 $(count_result "BEST_BSDIFF") patch(es) where bsdiff is smaller (bz2) 173 $(count_result "BEST_BSDIFF") patch(es) where bsdiff is smaller (bz2)
184 $(count_result "BEST_TIE") patch(es) where both are the same size (bz2) 174 $(count_result "BEST_TIE") patch(es) where both are the same size (bz2)
185 $(count_result "XZBEST_COURGETTE") patch(es) where courgette (xz) is smaller 175 $(count_result "XZBEST_COURGETTE") patch(es) where courgette (xz) is smaller
186 $(count_result "XZBEST_BSDIFF") patch(es) where bsdiff is smaller (xz) 176 $(count_result "XZBEST_BSDIFF") patch(es) where bsdiff is smaller (xz)
187 $(count_result "XZBEST_TIE") patch(es) where both are the same size (xz) 177 $(count_result "XZBEST_TIE") patch(es) where both are the same size (xz)
188 EOF 178 EOF
OLDNEW
« no previous file with comments | « courgette/run_mem_test ('k') | courgette/stress_test_common » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698