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

Unified Diff: src/scripts/build_tests.sh

Issue 614005: Adds changes to unittest scripts to use ebuild if board is specified (Closed)
Patch Set: Fix quotes Created 10 years, 10 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
« no previous file with comments | « src/platform/window_manager/make_tests.sh ('k') | src/scripts/run_tests.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/build_tests.sh
diff --git a/src/scripts/build_tests.sh b/src/scripts/build_tests.sh
index a057b60e673060a3c96fb370a1bf92004a9574f2..895c5e572f8d8242eba3dd9c52781b17d5c5e1a6 100755
--- a/src/scripts/build_tests.sh
+++ b/src/scripts/build_tests.sh
@@ -12,6 +12,9 @@ assert_inside_chroot
assert_not_root_user
# Flags
+DEFINE_string build_root "$DEFAULT_BUILD_ROOT" \
+ "Root of build output"
+DEFINE_string board "" "Target board for which tests are to be built"
# Parse command line
FLAGS "$@" || exit 1
@@ -20,16 +23,23 @@ eval set -- "${FLAGS_ARGV}"
# Die on error; print commands
set -e
-PLATFORM_DIR="$SRC_ROOT/platform"
-PLATFORM_DIRS="pam_google window_manager cryptohome"
-
-# Build tests
-for i in $PLATFORM_DIRS
-do
- echo "building $PLATFORM_DIR/$i"
- cd "$PLATFORM_DIR/$i"
- ./make_tests.sh
- cd -
-done
-
-echo "All tests built."
+TEST_DIRS="pam_google window_manager cryptohome"
+
+if [ -n "$FLAGS_board" ]
+then
+ sudo TEST_DIRS="${TEST_DIRS}" \
+ emerge-${FLAGS_board} chromeos-base/chromeos-unittests
+else
+ PLATFORM_DIR="$SRC_ROOT/platform"
+
+ # Build tests
+ for i in ${TEST_DIRS}
+ do
+ echo "building $PLATFORM_DIR/$i"
+ cd "$PLATFORM_DIR/$i"
+ OUT_DIR="${FLAGS_build_root}/x86/tests" ./make_tests.sh
+ cd -
+ done
+
+ echo "All tests built."
+fi
« no previous file with comments | « src/platform/window_manager/make_tests.sh ('k') | src/scripts/run_tests.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698