From 3c46d4730428b7f503d3d9df9c1d465ab22848fa Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Fri, 17 Apr 2015 12:42:37 -0700 Subject: 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] --- .gitignore | 1 + configure.ac | 2 ++ test/Makefile.am.inc | 7 ++++++- 3 files changed, 9 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3