OLD | NEW |
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 # Assume that we run HWQual test before and generate the system component file. | 7 # Assume that we run HWQual test before and generate the system component file. |
8 # The file is placed in (XXXX is a random number): | 8 # The file is placed in (XXXX is a random number): |
9 # /tmp/run_remote_tests.XXXX/hardware_Components/results/system_components | 9 # /tmp/run_remote_tests.XXXX/hardware_Components/results/system_components |
10 # | 10 # |
11 # QUALDB can be a full path of the file, or a specified directory | 11 # QUALDB can be a full path of the file, or a specified directory |
12 # /tmp/run_remote_tests.XXXX, or a default wildcard one /tmp/run_remote_tests.*. | 12 # /tmp/run_remote_tests.XXXX, or a default wildcard one /tmp/run_remote_tests.*. |
13 | 13 |
14 COMPONENTS_FILE="${STATEFUL_DIR}/usr/local/autotest/site_tests/"\ | 14 COMPONENTS_FILE="${ROOT_FS_DIR}/usr/local/autotest/site_tests/"\ |
15 "hardware_Components/qualified_components" | 15 "hardware_Components/qualified_components" |
16 | 16 |
17 # If QUALDB is a default wildcard directory, try to use the most recent one. | 17 # If QUALDB is a default wildcard directory, try to use the most recent one. |
18 QUALDB=$(ls -dt ${QUALDB} 2>&-| head -1) | 18 QUALDB=$(ls -dt ${QUALDB} 2>&-| head -1) |
19 | 19 |
20 # Try to append the full path to the file if QUALDB is a directory. | 20 # Try to append the full path to the file if QUALDB is a directory. |
21 if [ ! -z ${QUALDB} ] && [ -d ${QUALDB} ]; then | 21 if [ ! -z ${QUALDB} ] && [ -d ${QUALDB} ]; then |
22 QUALDB="${QUALDB}/hardware_Components/results/system_components" | 22 QUALDB="${QUALDB}/hardware_Components/results/system_components" |
23 fi | 23 fi |
24 | 24 |
25 if [ ! -z ${QUALDB} ] && [ -f ${QUALDB} ]; then | 25 if [ ! -z ${QUALDB} ] && [ -f ${QUALDB} ]; then |
26 # Copy the qualified component file to the image | 26 # Copy the qualified component file to the image |
27 echo "Copying ${QUALDB} to the image." | 27 echo "Copying ${QUALDB} to the image." |
28 cp -f ${QUALDB} ${COMPONENTS_FILE} | 28 cp -f ${QUALDB} ${COMPONENTS_FILE} |
29 else | 29 else |
30 echo "No qualified component file found at: ${QUALDB}" | 30 echo "No qualified component file found at: ${QUALDB}" |
31 fi | 31 fi |
OLD | NEW |