Debian Codegraph @

tests/sparql/ExprEquals/Makefile.am

raw
1 # -*- Mode: Makefile -*-
2 #
3 # Makefile.am - automake file for Rasqal syntax 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.n3
24
25 SPARQL_MODEL_FILES= \
26 data-eq.ttl
27
28 SPARQL_TEST_FILES= \
29 query-eq-1.rq query-eq-2.rq query-eq-3.rq query-eq-4.rq query-eq-5.rq \
30 query-eq2-1.rq query-eq2-2.rq query-eq2-graph-1.rq \
31 query-eq-graph-1.rq query-eq-graph-2.rq query-eq-graph-3.rq \
32 query-eq-graph-4.rq query-eq-graph-5.rq
33
34 EXPECTED_SPARQL_CORRECT= \
35 "Equality 1-1" \
36 "Equality 1-2" \
37 "Equality 1-3" \
38 "Equality 1-4" \
39 "Equality 1-5" \
40 "Equality - 2 var - test equals" \
41 "Equality 1-3 -- graph" \
42 "Equality 1-4 -- graph" \
43 "Equality 1-5 -- graph"
44
45 EXPECTED_SPARQL_CORRECT_FAILURES= \
46 "Equality 1-1 -- graph" \
47 "Equality 1-2 -- graph" \
48 "Equality - 2 var - test equals -- graph"
49
50 SPARQL_RESULT_FILES= \
51 result-eq-1.ttl result-eq-2.ttl result-eq-3.ttl result-eq-4.ttl \
52 result-eq-5.ttl \
53 result-eq2-1.ttl result-eq2-2.ttl result-eq2-graph-1.ttl \
54 result-eq-graph-1.ttl result-eq-graph-2.ttl \
55 result-eq-graph-3.ttl result-eq-graph-4.ttl \
56 result-eq-graph-5.ttl
57
58
59 EXTRA_DIST= \
60 $(SPARQL_MANIFEST_FILES) \
61 $(SPARQL_MODEL_FILES) \
62 $(SPARQL_TEST_FILES) \
63 $(SPARQL_RESULT_FILES)
64
65 CLEANFILES=diff.out roqet.err roqet.out roqet.tmp result.out
66
67 .PHONY: build-core build-roqet build-sparql-test-utils check-local get-testsuites-list get-testsuite-sparql-lexer get-testsuite-sparql-parser
68
69 # This sequence allows parallel building of build-core and then once
70 # that is built, parallel building of the dependent programs: roqet,
71 # sparql_lexer_test and sparql_parser_test
72 build-core:
73 @(cd $(top_builddir)/src ; $(MAKE))
74
75 build-roqet: build-core
76 @(cd $(top_builddir)/utils ; $(MAKE) roqet)
77
78 build-sparql-test-utils: build-core
79 @(cd $(top_builddir)/src ; $(MAKE) sparql_lexer_test sparql_parser_test)
80
81 check-local: build-roqet build-sparql-test-utils
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 for test in $(EXPECTED_SPARQL_CORRECT_FAILURES); do \
113 comment="sparql query $$test"; \
114 $(RECHO) " [ a t:NegativeTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) '$$test'\" ]"; \
115 done; \
116 $(RECHO) ")."