Skip to content
Browse files

Added test/runner to run individual test cases

The check/test/test-suite make targets can still be used, but this at least
allows running specific test cases from the command line, which is extremely
useful during development.
  • Loading branch information...
1 parent ff07b4f commit 9a3a71bc33f330d28d3297dc2291fb9047b0fa9e @mikegerwitz committed Feb 14, 2014
Showing with 28 additions and 4 deletions.
  1. +1 −0 .gitignore
  2. +2 −3 Makefile.am
  3. +3 −1 configure.ac
  4. +22 −0 test/runner.in
View
1 .gitignore
@@ -9,6 +9,7 @@ NEWS
ChangeLog
# autotools- and configure-generated
+test/runner
aclocal.m4
Makefile.in
Makefile
View
5 Makefile.am
@@ -34,7 +34,7 @@ path_combine_output_full_min = $(path_combine_output_full:.js=.min.js)
src_js = @SRC_JS@
path_externs_internal = $(path_build)/externs-internal.js
-test_cases=$(shell find test/ -name '*Test.*' | tr '\n' ' ' )
+test_cases=$(shell cd test/ && find . -name '*Test.*' | tr '\n' ' ' )
src_tests=$(shell find test/ -name test-* | tr '\n' ' ' )
combine = $(path_tools)/combine
@@ -130,8 +130,7 @@ test-suite:
if HAS_NODE
@echo "GNU ease.js Test Suite"
@echo
- @NODE_PATH="$(path_test):.:$(NODE_PATH)" $(NODE) --stack_trace_limit=20 \
- $(path_test)/runner.js $(test_cases)
+ @(cd $(path_test) && ./runner $(test_cases))
else
@echo "Node.js must be installed in order to run the test suite"
@exit 1
View
4 configure.ac
@@ -87,5 +87,7 @@ PERF_TESTS=$( find test/perf -name 'perf-*.js' | tr '\n' ' ' )
AC_SUBST(PERF_TESTS)
AS_IF([test "$PERF_TESTS"], [AC_MSG_RESULT(ok)], [AC_MSG_WARN(none found)])
-AC_CONFIG_FILES([Makefile doc/Makefile package.json lib/version.js])
+AC_CONFIG_FILES(
+ [Makefile doc/Makefile package.json lib/version.js test/runner],
+ [chmod +x test/runner])
AC_OUTPUT
View
22 test/runner.in
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# Copyright (C) 2014 Mike Gerwitz
+#
+# This file is part of GNU ease.js.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# #
+
+NODE_PATH=".:$NODE_PATH" @NODE@ --stack-trace-limit=20 \
+ ./runner.js "$@"

0 comments on commit 9a3a71b

Please sign in to comment.
Something went wrong with that request. Please try again.