summaryrefslogtreecommitdiff
path: root/t/vala-headers.sh
Commit message (Collapse)AuthorAgeFilesLines
* tests: remove exec bit from all of them ('micro' branch)Stefano Lattarini2013-05-161-0/+0
| | | | | | | | | | | | | | | | | | It gives the impression that they are directly runnable, as with "./t/foo.sh", but it has been a while since that was the case. Today, tests are runnable only through "make check" or "./runtest". This change is for the 'micro' branch (automake 1.13.2a). It will soon be followed by similar patches for the 'maint' branch (automake 1.13a) and the 'master' branch (automake 1.99a). * t/*.sh, t/*.tap: Remove executable bit. * maint.mk (sc_tests_executable): Remove. (syntax_check_rules): Adjust. * gen-testsuite-part: Set permissions of generated tests to '444' (-r--r--r--), rather than 555 (-r-xr-xr-x). Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* maint: update copyright year for 2013 (in branch maint)Stefano Lattarini2012-12-311-1/+1
| | | | Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* tests: improve 'pkg-config' requirementStefano Lattarini2012-12-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves (and unifies among different tests) the detection of both the 'pkg-config' program and m4 macros provided by it; they are needed in particular by tests on Vala support. Before this, some Vala-related tests were failing spuriously when the pkg-config program was available but the macros from pkg.m4 were not made explicitly available in ACLOCAL_PATH. These tests were: vala-mix vala-mix2 vala-parallel vala-vapi vala-vpath See also similar commit 'v1.11-581-gb7d67d5' of 2011-12-22, "tests: better handling of gettext and libtool requirements". * t/ax/am-test-lib.sh (process_requirements): If a requirement matches the 'pkg-config*' wildcard, try to make available to it the pkg-config m4 macros, and skip it if it's not possible. This is done by sourcing the 'get.sh' fragment generated by ... * t/pkg-config-macros.sh: ... this new test, which looks in advance for the 'pkg-config' program and the m4 macros that comes with it. * t/list-of-tests.mk: Add the new test. * gen-testsuite-part (%deps_extractor): Tests requiring pkg-config will need the m4 macros coming with it; so these tests should be run after the 'pkg-config-macros.sh' test. Automatically generate proper declarations for such dependencies. * t/vala-header.sh: No need to explicitly check that the macro PKG_CHECK_MODULES has been expanded by autoconf. * t/vala-libs.sh: Likewise. * t/vala-non-recursive-setup.sh: Likewise. * t/vala-per-target-flags.sh: Likewise. * t/vala-recursive-setup.sh: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* vala tests: source test-init.sh, not ./defsStefano Lattarini2012-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | This will avoid spurious errors when the new vala tests (introduced in the 'vala-work' branch) will be merged back to master. * t/vala-headers.sh: Adjust as said. * t/vala-libs.sh: Likewise. * t/vala-mix.sh: Likewise. * t/vala-mix2.sh: Likewise. * t/vala-parallel.sh: Likewise. * t/vala-vapi.sh: Likewise. * t/vala-vpath.sh: Likewise. * t/vala.sh: Likewise. * t/vala2.sh: Likewise. * t/vala3.sh: Likewise. * t/vala4.sh: Likewise. * t/vala5.sh: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* tests: prefer "test ! -e FILE" to check that a file doesn't existStefano Lattarini2012-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Once, for the sake of (at least) Solaris 10 /bin/sh, we had to use "test ! -f FILE" or "test ! -r FILE" or "test ! -d FILE" instead, because the that shell's 'test' built-in didn't grok the '-e' option. Note however that we still can't use "test ! -e" in the Makefile recipes used in the test cases; that is because those recipes are run with the shell detected by 'configure', and Autoconf-generated configure scripts do no guarantee to find or provide a POSIX-compatible shell. * Several tests: Adjust. * t/yacc-clean-cxx: Adjust, and remove a couple of useless commands. * t/parallel-tests-dry-run-2.sh: Adjust, and add invocation to "make -n" forgotten in previous versions of the test. * t/txinfo26.sh: Adjust, and don't bother to skip the test when it's run in a directory whose absolute path contain whitespace: that setup is not supported anyway. * t/maken3.sh: Adjust, and fix a typo that could cause a minor false negative. * t/test-trs-recover2.sh: Prefer using 'skip_' with a suitable error message over a bare 'exit 77'. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* tests: simpler workaround for shells losing the exit status in exit trapStefano Lattarini2012-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we can assume our tests are run by a decent POSIX shell, we can simplify our workaround aimed at having the exit status propagated correctly to the code in the exit trap. Unfortunately, we cannot dispense with such a workaround altogether, because it's still required by some shells we need to support (at least Solaris 10 /bin/ksh and /usr/xpg4/bin/sh). For more information about the need of that workaround, see the entry about 'trap' in the section "Limitations of Shell Builtins" in the Autoconf manual: <http://www.gnu.org/software/autoconf/manual/autoconf.html#trap> The new workaround has been tested successfully with the following shells: - Bash 4.1 - Bash 3.2 - Bash 3.0 - Bash 2.05b - dash 0.5.5.1 - dash 0.5.2 - AT&T Ksh 93u (from official Debian package) - MirBSD Korn Shell 40.2 (from official Debian package) - Solaris 9, 10 and 11 /bin/ksh - Solaris 9, 10 and 11 /usr/xpg4/bin/sh - NetBSD 5.1 /bin/sh - NetBSD 5.1 /bin/ksh * t/ax/test-init.sh (Exit): Rename ... (_am_exit): ... like this. (exit): New alias for '_am_exit'. We cannot simply redefine 'exit' as a shell function, because some shells (dash 0.5.5.1, Solaris 10 /bin/ksh and /usr/xpg4/bin/sh) do not allow it. (_am_exit, trap): Add extra escaping for 'exit' calls, to ensure we really invoke the 'exit' builtin and not our alias with the same name. * configure.ac: Check that the shell selected to run our testsuite supports aliases named like shell builtins. * t/REAMDE: Adjust. * All tests: Adjust, by simply using 'exit' instead of 'Exit'. * t/self-check-explicit-skips.sh: Adjust: the first usage of 'exit' after it has been redefined as an alias must be on a new line w.r.t. that where the alias is defined, in order for the redefinition to be honored. * syntax-checks.mk (sc_tests_Exit_not_exit): Delete. (sc_tests_exit_not_Exit): New. (syntax_check_rules): Adjust. (sc_tests_automake_fails): Simplify the recipe a little. * Several tests: Remove now useless spurious quoting once required to placate the 'sc_tests_Exit_not_exit' maintainer check. * gen-testsuite-part: Likewise. Also, avoid uses of 'Exit' in the generated scripts. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* vala: configure exit with status 77, not 1, if valac version is too oldStefano Lattarini2012-04-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | From a report by Bruno Haible in automake bug#1193. This change should also automatically avoid spurious testsuite failures with older vala versions. * m4/vala.m4 (AM_PROG_VALAC): Exit with status 77, rather than 1, if the Vala compiler found older than the minimal required version (if any). This is more consistent with what is done by other macros like AM_PROG_UPC or AC_PROG_CC. * NEWS: Update. * t/vala-headers.sh: Adjust, so that the test is only skipped of the vala compiler is too old or the required PKG_CHECK_MODULES third-party macro is not found by aclocal, and not if a generic error happens in the configure script. * t/vala-libs.sh: Likewise. * t/vala2.sh: Likewise. * t/vala3.sh: Likewise. * t/vala5.sh: Likewise. * t/vala-vpath.sh: Likewise (but don't check for the potential error with PKG_CHECK_MODULES, as that macro is not used in any way here). * t/vala4.sh: Adjust, to avoid the new semantic causing this test to skip instead of failing. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* vala: cleanup rules are better and more complete nowStefano Lattarini2012-04-171-0/+3
| | | | | | | | | * automake.in (lang_vala_finish_target): Ensure Vala-generated C sources and header files and our custom stamp files are correctly cleaned. * t/vala-headers.sh, t/vala-vpath.sh: Enhance. * NEWS: Update. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* vala tests: check headers generationStefano Lattarini2012-04-171-0/+82
* t/vala-headers.sh: New test, checking use of 'valac' options for header generation (e.g., '-H', '--vapi', ...) in '$(..._VALAFLAGS)'. * t/list-of-tests.mk: Add it. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>