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

Unified Diff: src/scripts/build_tests.sh

Issue 668015: Make --board mandatory in build_tests.sh. Also enable building with a default board. (Closed)
Patch Set: 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 | « no previous file | no next file » | 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 895c5e572f8d8242eba3dd9c52781b17d5c5e1a6..2e4e403d6326614a428eb80dca91070ba1a63829 100755
--- a/src/scripts/build_tests.sh
+++ b/src/scripts/build_tests.sh
@@ -10,36 +10,27 @@
assert_inside_chroot
assert_not_root_user
+get_default_board
# Flags
DEFINE_string build_root "$DEFAULT_BUILD_ROOT" \
"Root of build output"
-DEFINE_string board "" "Target board for which tests are to be built"
+DEFINE_string board "$DEFAULT_BOARD" \
+ "Target board for which tests are to be built"
# Parse command line
FLAGS "$@" || exit 1
eval set -- "${FLAGS_ARGV}"
+if [ -z "$FLAGS_board" ]; then
kmixter1 2010/03/04 00:23:15 nit: consistent use of "${var}" style
+ echo Error: --board required
+ exit 1
+fi
+
# Die on error; print commands
set -e
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
+sudo TEST_DIRS="${TEST_DIRS}" \
+ emerge-${FLAGS_board} chromeos-base/chromeos-unittests
« 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