discovery(mojo): add apptest.
MultiPart: 1/2
Change-Id: I789a0f673872cb68ebd4eceb312be9c9658e2d9f
diff --git a/mojo.mk b/mojo.mk
index e6b7b27..3ba82f3 100644
--- a/mojo.mk
+++ b/mojo.mk
@@ -54,20 +54,6 @@
# process.
MOJO_SHELL_FLAGS := -v --enable-multiprocess
-# Compiles a Go program and links against the Mojo C library.
-# $1 is input filename.
-# $2 is output filename.
-define MOGO_BUILD
- mkdir -p $(dir $2)
- jiri go -profiles=$(MOJO_PROFILE),base -target=$(TARGET) build -o $2 -tags="mojo include_mojo_cgo" -ldflags="$(LDFLAGS)" -buildmode=c-shared $1
-endef
-
-# Runs Go tests with mojo libraries
-# $1 is input package pattern
-define MOGO_TEST
- jiri go -profiles=$(MOJO_PROFILE),base test $1
-endef
-
# Generates go bindings from .mojom file.
# $1 is input filename.
# $2 is root directory containing mojom files.
@@ -79,6 +65,20 @@
$(MOJO_SDK)/src/mojo/public/tools/bindings/mojom_bindings_generator.py $1 -I $2 -d $2 -o $3 -g $4 $5
endef
+# Compiles a Go program and links against the Mojo C library.
+# $1 is input filename.
+# $2 is output filename.
+define MOGO_BUILD
+ mkdir -p $(dir $2)
+ jiri go -profiles=$(MOJO_PROFILE),base -target=$(TARGET) build -o $2 -tags="mojo include_mojo_cgo" -ldflags="$(LDFLAGS)" -buildmode=c-shared $1
+endef
+
+# Runs Go tests with mojo libraries.
+# $1 is input package pattern
+define MOGO_TEST
+ jiri go -profiles=$(MOJO_PROFILE),base test $1
+endef
+
# On Linux we need to use a different $HOME directory for each mojo run
# to avoid collision of the cache storage.
define MOJO_RUN
@@ -86,6 +86,12 @@
$(MOJO_DEVTOOLS)/mojo_run --config-file $(CURDIR)/mojoconfig --shell-path $(MOJO_SHELL) $(MOJO_SHELL_FLAGS) $(MOJO_ANDROID_FLAGS) $1
endef
+# Runs mojo app tests.
+# $1 is apptest list filename.
+define MOJO_APPTEST
+ $(MOJO_DEVTOOLS)/mojo_test --config-file $(CURDIR)/mojoconfig --shell-path $(MOJO_SHELL) $(MOJO_SHELL_FLAGS) $(MOJO_ANDROID_FLAGS) $1
+endef
+
.PHONY: mojo-env-check
mojo-env-check:
ifndef JIRI_ROOT