configure: define GIT_INDEX in terms of top_srcdir
[piplib.git] / test / Makefile.am
blob944a49aada77c6fef961e4f6fd65662d2c5acb32
2 # Copyright 2002 (c) Leiden University, LIACS,
3 # All Rights Reserved.
5 # Permission is granted to copy, use, and distribute
6 # for any commercial or noncommercial purpose under the terms
7 # of the GNU Lesser General Public license, version 2.1, February 1999
8 # (see file : ../LICENSE).
10 # @author: Bart Kienhuis
11 # $Id: makefile,v 1.26 2002/09/26 13:03:53 kienhuis Exp $
13 # ndCed: useful line for names with their extensions:
14 # diff -w xyz `basename $$x .dat`.ll ;
16 # pbs with boulet bouleti and dirk 
17 #       boulet  \
18 #       bouleti \
19 #       dirk    \
22 PIPTEST =       \
23         crescat \
24         discr   \
25         equus   \
26         invert  \
27         linear  \
28         lineri  \
29         loz     \
30         max     \
31         maxb    \
32         pairi   \
33         petit   \
34         rairo   \
35         rairoi  \
36         test    \
37         test2   \
38         test2i  \
39         test3   \
40         test3i  \
41         test4   \
42         test4i  \
43         test5   \
44         test5i  \
45         test6   \
46         test6i  \
47         test7   \
48         test7i  \
49         test8i  \
50         test9i  \
51         test10i \
52         test11  \
53         test11i \
54         test12  \
55         test12i
57 EXTRA_DIST = \
58         $(PIPTEST:%=%.dat) \
59         $(PIPTEST:%=%.ll)
61 generate:
62         @echo "             /*-----------------------------------------------*"
63         @echo "              *                 Generate files                *"
64         @echo "              *-----------------------------------------------*/"
65         for x in $(PIPTEST) ; do \
66                 echo "Generate $(srcdir)/$$x.ll" ; \
67                 $(top_builddir)/pip64$(EXEEXT) $(srcdir)/$$x.dat $(srcdir)/$$x.ll ; \
68         done
70 test:
71         @echo "             /*-----------------------------------------------*"
72         @echo "              *                  Testing PIP                  *"
73         @echo "              *-----------------------------------------------*/"
74         @failedtest=0; \
75         for x in $(PIPTEST) ; do \
76                 echo "Verify file $$x" ; \
77                 $(top_builddir)/$(PIP) -s $(srcdir)/$$x.dat > xyz; \
78                 diff -w xyz $(srcdir)/$$x.ll ; \
79                 result=$$?; \
80                 if [ "$$result" -ne "0" ]; then \
81                         echo "Error: $$x is not the same"; \
82                         failedtest=`expr $$failedtest + 1`; \
83                 else \
84                         echo "$$x passed"; \
85                 fi; \
86         done ; \
87         rm xyz ; \
88         if [ $$failedtest != 0 ]; then \
89                 echo "$$failedtest tests failed"; \
90         else \
91                 echo "PIP works correctly :-)"; \
92         fi