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

Side by Side Diff: bootperf-bin/bootperf

Issue 6240018: This starts to fix the scripts so that they load from /usr/lib/crosutils (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: fixing bad merge Created 9 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « bin/cros_workon_make ('k') | build_gpt.sh » ('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 (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS 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 # Wrapper to run the platform_BootPerfServer autotest, and store the 7 # Wrapper to run the platform_BootPerfServer autotest, and store the
8 # results for later analysis by the 'showbootdata' script. 8 # results for later analysis by the 'showbootdata' script.
9 # 9 #
10 # NOTE: This script must be run from inside the chromeos build 10 # NOTE: This script must be run from inside the chromeos build
11 # chroot environment. 11 # chroot environment.
12 # 12 #
13 13
14 # SCRIPT_DIR="$(cd "$(dirname $0)/.." ; pwd)" 14 # --- BEGIN COMMON.SH BOILERPLATE ---
15 SCRIPT_DIR=$HOME/trunk/src/scripts 15 # Load common CrOS utilities. Inside the chroot this file is installed in
16 . "$SCRIPT_DIR/common.sh" 16 # /usr/lib/crosutils. Outside the chroot we find it relative to the script's
17 # location.
18 find_common_sh() {
19 local common_paths=(/usr/lib/crosutils "$(dirname "$(readlink -f "$0")")/..")
20 local path
21
22 SCRIPT_ROOT=
23 for path in "${common_paths[@]}"; do
24 if [ -r "${path}/common.sh" ]; then
25 SCRIPT_ROOT=${path}
26 break
27 fi
28 done
29 }
30
31 find_common_sh
32 . "${SCRIPT_ROOT}/common.sh" || (echo "Unable to load common.sh" && exit 1)
33 # --- END COMMON.SH BOILERPLATE ---
17 34
18 DEFINE_string output_dir "" "output directory for results" o 35 DEFINE_string output_dir "" "output directory for results" o
19 DEFINE_boolean keep_logs "$FLAGS_FALSE" "keep autotest results" k 36 DEFINE_boolean keep_logs "$FLAGS_FALSE" "keep autotest results" k
20 37
21 RUN_TEST="$SCRIPT_DIR/run_remote_tests.sh" 38 RUN_TEST="$SCRIPTS_DIR/run_remote_tests.sh"
22 TEST=server/site_tests/platform_BootPerfServer/control 39 TEST=server/site_tests/platform_BootPerfServer/control
23 TMP_RESULTS="/tmp/bootperf.$(date '+%Y%j%H%M').$$" 40 TMP_RESULTS="/tmp/bootperf.$(date '+%Y%j%H%M').$$"
24 RESULTS_DIR=platform_BootPerfServer/platform_BootPerfServer/results 41 RESULTS_DIR=platform_BootPerfServer/platform_BootPerfServer/results
25 RESULTS_KEYVAL=$RESULTS_DIR/keyval 42 RESULTS_KEYVAL=$RESULTS_DIR/keyval
26 RESULTS_SUMMARY_FILES=( 43 RESULTS_SUMMARY_FILES=(
27 $RESULTS_DIR 44 $RESULTS_DIR
28 platform_BootPerfServer/keyval 45 platform_BootPerfServer/keyval
29 platform_BootPerfServer/platform_BootPerfServer/keyval 46 platform_BootPerfServer/platform_BootPerfServer/keyval
30 platform_BootPerfServer/platform_BootPerfServer/platform_BootPerf/keyval 47 platform_BootPerfServer/platform_BootPerfServer/platform_BootPerf/keyval
31 platform_BootPerfServer/platform_BootPerfServer/status 48 platform_BootPerfServer/platform_BootPerfServer/status
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 # for that case here. 228 # for that case here.
212 if ! FLAGS "$@"; then 229 if ! FLAGS "$@"; then
213 if [ ${FLAGS_help} -eq ${FLAGS_TRUE} ]; then 230 if [ ${FLAGS_help} -eq ${FLAGS_TRUE} ]; then
214 exit 0 231 exit 0
215 else 232 else
216 usage 233 usage
217 fi 234 fi
218 fi 235 fi
219 236
220 eval main "${FLAGS_ARGV}" 237 eval main "${FLAGS_ARGV}"
OLDNEW
« no previous file with comments | « bin/cros_workon_make ('k') | build_gpt.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698