diff --git a/.gitignore b/.gitignore index 8faec7f..f0d5048 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ NEWS ChangeLog # autotools- and configure-generated +test/runner aclocal.m4 Makefile.in Makefile diff --git a/Makefile.am b/Makefile.am index bda077c..e5cc945 100644 --- a/Makefile.am +++ b/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 diff --git a/configure.ac b/configure.ac index 97db749..a5236a5 100644 --- a/configure.ac +++ b/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 diff --git a/test/runner.in b/test/runner.in new file mode 100644 index 0000000..2ee3396 --- /dev/null +++ b/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 . +# # + +NODE_PATH=".:$NODE_PATH" @NODE@ --stack-trace-limit=20 \ + ./runner.js "$@"