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

Side by Side Diff: mod_for_factory_scripts/500populateQualDbs

Issue 5168001: cros_utils: refine factory and imaging related scripts (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Created 10 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 TEST_DIR="${ROOT_FS_DIR}/usr/local/autotest/site_tests/hardware_Components" 7 TEST_DIR="${ROOT_FS_DIR}/usr/local/autotest/site_tests/hardware_Components"
8 8
9 pushd ${TEST_DIR} 1> /dev/null 9 pushd "${TEST_DIR}" >/dev/null
Nick Sanders 2010/11/18 05:12:08 Can you check for existence of dir
Hung-Te 2010/11/18 05:49:31 Just saw you've created another refine for that -
10 10
Nick Sanders 2010/11/18 05:12:08 Can you also clean 600xxx in mod_for_factory
Hung-Te 2010/11/18 05:49:31 Added in latest CL.
11 # Remove the DB directories belonging to other boards. 11 # Remove the DB directories belonging to other boards.
12 KEEPDB="data_${BOARD}" 12 KEEPDB="data_${BOARD}"
13 ls -d data_* 2> /dev/null | grep -v ${KEEPDB} | xargs rm -fr 13 ls -d data_* 2>/dev/null | grep -v "${KEEPDB}" | xargs rm -fr
14 14
15 # Ensure there is DB directory in x86-agz and x86-mario. 15 # Ensure there is DB directory in authorized list
16 if [ ! -d ${KEEPDB} -a \ 16 case "${BOARD}" in
17 \( "${BOARD}" = "x86-agz" -o "${BOARD}" = "x86-mario" \) ]; then 17 x86-agz | x86-mario )
18 echo "No component DB directory found at: ${KEEPDB}" 18 if [ ! -d "${KEEPDB}" ]; then
19 fi 19 echo "No component DB directory found at: ${KEEPDB}"
20 # TODO(hungte) should we exit as failure when the DB is missing?
21 fi
22 ;;
20 23
21 popd 1> /dev/null 24 * )
25 # No need to check for unknown boards
26 true
27 ;;
28 esac
29
30 popd >/dev/null
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698