Blame tests/Makefile.am

Packit 709fb3
## Process this file with automake to create Makefile.in
Packit 709fb3
# Copyright 1997-1998, 2005-2017 Free Software Foundation, Inc.
Packit 709fb3
#
Packit 709fb3
# This program is free software; you can redistribute it and/or modify
Packit 709fb3
# it under the terms of the GNU General Public License as published by
Packit 709fb3
# the Free Software Foundation; either version 3, or (at your option)
Packit 709fb3
# any later version.
Packit 709fb3
#
Packit 709fb3
# This program is distributed in the hope that it will be useful,
Packit 709fb3
# but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 709fb3
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 709fb3
# GNU General Public License for more details.
Packit 709fb3
#
Packit 709fb3
# You should have received a copy of the GNU General Public License
Packit 709fb3
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
Packit 709fb3
Packit 709fb3
TEST_EXTENSIONS = .sh .pl
Packit 709fb3
Packit 709fb3
if HAVE_PERL
Packit 709fb3
TESTSUITE_PERL = $(PERL)
Packit 709fb3
else
Packit 709fb3
TESTSUITE_PERL = $(SHELL) $(srcdir)/no-perl
Packit 709fb3
endif
Packit 709fb3
Packit 709fb3
# Options passed to the perl invocations running the perl test scripts.
Packit 709fb3
TESTSUITE_PERL_OPTIONS = -w -I$(srcdir) -MCoreutils -MCuSkip
Packit 709fb3
# '$f' is set by the Automake-generated test harness to the path of the
Packit 709fb3
# current test script stripped of VPATH components, and is used by the
Packit 709fb3
# CuTmpdir module to determine the name of the temporary files to be
Packit 709fb3
# used.  Note that $f is a shell variable, not a make macro, so the use
Packit 709fb3
# of '$$f' below is correct, and not a typo.
Packit 709fb3
TESTSUITE_PERL_OPTIONS += -M"CuTmpdir qw($$f)"
Packit 709fb3
Packit 709fb3
SH_LOG_COMPILER = $(SHELL)
Packit 709fb3
PL_LOG_COMPILER = $(TESTSUITE_PERL) $(TESTSUITE_PERL_OPTIONS)
Packit 709fb3
Packit 709fb3
check_PROGRAMS = get-mb-cur-max
Packit 709fb3
AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib \
Packit 709fb3
  -I$(top_srcdir)/src
Packit 709fb3
AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
Packit 709fb3
Packit 709fb3
# Tell the linker to omit references to unused shared libraries.
Packit 709fb3
AM_LDFLAGS = $(IGNORE_UNUSED_LIBRARIES_CFLAGS)
Packit 709fb3
LDADD = ../lib/libgreputils.a $(LIBINTL) ../lib/libgreputils.a
Packit 709fb3
Packit 709fb3
# The triple-backref test is expected to fail with both the system
Packit 709fb3
# matcher (i.e., with glibc) and with the included matcher.
Packit 709fb3
# Both matchers need to be fixed.
Packit 709fb3
# FIXME-2015: Remove this once the glibc and gnulib bugs are fixed.
Packit 709fb3
XFAIL_TESTS = triple-backref
Packit 709fb3
Packit 709fb3
# Equivalence classes are only supported when using the system
Packit 709fb3
# matcher (which means only with glibc).
Packit 709fb3
# The included matcher needs to be fixed.
Packit 709fb3
# FIXME-2015: Remove this once the gnulib bug is fixed.
Packit 709fb3
if USE_INCLUDED_REGEX
Packit 709fb3
XFAIL_TESTS += equiv-classes
Packit 709fb3
endif
Packit 709fb3
Packit 709fb3
TESTS =						\
Packit 709fb3
  backref					\
Packit 709fb3
  backref-alt					\
Packit 709fb3
  backref-multibyte-slow			\
Packit 709fb3
  backref-word					\
Packit 709fb3
  backslash-s-and-repetition-operators		\
Packit 709fb3
  backslash-s-vs-invalid-multitype		\
Packit 709fb3
  big-hole					\
Packit 709fb3
  big-match					\
Packit 709fb3
  bogus-wctob					\
Packit 709fb3
  bre						\
Packit 709fb3
  c-locale					\
Packit 709fb3
  case-fold-backref				\
Packit 709fb3
  case-fold-backslash-w				\
Packit 709fb3
  case-fold-char-class				\
Packit 709fb3
  case-fold-char-range				\
Packit 709fb3
  case-fold-char-type				\
Packit 709fb3
  case-fold-titlecase				\
Packit 709fb3
  char-class-multibyte				\
Packit 709fb3
  char-class-multibyte2				\
Packit 709fb3
  context-0					\
Packit 709fb3
  count-newline					\
Packit 709fb3
  dfa-coverage					\
Packit 709fb3
  dfa-heap-overrun				\
Packit 709fb3
  dfa-infloop					\
Packit 709fb3
  dfaexec-multibyte				\
Packit 709fb3
  empty						\
Packit 709fb3
  empty-line					\
Packit 709fb3
  empty-line-mb					\
Packit 709fb3
  encoding-error				\
Packit 709fb3
  epipe						\
Packit 709fb3
  equiv-classes					\
Packit 709fb3
  ere						\
Packit 709fb3
  euc-mb					\
Packit 709fb3
  false-match-mb-non-utf8			\
Packit 709fb3
  fedora					\
Packit 709fb3
  fgrep-infloop					\
Packit 709fb3
  fgrep-longest					\
Packit 709fb3
  file						\
Packit 709fb3
  filename-lineno.pl				\
Packit 709fb3
  fmbtest					\
Packit 709fb3
  foad1						\
Packit 709fb3
  grep-dev-null					\
Packit 709fb3
  grep-dev-null-out				\
Packit 709fb3
  grep-dir					\
Packit 709fb3
  help-version					\
Packit 709fb3
  high-bit-range				\
Packit 709fb3
  in-eq-out-infloop				\
Packit 709fb3
  include-exclude				\
Packit 709fb3
  inconsistent-range				\
Packit 709fb3
  initial-tab					\
Packit 709fb3
  invalid-multibyte-infloop			\
Packit 709fb3
  khadafy					\
Packit 709fb3
  kwset-abuse					\
Packit 709fb3
  long-line-vs-2GiB-read			\
Packit 709fb3
  long-pattern-perf				\
Packit 709fb3
  match-lines					\
Packit 709fb3
  max-count-overread				\
Packit 709fb3
  max-count-vs-context				\
Packit 709fb3
  mb-dot-newline				\
Packit 709fb3
  mb-non-UTF8-overrun				\
Packit 709fb3
  mb-non-UTF8-performance			\
Packit 709fb3
  multibyte-white-space				\
Packit 709fb3
  multiple-begin-or-end-line			\
Packit 709fb3
  null-byte					\
Packit 709fb3
  options					\
Packit 709fb3
  pcre						\
Packit 709fb3
  pcre-abort					\
Packit 709fb3
  pcre-context					\
Packit 709fb3
  pcre-count					\
Packit 709fb3
  pcre-infloop					\
Packit 709fb3
  pcre-invalid-utf8-infloop			\
Packit 709fb3
  pcre-invalid-utf8-input			\
Packit 709fb3
  pcre-jitstack					\
Packit 709fb3
  pcre-o					\
Packit 709fb3
  pcre-utf8					\
Packit 709fb3
  pcre-w					\
Packit 709fb3
  pcre-wx-backref				\
Packit 709fb3
  pcre-z					\
Packit 709fb3
  posix-bracket					\
Packit 709fb3
  prefix-of-multibyte				\
Packit 709fb3
  proc						\
Packit 709fb3
  r-dot						\
Packit 709fb3
  repetition-overflow				\
Packit 709fb3
  reversed-range-endpoints			\
Packit 709fb3
  sjis-mb					\
Packit 709fb3
  skip-device					\
Packit 709fb3
  skip-read					\
Packit 709fb3
  spencer1					\
Packit 709fb3
  spencer1-locale				\
Packit 709fb3
  status					\
Packit 709fb3
  surrogate-pair				\
Packit 709fb3
  symlink					\
Packit 709fb3
  triple-backref				\
Packit 709fb3
  turkish-I					\
Packit 709fb3
  turkish-I-without-dot				\
Packit 709fb3
  turkish-eyes					\
Packit 709fb3
  two-chars					\
Packit 709fb3
  two-files					\
Packit 709fb3
  unibyte-binary				\
Packit 709fb3
  unibyte-bracket-expr				\
Packit 709fb3
  unibyte-negated-circumflex			\
Packit 709fb3
  utf8-bracket					\
Packit 709fb3
  warn-char-classes				\
Packit 709fb3
  word-delim-multibyte				\
Packit 709fb3
  word-multi-file				\
Packit 709fb3
  word-multibyte				\
Packit 709fb3
  write-error-msg				\
Packit 709fb3
  yesno						\
Packit 709fb3
  z-anchor-newline
Packit 709fb3
Packit 709fb3
EXTRA_DIST =					\
Packit 709fb3
  $(TESTS)					\
Packit 709fb3
  bre.awk					\
Packit 709fb3
  bre.tests					\
Packit 709fb3
  Coreutils.pm					\
Packit 709fb3
  CuSkip.pm					\
Packit 709fb3
  CuTmpdir.pm					\
Packit 709fb3
  envvar-check					\
Packit 709fb3
  ere.awk					\
Packit 709fb3
  ere.tests					\
Packit 709fb3
  init.cfg					\
Packit 709fb3
  init.sh					\
Packit 709fb3
  khadafy.lines					\
Packit 709fb3
  khadafy.regexp				\
Packit 709fb3
  no-perl					\
Packit 709fb3
  spencer1.awk					\
Packit 709fb3
  spencer1.tests				\
Packit 709fb3
  spencer1-locale.awk
Packit 709fb3
Packit 709fb3
# Default to a nonzero value.  Environment overrides.
Packit 709fb3
# http://udrepper.livejournal.com/11429.html
Packit 709fb3
MALLOC_PERTURB_ = 1
Packit 709fb3
Packit 709fb3
TESTS_ENVIRONMENT =				\
Packit 709fb3
  tmp__=$${TMPDIR-/tmp};			\
Packit 709fb3
  test -d "$$tmp__" && test -w "$$tmp__" || tmp__=.;	\
Packit 709fb3
  . $(srcdir)/envvar-check;			\
Packit 709fb3
  TMPDIR=$$tmp__; export TMPDIR;		\
Packit 709fb3
						\
Packit 709fb3
  if test -n "$$BASH_VERSION" || (eval "export v=x") 2>/dev/null; then \
Packit 709fb3
    export_with_values () { export "$$@"; };		\
Packit 709fb3
  else							\
Packit 709fb3
    export_with_values ()				\
Packit 709fb3
    {							\
Packit 709fb3
      sed_extract_var='s/=.*//';			\
Packit 709fb3
      sed_quote_value="s/'/'\\\\''/g;s/=\\(.*\\)/='\\1'/";\
Packit 709fb3
      for arg in "$$@"; do				\
Packit 709fb3
        var=`echo "$$arg" | sed "$$sed_extract_var"`;	\
Packit 709fb3
        arg=`echo "$$arg" | sed "$$sed_quote_value"`;	\
Packit 709fb3
        eval "$$arg";					\
Packit 709fb3
        export "$$var";					\
Packit 709fb3
      done;						\
Packit 709fb3
    };							\
Packit 709fb3
  fi;							\
Packit 709fb3
							\
Packit 709fb3
  : 'Test egrep/fgrep help if they use our grep.';	\
Packit 709fb3
  grep=`echo grep | sed -e '$(transform)'` || exit;	\
Packit 709fb3
  if test "$$grep" = grep; then				\
Packit 709fb3
    built_programs='grep egrep fgrep';			\
Packit 709fb3
  else							\
Packit 709fb3
    built_programs='grep';				\
Packit 709fb3
  fi;							\
Packit 709fb3
						\
Packit 709fb3
  export_with_values				\
Packit 709fb3
  VERSION='$(VERSION)'				\
Packit 709fb3
  LOCALE_FR='$(LOCALE_FR)'			\
Packit 709fb3
  LOCALE_FR_UTF8='$(LOCALE_FR_UTF8)'		\
Packit 709fb3
  AWK=$(AWK)					\
Packit 709fb3
  GREP_OPTIONS=''				\
Packit 709fb3
  LC_ALL=C					\
Packit 709fb3
  abs_top_builddir='$(abs_top_builddir)'	\
Packit 709fb3
  abs_top_srcdir='$(abs_top_srcdir)'		\
Packit 709fb3
  abs_srcdir='$(abs_srcdir)'			\
Packit 709fb3
  built_programs="$$built_programs"		\
Packit 709fb3
  srcdir='$(srcdir)'				\
Packit 709fb3
  top_srcdir='$(top_srcdir)'			\
Packit 709fb3
  CC='$(CC)'					\
Packit 709fb3
  GREP_TEST_NAME=`echo $$tst|sed 's,^\./,,;s,/,-,g'` \
Packit 709fb3
  MAKE=$(MAKE)					\
Packit 709fb3
  MALLOC_PERTURB_=$(MALLOC_PERTURB_)		\
Packit 709fb3
  PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)'	\
Packit 709fb3
  PACKAGE_VERSION=$(PACKAGE_VERSION)		\
Packit 709fb3
  PERL='$(PERL)'				\
Packit 709fb3
  SHELL='$(SHELL)'				\
Packit 709fb3
  PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" \
Packit 709fb3
  ; 9>&2
Packit 709fb3
Packit 709fb3
LOG_COMPILER = $(SHELL)
Packit 709fb3
Packit 709fb3
VERBOSE = yes
Packit 709fb3
Packit 709fb3
check: check_executable_TESTS
Packit 709fb3
.PHONY: check_executable_TESTS
Packit 709fb3
check_executable_TESTS: Makefile
Packit 709fb3
	$(AM_V_GEN)fail=0;						\
Packit 709fb3
        cd $(srcdir) && for i in $(TESTS); do				\
Packit 709fb3
	  test -x $$i || { fail=1; echo $$i >&2; };			\
Packit 709fb3
	done;								\
Packit 709fb3
	test $$fail = 1							\
Packit 709fb3
          && { echo the above test scripts are not executable >&2; exit 1; } \
Packit 709fb3
          || :