Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Unified Diff: mod_for_factory_scripts/500copyQualDb

Issue 3032036: Handle Qual DBs based on default board name. (Closed) Base URL: ssh://gitrw.chromium.org/crosutils.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mod_for_factory_scripts/500copyQualDb
diff --git a/mod_for_factory_scripts/500copyQualDb b/mod_for_factory_scripts/500copyQualDb
index cb89b3db71ab952b3f2e54f4568bdafdccca5a03..778d8dc600a3cbf5de2d722fb299ba33536f1a5d 100755
--- a/mod_for_factory_scripts/500copyQualDb
+++ b/mod_for_factory_scripts/500copyQualDb
@@ -6,15 +6,24 @@
TEST_DIR="${ROOT_FS_DIR}/usr/local/autotest/site_tests/hardware_Components"
-# If QUALDB not specified, use the one based on board name.
-if [ -z ${QUALDB} ]; then
- QUALDB="${TEST_DIR}/qualified_components_${BOARD}*"
-fi
+pushd ${TEST_DIR} 1> /dev/null
-if [ ! -z ${QUALDB} ] && [ -f ${QUALDB} ]; then
- # Copy the qualified component file to the image
+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 | head -1)
+ if [ ! -z ${FIRST_QUALDB} ]; then
+ # Remove qualified components belonging to other boards
+ ls qualified_components* | 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}/
-else
- echo "No qualified component file found at: ${QUALDB}"
fi
+
+popd 1> /dev/null
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698