From 10a980eeb658a972b1dff46c12584fb9dc1733ae Mon Sep 17 00:00:00 2001 From: Tom Wai-Hong Tam Date: Tue, 14 Sep 2010 02:52:26 +0800 Subject: [PATCH] Reflect the change of QualDbs location moved. Reflect the change of https://chromereview.prom.corp.google.com/1638035 TEST=manaul - image_to_usb --factory - run factory test -- match HWID -- write GBB -- reboot -- check HW components Review URL: http://codereview.chromium.org/3290021 Change-Id: Id97153fe1d06917ac13d1470866c17d5e4acdc9d --- mod_for_factory_scripts/500populateQualDbs | 24 ++++++++-------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/mod_for_factory_scripts/500populateQualDbs b/mod_for_factory_scripts/500populateQualDbs index 646f36c6d2..fff9a05642 100755 --- a/mod_for_factory_scripts/500populateQualDbs +++ b/mod_for_factory_scripts/500populateQualDbs @@ -8,22 +8,14 @@ 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}/ +# Remove the DB directories belonging to other boards. +KEEPDB="data_${BOARD}" +ls -d data_* 2> /dev/null | grep -v ${KEEPDB} | xargs rm -fr + +# Ensure there is DB directory in x86-agz and x86-mario. +if [ ! -d ${KEEPDB} -a \ + \( "${BOARD}" = "x86-agz" -o "${BOARD}" = "x86-mario" \) ]; then + echo "No component DB directory found at: ${KEEPDB}" fi popd 1> /dev/null