From 23de818c2c956205dfefe82c3d1e71fdd9271c40 Mon Sep 17 00:00:00 2001 From: "J. Richard Barnette" Date: Mon, 22 Nov 2010 17:22:48 -0800 Subject: [PATCH] Various minor bootperf improvements Change-Id: I791fa01fcd2feb0c7b4c7e3d63cebc88d896c8ac BUG=chromium-os:9459 BUG=chromium-os:9460 TEST=run the script, and check results with showbootdata or by manually inspecting the output directory TEST=run "bootperf invalid-hostname", and see that the error message is useful Review URL: http://codereview.chromium.org/5156008 --- bootperf-bin/bootperf | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/bootperf-bin/bootperf b/bootperf-bin/bootperf index 4aea1a8971..5c0ce6613b 100755 --- a/bootperf-bin/bootperf +++ b/bootperf-bin/bootperf @@ -21,9 +21,10 @@ DEFINE_boolean keep_logs "$FLAGS_FALSE" "keep autotest results" k RUN_TEST="$SCRIPT_DIR/run_remote_tests.sh" TEST=server/site_tests/platform_BootPerfServer/control TMP_RESULTS="/tmp/bootperf.$(date '+%Y%j%H%M').$$" -RESULTS_KEYVAL=platform_BootPerfServer/platform_BootPerfServer/results/keyval +RESULTS_DIR=platform_BootPerfServer/platform_BootPerfServer/results +RESULTS_KEYVAL=$RESULTS_DIR/keyval RESULTS_SUMMARY_FILES=( - $RESULTS_KEYVAL + $RESULTS_DIR platform_BootPerfServer/keyval platform_BootPerfServer/platform_BootPerfServer/keyval platform_BootPerfServer/platform_BootPerfServer/platform_BootPerf/keyval @@ -135,13 +136,19 @@ run_boot_test() { mkdir $iter_rundir echo "run $iter start at $(date)" - $RUN_TEST --results_dir_root="$TMP_RESULTS" \ + + # BEWARE: The --use_emerged option means that you must manually + # emerge chromeos-base/autotest-tests if a) you are working on + # the package, and b) you also want use this script to test your + # changes to the package. (The option is here because IMO the + # alternative is a bigger nuisance.) + $RUN_TEST --use_emerged --results_dir_root="$TMP_RESULTS" \ --remote="$remote" $TEST >$logfile 2>&1 if [ ! -e "$TMP_RESULTS/$RESULTS_KEYVAL" ]; then error "No results file; terminating test runs." - error "Check $logfile for output from the test run," + error "Check $(pwd)/$logfile for output from the test run," error "and see $TMP_RESULTS for full test logs and output." - break + return fi mkdir $summary_dir tar cf - -C $TMP_RESULTS "${RESULTS_SUMMARY_FILES[@]}" |