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 TEST_DIR="${ROOT_FS_DIR}/usr/local/autotest/site_tests/hardware_Components" | 7 TEST_DIR="${ROOT_FS_DIR}/usr/local/autotest/site_tests/hardware_Components" |
8 | 8 |
9 # If QUALDB not specified, use the one based on board name. | 9 pushd ${TEST_DIR} 1> /dev/null |
| 10 |
10 if [ -z ${QUALDB} ]; then | 11 if [ -z ${QUALDB} ]; then |
11 QUALDB="${TEST_DIR}/qualified_components_${BOARD}*" | 12 # If QUALDB not specified, check the existence of the qualified components |
| 13 # belonging to the board. |
| 14 QUALDB="qualified_components_${BOARD}*" |
| 15 FIRST_QUALDB=$(ls $QUALDB | head -1) |
| 16 if [ ! -z ${FIRST_QUALDB} ]; then |
| 17 # Remove qualified components belonging to other boards |
| 18 ls qualified_components* | grep -v qualified_components_${BOARD} \ |
| 19 | xargs rm -f |
| 20 else |
| 21 echo "No qualified component file found at: ${QUALDB}" |
| 22 fi |
| 23 else |
| 24 rm -f qualified_components* |
| 25 echo "Copying ${QUALDB} to the image." |
| 26 cp -f ${QUALDB} ${TEST_DIR}/ |
12 fi | 27 fi |
13 | 28 |
14 if [ ! -z ${QUALDB} ] && [ -f ${QUALDB} ]; then | 29 popd 1> /dev/null |
15 # Copy the qualified component file to the image | |
16 echo "Copying ${QUALDB} to the image." | |
17 cp -f ${QUALDB} ${TEST_DIR}/ | |
18 else | |
19 echo "No qualified component file found at: ${QUALDB}" | |
20 fi | |
OLD | NEW |