OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2009 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 # Script to run client or server tests on a live remote image. | 7 # Script to run client or server tests on a live remote image. |
8 | 8 |
9 # Load common constants. This should be the first executable line. | 9 # Load common constants. This should be the first executable line. |
10 # The path to common.sh should be relative to your script's location. | 10 # The path to common.sh should be relative to your script's location. |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 fi | 129 fi |
130 | 130 |
131 set -e | 131 set -e |
132 | 132 |
133 # Set global TMP for remote_access.sh's sake | 133 # Set global TMP for remote_access.sh's sake |
134 # and if --results_dir_root is specified, | 134 # and if --results_dir_root is specified, |
135 # set TMP and create dir appropriately | 135 # set TMP and create dir appropriately |
136 if [[ ${INSIDE_CHROOT} -eq 0 ]]; then | 136 if [[ ${INSIDE_CHROOT} -eq 0 ]]; then |
137 if [[ -n "${FLAGS_results_dir_root}" ]]; then | 137 if [[ -n "${FLAGS_results_dir_root}" ]]; then |
138 TMP=${FLAGS_chroot}${FLAGS_results_dir_root} | 138 TMP=${FLAGS_chroot}${FLAGS_results_dir_root} |
139 mkdir -m 777 ${TMP} | 139 mkdir -p -m 777 ${TMP} |
140 else | 140 else |
141 TMP=$(mktemp -d ${FLAGS_chroot}/tmp/run_remote_tests.XXXX) | 141 TMP=$(mktemp -d ${FLAGS_chroot}/tmp/run_remote_tests.XXXX) |
142 fi | 142 fi |
143 TMP_INSIDE_CHROOT=$(echo ${TMP#${FLAGS_chroot}}) | 143 TMP_INSIDE_CHROOT=$(echo ${TMP#${FLAGS_chroot}}) |
144 else | 144 else |
145 if [[ -n "${FLAGS_results_dir_root}" ]]; then | 145 if [[ -n "${FLAGS_results_dir_root}" ]]; then |
146 TMP=${FLAGS_results_dir_root} | 146 TMP=${FLAGS_results_dir_root} |
147 mkdir -m 777 ${TMP} | 147 mkdir -p -m 777 ${TMP} |
148 else | 148 else |
149 TMP=$(mktemp -d /tmp/run_remote_tests.XXXX) | 149 TMP=$(mktemp -d /tmp/run_remote_tests.XXXX) |
150 fi | 150 fi |
151 TMP_INSIDE_CHROOT=${TMP} | 151 TMP_INSIDE_CHROOT=${TMP} |
152 fi | 152 fi |
153 | 153 |
154 trap cleanup EXIT | 154 trap cleanup EXIT |
155 | 155 |
156 remote_access_init | 156 remote_access_init |
157 | 157 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 done | 267 done |
268 | 268 |
269 echo "" | 269 echo "" |
270 echo_color "yellow" ">>> Test results:" | 270 echo_color "yellow" ">>> Test results:" |
271 ./generate_test_report "${TMP}" --strip="${TMP}/" | 271 ./generate_test_report "${TMP}" --strip="${TMP}/" |
272 | 272 |
273 print_time_elapsed | 273 print_time_elapsed |
274 } | 274 } |
275 | 275 |
276 main "$@" | 276 main "$@" |
OLD | NEW |