summaryrefslogtreecommitdiff
path: root/libs.mk
diff options
context:
space:
mode:
authorTom Finegan <tomfinegan@google.com>2014-05-20 15:48:04 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-05-20 15:48:04 -0700
commitca5d96315e39cd86aff7474bf1105761268e2fbd (patch)
tree0ab4d8f3c53c8ad05398853ace6067cb6c772ace /libs.mk
parent2823b295df4a95dc7ebf3e49c9b0a6fac97efe92 (diff)
parentbc27d7e96704251272ff68b1ceae1070ec9efeb3 (diff)
downloadlibvpx-ca5d96315e39cd86aff7474bf1105761268e2fbd.tar
libvpx-ca5d96315e39cd86aff7474bf1105761268e2fbd.tar.gz
libvpx-ca5d96315e39cd86aff7474bf1105761268e2fbd.tar.bz2
libvpx-ca5d96315e39cd86aff7474bf1105761268e2fbd.zip
Merge "Add make target for running example tests."
Diffstat (limited to 'libs.mk')
-rw-r--r--libs.mk23
1 files changed, 23 insertions, 0 deletions
diff --git a/libs.mk b/libs.mk
index 11bdf9095..d02e9bcac 100644
--- a/libs.mk
+++ b/libs.mk
@@ -556,3 +556,26 @@ else
utiltest:
@echo Unit tests must be enabled to make the utiltest target.
endif
+
+##
+## Example tests.
+##
+ifeq ($(CONFIG_UNIT_TESTS),yes)
+# All non-MSVC targets output example targets in a sub dir named examples.
+EXAMPLES_BIN_PATH = examples
+ifeq ($(CONFIG_MSVS),yes)
+# MSVC will build both Debug and Release configurations of the examples in a
+# sub directory named for the current target. Assume the user wants to
+# run the Release tools, and assign EXAMPLES_BIN_PATH accordingly.
+# TODO(tomfinegan): Is this adequate for ARM?
+# TODO(tomfinegan): Support running the debug versions of tools?
+EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release
+endif
+exampletest: examples testdata
+ $(qexec)$(SRC_PATH_BARE)/test/examples.sh \
+ --test-data-path $(LIBVPX_TEST_DATA_PATH) \
+ --bin-path $(EXAMPLES_BIN_PATH)
+else
+exampletest:
+ @echo Unit tests must be enabled to make the exampletest target.
+endif