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 |