Lines Matching +full:test +full:- +full:results

4 # Use of this source code is governed by a BSD-style license that can be
8 # results for later analysis by the 'showbootdata' script.
14 # --- BEGIN COMMON.SH BOILERPLATE ---
19 local common_paths=(/usr/lib/crosutils "$(dirname "$(readlink -f "$0")")/..")
24 if [ -r "${path}/common.sh" ]; then
33 # --- END COMMON.SH BOILERPLATE ---
38 # you're welcome to try. Let me know how it goes. :-)
41 DEFINE_string output_dir "" "output directory for results" o
43 DEFINE_boolean keep_logs "$FLAGS_FALSE" "keep autotest results" k
46 TEST='platform_BootPerfServer.bootperf'
47 TMP_RESULTS="$(mktemp -d /tmp/bootperf.XXXXXX)"
48 RESULTS_ROOT="results-1-$TEST"
49 RESULTS_DIR=platform_BootPerfServer/results
67 # Structure of a results directory:
68 # $RUNDIR.$ITER/ - directory
69 # $RUNDIR_LOG - file
70 # $RUNDIR_SUMMARY/ - directory
71 # $RUNDIR_ALL_RESULTS/ - optional directory
72 # $KEYVAL_SUMMARY/ - file
73 # If you add any other content under the results directory, you'll
86 usage: $(basename $0) [ <options> ] <ip-address> [ <count> ]
88 --output_dir <directory>
89 --o <directory> Specify output directory for results
91 --board <BOARDNAME> name of board we are testing (e.g. daisy)
93 --[no]keep_logs
94 -k Keep [don't keep] autotest log files
96 Run the platform_BootPerfServer autotest, and store results in the
97 given destination directory. The test target is specified by
98 <ip-address>.
100 By default, the test is run once; if <count> is given, the test is
101 run that many times. Note that the platform_BootPerfServer test
106 destination directory already holds test results, additional
107 results are added in without overwriting earlier results.
114 autotest is preserved; with --keep_logs the (potentially large)
115 autotest logs are preserved with the test results.
121 if [ $# -gt 0 ]; then
132 ls | grep -v "^$RUNDIR[.]...\$" |
133 grep -v $KEYVAL_SUMMARY
136 # Main function to run the boot performance test. Run the boot
137 # performance test for the given count, putting output into the
140 # Arguments are <ip-address> and <count> arguments, as for the main
143 # We terminate test runs if "test_that" ever fails to produce the
144 # results keyval file; generally this is the result of a serious
148 local count="${2:-1}"
158 while [ $i -lt $count ]; do
165 echo "$(date '+%T') - $logfile"
167 $RUN_TEST --results_dir="$TMP_RESULTS" --args "10" $BOARD \
168 "$remote" $TEST >$logfile 2>&1
169 if [ ! -e "$TMP_RESULTS/$RESULTS_ROOT/$RESULTS_KEYVAL" ]; then
170 error "No results file; terminating test runs."
171 error "Check $logfile for output from the test run,"
172 error "and see $TMP_RESULTS for full test logs and output."
176 tar cf - -C $TMP_RESULTS/$RESULTS_ROOT "${RESULTS_SUMMARY_FILES[@]}" |
177 tar xf - -C $summary_dir
178 if [ $FLAGS_keep_logs -eq $FLAGS_TRUE ]; then
182 rm -rf $TMP_RESULTS
191 # Main routine - check validity of the (already parsed) command line
192 # options. 'cd' to the results directory, if it was specified. If
195 if [ $# -lt 1 ]; then
197 elif [ $# -gt 2 ]; then
201 if [ -n "${FLAGS_board}" ]; then
202 BOARD="--board=${FLAGS_board}"
205 if [ -n "${FLAGS_output_dir}" ]; then
206 if [ ! -d "${FLAGS_output_dir}" ]; then
213 elif [ -n "$(extra_files)" ]; then
214 error "No results directory specified, and current directory"
215 error "contains contents other than run results."
216 error "You can override this error by using the --output_dir option"
221 # N.B. the test [ "$2" -eq "$2" ] tests whether "$2" is valid as a
224 if [ -n "$2" ]; then
225 if ! [ "$2" -eq "$2" ] 2>/dev/null || [ "$2" -le 0 ]; then
233 # shflags defines --help implicitly; if it's used on the command
238 if [ ${FLAGS_help} -eq ${FLAGS_TRUE} ]; then