summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Chimento <philip@endlessm.com>2015-04-17 12:42:37 -0700
committerPhilip Chimento <philip@endlessm.com>2015-04-17 12:44:43 -0700
commit3c46d4730428b7f503d3d9df9c1d465ab22848fa (patch)
tree8534b7f3c064a8541bea08cb24919aa3cb736e3a
parent9910f0c3752b5e5150299cbedf0277bbee08a82c (diff)
Integrate Jasmine with Automake
This runs the tests during "make check" using jasmine-gjs, and outputs results in the TAP format that Automake understands. [endlessm/eos-sdk#3054]
-rw-r--r--.gitignore1
-rw-r--r--configure.ac2
-rw-r--r--test/Makefile.am.inc7
3 files changed, 9 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index bf152f8..525f885 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,6 +44,7 @@ stamp*
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/serial-tests.m4
+/tap-driver.sh
/test-driver
.dirstamp
diff --git a/configure.ac b/configure.ac
index df1519a..4f6fe4e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,6 +114,8 @@ GTK_DOC_CHECK([1.18], [--flavour no-tmpl])
# GObject Introspection
GOBJECT_INTROSPECTION_REQUIRE([1.30])
# Various tools
+AC_PROG_AWK # needed for TAP driver
+AC_REQUIRE_AUX_FILE([tap-driver.sh])
AC_PATH_PROG([GIRDOCTOOL], [g-ir-doc-tool], [notfound])
AC_ARG_VAR([GIRDOCTOOL], [Path to g-ir-doc-tool])
AC_PATH_PROG([YELPBUILD], [yelp-build], [notfound])
diff --git a/test/Makefile.am.inc b/test/Makefile.am.inc
index 1146eb7..7244a85 100644
--- a/test/Makefile.am.inc
+++ b/test/Makefile.am.inc
@@ -27,10 +27,15 @@ TESTS = \
test/endless/run-tests \
$(javascript_tests) \
$(NULL)
-TEST_EXTENSIONS =
+JS_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/tap-driver.sh
+JS_LOG_DRIVER_FLAGS = --comments
+TEST_EXTENSIONS = .js
+JS_LOG_COMPILER = jasmine
AM_JS_LOG_FLAGS = \
--include-path=$(top_srcdir)/webhelper \
--include-path=$(top_srcdir) \
+ --tap \
+ --no-config \
$(NULL)
LOG_COMPILER = gtester
AM_LOG_FLAGS = -k --verbose