If qualified components not specified, use the one based on board name.

Review URL: http://codereview.chromium.org/2965013
This commit is contained in:
Tom Wai-Hong Tam 2010-07-19 00:22:42 +08:00
parent 47d039a48c
commit ab3682d570
2 changed files with 7 additions and 18 deletions

View File

@ -4,22 +4,12 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
# Assume that we run HWQual test before and generate the system component file. TEST_DIR="${ROOT_FS_DIR}/usr/local/autotest/site_tests/hardware_Components"
# The file is placed in (XXXX is a random number): COMPONENTS_FILE="${TEST_DIR}/qualified_components"
# /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.*.
COMPONENTS_FILE="${ROOT_FS_DIR}/usr/local/autotest/site_tests/"\ # If QUALDB not specified, use the one based on board name.
"hardware_Components/qualified_components" if [ -z ${QUALDB} ]; then
QUALDB="${TEST_DIR}/qualified_components_${BOARD}"
# 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"
fi fi
if [ ! -z ${QUALDB} ] && [ -f ${QUALDB} ]; then if [ ! -z ${QUALDB} ] && [ -f ${QUALDB} ]; then

View File

@ -28,8 +28,7 @@ DEFINE_boolean installmask $FLAGS_TRUE \
"Use INSTALL_MASK to shrink the resulting image." m "Use INSTALL_MASK to shrink the resulting image." m
DEFINE_integer jobs -1 \ DEFINE_integer jobs -1 \
"How many packages to build in parallel at maximum." j "How many packages to build in parallel at maximum." j
DEFINE_string qualdb "/tmp/run_remote_tests.*" \ DEFINE_string qualdb "" "Location of qualified component file" d
"Location of qualified component file" d
DEFINE_boolean yes $FLAGS_FALSE "Answer yes to all prompts" y DEFINE_boolean yes $FLAGS_FALSE "Answer yes to all prompts" y
DEFINE_string build_root "/build" \ DEFINE_string build_root "/build" \
"The root location for board sysroots." "The root location for board sysroots."
@ -193,7 +192,7 @@ else
MOD_FACTORY_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_factory_scripts" MOD_FACTORY_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_factory_scripts"
# Run factory setup script to modify the image # Run factory setup script to modify the image
sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \ 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" "${MOD_FACTORY_ROOT}/factory_setup.sh"
fi fi
fi fi