diff options
author | Philip Chimento <philip.chimento@gmail.com> | 2016-12-17 23:06:40 -0800 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2016-12-17 23:33:11 -0800 |
commit | 474fc79eb11aeb6f9cdad62c8c6129978cfa322a (patch) | |
tree | fd77adb4d0bf949039cc07370c2a85dcbc6cb951 | |
parent | 5e3694acef84834e25d1100344a36ee9637b094e (diff) | |
download | gjs-wip/ptomato/tests.tar.gz |
tests: Run testCommandLine.sh installedwip/ptomato/tests
This file can be run just as well as an installed test, so we install it
to the correct directory and add a .test file.
The script now checks for GJS_USE_UNINSTALLED_FILES and tests the
uninstalled copy of gjs-console if it is set to 1.
https://bugzilla.gnome.org/show_bug.cgi?id=775444
-rw-r--r-- | Makefile-insttest.am | 8 | ||||
-rw-r--r-- | Makefile-test.am | 2 | ||||
-rw-r--r-- | installed-tests/script.test.in | 1 | ||||
-rwxr-xr-x | installed-tests/scripts/testCommandLine.sh (renamed from test/testCommandLine.sh) | 6 |
4 files changed, 13 insertions, 4 deletions
diff --git a/Makefile-insttest.am b/Makefile-insttest.am index 4e56bb36..1b1b5c56 100644 --- a/Makefile-insttest.am +++ b/Makefile-insttest.am @@ -20,8 +20,12 @@ if BUILDOPT_INSTALL_TESTS gjsinsttest_PROGRAMS += minijasmine gjsinsttest_DATA += $(TEST_INTROSPECTION_TYPELIBS) -installedtestmeta_DATA += $(jasmine_tests:.js=.test) +installedtestmeta_DATA += \ + $(jasmine_tests:.js=.test) \ + $(simple_tests:%=%.test) \ + $(NULL) jstests_DATA += $(jasmine_tests) +jsscripttests_DATA += $(simple_tests) pkglib_LTLIBRARIES += libregress.la libwarnlib.la libgimarshallingtests.la %.test: %.js installed-tests/minijasmine.test.in Makefile @@ -31,7 +35,7 @@ pkglib_LTLIBRARIES += libregress.la libwarnlib.la libgimarshallingtests.la < $(srcdir)/installed-tests/minijasmine.test.in > $@.tmp && \ mv $@.tmp $@ -%.test: installed-tests/scripts/%.js installed-tests/script.test.in Makefile +%.test: % installed-tests/script.test.in Makefile $(AM_V_GEN)$(MKDIR_P) $(@D) && \ $(SED) -e s,@pkglibexecdir\@,$(pkglibexecdir), \ -e s,@name\@,$(notdir $<), \ diff --git a/Makefile-test.am b/Makefile-test.am index 4404f822..b9ac608c 100644 --- a/Makefile-test.am +++ b/Makefile-test.am @@ -276,7 +276,7 @@ AM_TESTS_ENVIRONMENT = \ $(XVFB_START) \ $(NULL) -simple_tests = test/testCommandLine.sh +simple_tests = installed-tests/scripts/testCommandLine.sh EXTRA_DIST += $(simple_tests) TESTS = \ diff --git a/installed-tests/script.test.in b/installed-tests/script.test.in index 7fa8a99f..02f05831 100644 --- a/installed-tests/script.test.in +++ b/installed-tests/script.test.in @@ -1,3 +1,4 @@ [Test] Type=session Exec=gjs @pkglibexecdir@/installed-tests/scripts/@name@ +Output=TAP diff --git a/test/testCommandLine.sh b/installed-tests/scripts/testCommandLine.sh index ad4df6b2..c9299ab6 100755 --- a/test/testCommandLine.sh +++ b/installed-tests/scripts/testCommandLine.sh @@ -1,6 +1,10 @@ #!/bin/sh -gjs="$TOP_BUILDDIR"/gjs-console +if test $GJS_USE_UNINSTALLED_FILES -eq 1; then + gjs="$TOP_BUILDDIR"/gjs-console +else + gjs=gjs-console +fi # this JS script fails if either 1) --help is not passed to it, or 2) the string # "sentinel" is not in its search path |