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

Unified Diff: mojo/tools/mojob.sh

Issue 674383002: Initial work on Dart bindings for Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Merge. Work on templates. Created 6 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 | « mojo/tools/dart_test_runner.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/mojob.sh
diff --git a/mojo/tools/mojob.sh b/mojo/tools/mojob.sh
index fac2fbe9de4e516ae20da376569a489d49c504f4..591542ac214c7567d0886d72d9e648ca7f22f69f 100755
--- a/mojo/tools/mojob.sh
+++ b/mojo/tools/mojob.sh
@@ -32,6 +32,7 @@ option (which will only apply to commands which follow) should be one of:
--clang / --gcc - Use clang (default) / gcc.
--goma / --no-goma - Use goma (if \$GOMA_DIR is set or \$HOME/goma exists;
default) / don't use goma.
+ --with-dart - Configure the Dart bindings.
Note: It will abort on the first failure (if any).
EOF
@@ -94,6 +95,11 @@ do_skytests() {
fi
}
+do_darttests() {
+ echo "Running dart tests in out/$1 ..."
+ dart mojo/tools/dart_test_runner.dart out/$1/gen || exit 1
+}
+
do_gn() {
local gn_args="$(make_gn_args $1)"
local out_dir="$(get_outdir $1)"
@@ -113,6 +119,8 @@ COMPILER=clang
TARGET=linux
# Valid values: auto or disabled.
GOMA=auto
+# Whether the Dart bindings should be built.
+DART=disabled
make_gn_args() {
local args=()
# TODO(vtl): It's a bit of a hack to infer the build type from the output
@@ -148,6 +156,11 @@ make_gn_args() {
args+=("use_goma=false")
;;
esac
+ case "$DART" in
+ enabled)
+ args+=("mojo_use_dart=true")
+ ;;
+ esac
case "$TARGET" in
android)
args+=("os=\"android\"" "cpu_arch=\"arm\"")
@@ -189,6 +202,9 @@ for arg in "$@"; do
pytest)
do_pytests "$BUILD_TYPE"
;;
+ darttest)
+ do_darttests "$BUILD_TYPE"
+ ;;
gn)
do_gn "$BUILD_TYPE"
;;
@@ -223,6 +239,9 @@ for arg in "$@"; do
--no-goma)
GOMA=disabled
;;
+ --with-dart)
+ DART=enabled
+ ;;
--android)
TARGET=android
COMPILER=gcc
« no previous file with comments | « mojo/tools/dart_test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698