Debian Codegraph @

tests/sparql/SyntaxDev/Syntax-SPARQL3/Makefile.am

raw
1 # -*- Mode: Makefile -*-
2 #
3 # Makefile.am - automake file for Rasqal SPARQL tests
4 #
5 # Copyright (C) 2005-2008, David Beckett http://www.dajobe.org/
6 # Copyright (C) 2005-2005, University of Bristol, UK http://www.bristol.ac.uk/
7 #
8 # This package is Free Software and part of Redland http://librdf.org/
9 #
10 # It is licensed under the following three licenses as alternatives:
11 # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version
12 # 2. GNU General Public License (GPL) V2 or any newer version
13 # 3. Apache License, V2.0 or any newer version
14 #
15 # You may not use this file except in compliance with at least one of
16 # the above three licenses.
17 #
18 # See LICENSE.html or LICENSE.txt at the top of this package for the
19 # complete terms and further detail along with the license texts for
20 # the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively.
21 #
22
23 SPARQL_MANIFEST_FILES= manifest.ttl
24
25 SPARQL_TEST_FILES= \
26 syn-01.rq syn-02.rq syn-03.rq syn-04.rq syn-05.rq syn-06.rq syn-07.rq \
27 syn-08.rq
28
29 SPARQL_TEST_BAD_FILES= \
30 syn-bad-01.rq syn-bad-02.rq syn-bad-03.rq syn-bad-04.rq syn-bad-05.rq \
31 syn-bad-06.rq syn-bad-07.rq syn-bad-08.rq syn-bad-09.rq syn-bad-10.rq \
32 bnode-dot.rq bnodes-missing-pvalues-01.rq \
33 bnodes-missing-pvalues-02.rq empty-optional-01.rq \
34 empty-optional-02.rq filter-missing-parens.rq lone-list.rq \
35 lone-node.rq
36
37 EXPECTED_SPARQL_CORRECT= \
38 "syn-01.rq" \
39 "syn-02.rq" \
40 "syn-03.rq" \
41 "syn-04.rq" \
42 "syn-05.rq" \
43 "syn-06.rq" \
44 "syn-07.rq" \
45 "syn-08.rq" \
46 "syn-bad-01.rq" \
47 "syn-bad-02.rq" \
48 "syn-bad-03.rq" \
49 "syn-bad-04.rq" \
50 "syn-bad-05.rq" \
51 "syn-bad-06.rq" \
52 "syn-bad-07.rq" \
53 "syn-bad-08.rq" \
54 "syn-bad-09.rq" \
55 "syn-bad-10.rq" \
56 "bnode-dot.rq" \
57 "bnodes-missing-pvalues-01.rq" \
58 "bnodes-missing-pvalues-02.rq" \
59 "empty-optional-01.rq" \
60 "empty-optional-02.rq" \
61 "filter-missing-parens.rq" \
62 "lone-list.rq" \
63 "lone-node.rq"
64
65 EXTRA_DIST= \
66 $(SPARQL_MANIFEST_FILES) \
67 $(SPARQL_TEST_FILES) \
68 $(SPARQL_TEST_BAD_FILES)
69
70 CLEANFILES=diff.out roqet.err roqet.out roqet.tmp result.out
71
72 build-roqet:
73 @(cd $(top_builddir)/utils ; $(MAKE) roqet)
74
75 build-sparql-lexer-test:
76 @(cd $(top_builddir)/src ; $(MAKE) sparql_lexer_test)
77
78 build-sparql-parser-test:
79 @(cd $(top_builddir)/src ; $(MAKE) sparql_parser_test)
80
81 check-local: build-roqet build-sparql-lexer-test build-sparql-parser-test
82 @$(PERL) $(srcdir)/../../../improve .
83
84 get-testsuites-list:
85 @echo "sparql-lexer sparql-parser sparql-query"
86
87 get-testsuite-sparql-lexer get-testsuite-sparql-parser:
88 @type=`echo $@ | sed -e 's/^.*sparql-//' -e 's/er$$//'`; \
89 verb=`echo $$type`ing; \
90 prog=sparql_`echo $$type`er_test; \
91 $(RECHO) '@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .'; \
92 $(RECHO) '@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .'; \
93 $(RECHO) '@prefix t: <http://ns.librdf.org/2009/test-manifest#> .'; \
94 $(RECHO) ' '; \
95 $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL legal $$verb\"; mf:entries ("; \
96 for test in $(SPARQL_TEST_FILES); do \
97 comment="sparql $$type of $$test"; \
98 $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(top_builddir)/src/$$prog $(srcdir)/$$test\" ]"; \
99 done; \
100 $(RECHO) ")."
101
102 get-testsuite-sparql-query:
103 @$(RECHO) '@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .'; \
104 $(RECHO) '@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .'; \
105 $(RECHO) '@prefix t: <http://ns.librdf.org/2009/test-manifest#> .'; \
106 $(RECHO) ' '; \
107 $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \
108 for test in $(EXPECTED_SPARQL_CORRECT); do \
109 comment="sparql query $$test"; \
110 $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../../check-sparql -s $(srcdir) '$$test'\" ]"; \
111 done; \
112 $(RECHO) ")."