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

Unified Diff: src/scripts/mod_for_factory_scripts/500copyQualDb

Issue 1755012: Make modify-image-for-factory scripts more readable. (Closed) Base URL: ssh://git@chromiumos-git/chromiumos
Patch Set: Fix comments Created 10 years, 8 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
Index: src/scripts/mod_for_factory_scripts/500copyQualDb
diff --git a/src/scripts/mod_for_factory_scripts/500copyQualDb b/src/scripts/mod_for_factory_scripts/500copyQualDb
new file mode 100755
index 0000000000000000000000000000000000000000..b6977ba602883ed788a7e2dcb92fd6eef6086546
--- /dev/null
+++ b/src/scripts/mod_for_factory_scripts/500copyQualDb
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# 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.*.
+
+# 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
+
+if [ ! -z ${QUALDB} ] && [ -f ${QUALDB} ]; then
+ # Copy the qualified component file to the image
+ echo "Copying ${QUALDB} to the image."
+ mkdir -p ${ROOT_FS_DIR}/usr/local/manufacturing
+ cp -f ${QUALDB} \
+ ${ROOT_FS_DIR}/usr/local/manufacturing/qualified_components
+else
+ echo "No qualified component file found at: ${QUALDB}"
+fi
« no previous file with comments | « src/scripts/mod_for_factory_scripts/300modifyDescription ('k') | src/scripts/mod_for_factory_scripts/factory.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698