#!/bin/bash # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. TEST_DIR="${ROOT_FS_DIR}/usr/local/autotest/site_tests/hardware_Components" pushd ${TEST_DIR} 1> /dev/null if [ -z ${QUALDB} ]; then # If QUALDB not specified, check the existence of the qualified components # belonging to the board. QUALDB="qualified_components_${BOARD}*" FIRST_QUALDB=$(ls $QUALDB 2> /dev/null | head -1) if [ ! -z ${FIRST_QUALDB} ]; then # Remove qualified components belonging to other boards ls qualified_components* 2> /dev/null | grep -v \ qualified_components_${BOARD} | xargs rm -f else echo "No qualified component file found at: ${QUALDB}" fi else rm -f qualified_components* echo "Copying ${QUALDB} to the image." cp -f ${QUALDB} ${TEST_DIR}/ fi popd 1> /dev/null