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

Unified Diff: cros_run_unit_tests

Issue 5124006: Add ability for cbuildbot to only run unit tests for revved packages. (Closed) Base URL: http://git.chromium.org/git/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cros_mark_as_stable.py ('k') | 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 169edde582b7549b3e304ca4caddd2a0b5c0804c..22461751766d24e935b06ff8e7dada0b6e4664f2 100755
--- a/cros_run_unit_tests
+++ b/cros_run_unit_tests
@@ -19,6 +19,8 @@ DEFINE_string board "${DEFAULT_BOARD}" \
"Target board of which tests were built"
DEFINE_string build_root "${DEFAULT_BUILD_ROOT}" \
"Root of build output"
+DEFINE_string package_file "" \
+ "File with space-separated list of packages to run unit tests" f
DEFINE_string packages "" \
"Optional space-separated list of packages to run unit tests" p
@@ -55,11 +57,12 @@ set -e
[ -z "${FLAGS_board}" ] && die "--board required"
-# If no packages are specified we run all unit tests for chromeos-base
-# packages.
-if [ -n "${FLAGS_packages}" ]; then
- PACKAGE_LIST="${FLAGS_packages}"
-else
+# Create package list from package file and list of packages.
+[ -n "${FLAGS_package_file}" ] && PACKAGE_LIST="$(cat ${FLAGS_package_file})"
+[ -n "${FLAGS_packages}" ] && PACKAGE_LIST="${PACKAGE_LIST} ${FLAGS_packages}"
+
+# If we didn't specify packages, find all packages.
+if [ -z "${FLAGS_package_file}" -a -z "${FLAGS_packages}" ]; then
petkov 2010/11/22 20:05:23 can't you just -z "${PACKAGE_LIST}" here?
PACKAGE_LIST=$( ./get_package_list chromeos --board="${FLAGS_board}" |
egrep '^chromeos-base' )
fi
« no previous file with comments | « cros_mark_as_stable.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698