From ab3682d5709993daf10c3d0610af068d3dd5e256 Mon Sep 17 00:00:00 2001 From: Tom Wai-Hong Tam Date: Mon, 19 Jul 2010 00:22:42 +0800 Subject: [PATCH] If qualified components not specified, use the one based on board name. Review URL: http://codereview.chromium.org/2965013 --- mod_for_factory_scripts/500copyQualDb | 20 +++++--------------- mod_image_for_test.sh | 5 ++--- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/mod_for_factory_scripts/500copyQualDb b/mod_for_factory_scripts/500copyQualDb index cf734e0f59..9f48039191 100755 --- a/mod_for_factory_scripts/500copyQualDb +++ b/mod_for_factory_scripts/500copyQualDb @@ -4,22 +4,12 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# Assume that we run HWQual test before and generate the system component file. -# The file is placed in (XXXX is a random number): -# /tmp/run_remote_tests.XXXX/hardware_Components/results/system_components -# -# QUALDB can be a full path of the file, or a specified directory -# /tmp/run_remote_tests.XXXX, or a default wildcard one /tmp/run_remote_tests.*. +TEST_DIR="${ROOT_FS_DIR}/usr/local/autotest/site_tests/hardware_Components" +COMPONENTS_FILE="${TEST_DIR}/qualified_components" -COMPONENTS_FILE="${ROOT_FS_DIR}/usr/local/autotest/site_tests/"\ -"hardware_Components/qualified_components" - -# If QUALDB is a default wildcard directory, try to use the most recent one. -QUALDB=$(ls -dt ${QUALDB} 2>&-| head -1) - -# Try to append the full path to the file if QUALDB is a directory. -if [ ! -z ${QUALDB} ] && [ -d ${QUALDB} ]; then - QUALDB="${QUALDB}/hardware_Components/results/system_components" +# If QUALDB not specified, use the one based on board name. +if [ -z ${QUALDB} ]; then + QUALDB="${TEST_DIR}/qualified_components_${BOARD}" fi if [ ! -z ${QUALDB} ] && [ -f ${QUALDB} ]; then diff --git a/mod_image_for_test.sh b/mod_image_for_test.sh index 1ea312126b..dba4b84d03 100755 --- a/mod_image_for_test.sh +++ b/mod_image_for_test.sh @@ -28,8 +28,7 @@ DEFINE_boolean installmask $FLAGS_TRUE \ "Use INSTALL_MASK to shrink the resulting image." m DEFINE_integer jobs -1 \ "How many packages to build in parallel at maximum." j -DEFINE_string qualdb "/tmp/run_remote_tests.*" \ - "Location of qualified component file" d +DEFINE_string qualdb "" "Location of qualified component file" d DEFINE_boolean yes $FLAGS_FALSE "Answer yes to all prompts" y DEFINE_string build_root "/build" \ "The root location for board sysroots." @@ -193,7 +192,7 @@ else MOD_FACTORY_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_factory_scripts" # Run factory setup script to modify the image sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \ - QUALDB="${FLAGS_qualdb}" \ + QUALDB="${FLAGS_qualdb}" BOARD=${FLAGS_board} \ "${MOD_FACTORY_ROOT}/factory_setup.sh" fi fi