From fb5ce169eec96811a359a7fdc6a608584a16a2ed Mon Sep 17 00:00:00 2001 From: Tom Wai-Hong Tam Date: Tue, 30 Nov 2010 11:22:50 +0800 Subject: [PATCH] For the boards already have DB directories, remove the default DB. The default DB is an all-pass DB. If no DB found, the hardware_Components test falls back to the all-pass one and skip the real check. In order to prevent skipping the check, remove the default DB in the boards already have DB directories. TEST=run "image_to_usb.sh --factory" and check the default DB removed BUG=chrome-os-partner:1737 Change-Id: Ia25f2551a5eba3a95fe736e86bfe52c340f329a8 Review URL: http://codereview.chromium.org/5339011 --- mod_for_factory_scripts/500populateQualDbs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mod_for_factory_scripts/500populateQualDbs b/mod_for_factory_scripts/500populateQualDbs index 77f73ec1e2..2d869413b3 100755 --- a/mod_for_factory_scripts/500populateQualDbs +++ b/mod_for_factory_scripts/500populateQualDbs @@ -13,10 +13,14 @@ if [ -d "${TEST_DIR}" ]; then 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}" ] && - [ "${BOARD}" = "x86-agz" -o "${BOARD}" = "x86-mario" ]; then - echo "No component DB directory found at: ${KEEPDB}" + if [ "${BOARD}" = "x86-agz" -o "${BOARD}" = "x86-mario" ]; then + # Ensure there is a DB directory in x86-agz or x86-mario. + if [ ! -d "${KEEPDB}" ]; then + echo "No component DB directory found at: ${KEEPDB}" + fi + # Remove the default DB since it is unnecessary. + DEFAULTDB="approved_components.default" + rm -f "${DEFAULTDB}" fi popd >/dev/null