From 00f5ba15dd91a3d9780fe1fbd06a4df436ae6714 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Thu, 30 Aug 2012 14:13:11 +0200 Subject: tests: detect missing perl at configure runtime * configure.ac (AM_CONDITIONAL): Set the conditional 'HAVE_PERL' to true if the configure-time checks (as run by gl_PERL) have been able to find a working perl. * tests/no-perl: New script, report a diagnostic about "missing perl" and exit with status 77. * tests/Makefile.am (EXTRA_DIST): Distribute it. (TESTSUITE_PERL): New, define to '$(PERL)' if a perl interpreter has been found at configure time (i.e., if the 'HAVE_PERL' automake conditional is true), and to '$(srcdir)/no-perl' otherwise. (LOG_COMPILER): Use $(TESTSUITE_PERL) instead of $(PERL). (XPL_LOG_COMPILER): Likewise. * tests/shell-or-perl: Simplify: no need to actually check whether perl is working. --- tests/no-perl | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 tests/no-perl (limited to 'tests/no-perl') diff --git a/tests/no-perl b/tests/no-perl new file mode 100644 index 000000000..956a82646 --- /dev/null +++ b/tests/no-perl @@ -0,0 +1,6 @@ +#! /bin/sh +# Perl is not available, the test should be considered skipped. +# FD 9 should have been opened by the test suite harness, pointing +# to the original stderr (usually, the user's terminal). +echo "test skipped: no usable version of Perl found" >&9 +exit 77 -- cgit v1.2.3-70-g09d2