Adjust a seq subtest not to depend on the vagaries of floating point.
[platform/upstream/coreutils.git] / tests / Makefile.am.in
1 # Make coreutils tests.                                 -*-Makefile-*-
2
3 # Copyright (C) 1997, 1998, 2000, 2003, 2004, 2006 Free Software
4 # Foundation, Inc.
5
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19 ##test-files-begin
20 ##test-files-end
21
22 EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)
23 noinst_SCRIPTS = $x-tests
24
25 editpl = sed -e 's,@''PERL''@,$(PERL),g' -e 's,@''srcdir''@,$(srcdir),g'
26
27 TESTS = $x-tests
28
29 mk_script = $(srcdir)/../mk-script
30 $(srcdir)/$x-tests: $(mk_script) Test.pm Makefile.am
31         test '$x' = test && prog=../../src/$x || prog=$x; \
32         $(PERL) -I$(srcdir) -w -- $(mk_script) $(srcdir) $$prog > $@.n
33         mv $@.n $@
34         chmod 755 $@
35
36 MAINTAINERCLEANFILES = $x-tests $(maint_gen)
37 CLEANFILES = $(run_gen)
38
39 check: $(maint_gen)
40
41 $(srcdir)/Makefile.am: ../Makefile.am.in Test.pm $(mk_script)
42         rm -f $@ $@t
43         sed -n '1,/^##test-files-begin/p' $(srcdir)/../Makefile.am.in > $@t
44         tool=`echo $(subdir)|sed 's/^tests.//;s/-test//'`; \
45           echo "x = $$tool" >> $@t
46         $(PERL) -I$(srcdir) -w -- $(mk_script) $(srcdir) --list >> $@t
47         sed -n '/^##test-files-end/,$$p' $(srcdir)/../Makefile.am.in >> $@t
48         chmod -w $@t
49         mv $@t $@
50
51 include $(top_srcdir)/tests/check.mk