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

Unified Diff: cros_run_unit_tests

Issue 5281001: Ignore packages that cannot be found for the target. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Add logic 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 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: cros_run_unit_tests
diff --git a/cros_run_unit_tests b/cros_run_unit_tests
index 22461751766d24e935b06ff8e7dada0b6e4664f2..220ad97d23867c5fb535826af113a5369e3bf8d4 100755
--- a/cros_run_unit_tests
+++ b/cros_run_unit_tests
@@ -58,7 +58,14 @@ set -e
[ -z "${FLAGS_board}" ] && die "--board required"
# Create package list from package file and list of packages.
-[ -n "${FLAGS_package_file}" ] && PACKAGE_LIST="$(cat ${FLAGS_package_file})"
+if [ -n "${FLAGS_package_file}" ]; then
+ if [ -f "${FLAGS_package_file}" ]; then
+ PACKAGE_LIST="$(cat ${FLAGS_package_file})"
+ else
+ warn "Missing package file."
+ fi
+fi
+
[ -n "${FLAGS_packages}" ] && PACKAGE_LIST="${PACKAGE_LIST} ${FLAGS_packages}"
# If we didn't specify packages, find all packages.
@@ -74,7 +81,8 @@ for package in ${PACKAGE_LIST}; do
warn "Skipping package ${package} since it is blacklisted."
continue
fi
- EBUILD_PATH=$( equery-${FLAGS_board} which ${package} 2> /dev/null )
+ EBUILD_PATH=$( equery-${FLAGS_board} which ${package} 2> /dev/null ) || \
+ warn "${package} not found"
if [ -n "${EBUILD_PATH}" ]; then
if check_src_test "${EBUILD_PATH}"; then
run_unit_test "${EBUILD_PATH}" || record_test_failure "${package}"
« 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