mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 19:56:32 +02:00
Enhancements to bootperf, based on recent user feedback.
Enhancement 1: Fail if we run outside the chroot, because otherwise you have to wait 10 minutes to find out your results won't be gathered. Enhancement 2: Print the location of the log output file, for the benefits of looky-loos who want to see what's going on. Change-Id: I388b1855c5b6bb20b0efffbf0babd1f60caf7bcb BUG=None TEST=run the script per instructions, and see the new output TEST=run the script outside the chroot, and see it fail immediately Review URL: http://codereview.chromium.org/6519039
This commit is contained in:
parent
36e69d0c77
commit
60a5ce0751
@ -32,6 +32,13 @@ find_common_sh
|
||||
. "${SCRIPT_ROOT}/common.sh" || (echo "Unable to load common.sh" && exit 1)
|
||||
# --- END COMMON.SH BOILERPLATE ---
|
||||
|
||||
# TODO(jrbarnette) Although run_remote_tests.sh works outside the
|
||||
# chroot, the log files it produces will be stored inside the
|
||||
# chroot. So, from outside the chroot, this script doesn't work.
|
||||
# Yes, I think it's a bug, too. You're welcome to fix it, if you
|
||||
# think it's so easy. :-)
|
||||
assert_inside_chroot
|
||||
|
||||
DEFINE_string output_dir "" "output directory for results" o
|
||||
DEFINE_boolean keep_logs "$FLAGS_FALSE" "keep autotest results" k
|
||||
|
||||
@ -147,12 +154,13 @@ run_boot_test() {
|
||||
i=0
|
||||
while [ $i -lt $count ]; do
|
||||
local iter_rundir=$RUNDIR.$iter
|
||||
local logfile=$iter_rundir/$RUNDIR_LOG
|
||||
local logfile=$(pwd)/$iter_rundir/$RUNDIR_LOG
|
||||
local summary_dir=$iter_rundir/$RUNDIR_SUMMARY
|
||||
local all_results_dir=$iter_rundir/$RUNDIR_ALL_RESULTS
|
||||
|
||||
mkdir $iter_rundir
|
||||
echo "run $iter start at $(date)"
|
||||
date
|
||||
echo " logging in $logfile"
|
||||
|
||||
# BEWARE: The --use_emerged option means that you must manually
|
||||
# emerge chromeos-base/autotest-tests if a) you are working on
|
||||
@ -163,7 +171,7 @@ run_boot_test() {
|
||||
--remote="$remote" $TEST >$logfile 2>&1
|
||||
if [ ! -e "$TMP_RESULTS/$RESULTS_KEYVAL" ]; then
|
||||
error "No results file; terminating test runs."
|
||||
error "Check $(pwd)/$logfile for output from the test run,"
|
||||
error "Check $logfile for output from the test run,"
|
||||
error "and see $TMP_RESULTS for full test logs and output."
|
||||
return
|
||||
fi
|
||||
@ -179,8 +187,7 @@ run_boot_test() {
|
||||
i=$(expr $i + 1)
|
||||
iter=$(echo $iter | awk '{printf "%03d\n", $1 + 1}')
|
||||
done
|
||||
# "run 000 start at $(date)"
|
||||
echo " ... end at $(date)"
|
||||
date
|
||||
cat $RUNDIR.???/$RUNDIR_SUMMARY/$RESULTS_KEYVAL >$KEYVAL_SUMMARY
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user