Debian Codegraph @

tests/sparql/sort/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_MODEL_FILES= \
26 data-sort-1.ttl data-sort-3.ttl data-sort-4.ttl data-sort-6.ttl \
27 data-sort-7.ttl data-sort-8.ttl
28
29 SPARQL_TEST_FILES= \
30 query-sort-1.rq query-sort-2.rq query-sort-3.rq query-sort-4.rq \
31 query-sort-5.rq query-sort-6.rq
32
33 EXPECTED_SPARQL_CORRECT= \
34 "sort-1" \
35 "sort-2" \
36 "sort-3" \
37 "sort-4" \
38 "sort-5" \
39 "sort-6" \
40 "sort-7" \
41 "sort-8"
42
43 SPARQL_RESULT_FILES= \
44 result-sort-1.rdf result-sort-2.rdf result-sort-3.rdf \
45 result-sort-4.rdf result-sort-5.rdf result-sort-6.rdf \
46 result-sort-7.rdf result-sort-8.rdf
47
48
49 EXTRA_DIST= \
50 $(SPARQL_MANIFEST_FILES) \
51 $(SPARQL_MODEL_FILES) \
52 $(SPARQL_TEST_FILES) \
53 $(SPARQL_RESULT_FILES)
54
55 CLEANFILES=diff.out roqet.err roqet.out roqet.tmp result.out
56
57 .PHONY: build-core build-roqet build-sparql-test-utils check-local get-testsuites-list get-testsuite-sparql-lexer get-testsuite-sparql-parser
58
59 # This sequence allows parallel building of build-core and then once
60 # that is built, parallel building of the dependent programs: roqet,
61 # sparql_lexer_test and sparql_parser_test
62 build-core:
63 @(cd $(top_builddir)/src ; $(MAKE))
64
65 build-roqet: build-core
66 @(cd $(top_builddir)/utils ; $(MAKE) roqet)
67
68 build-sparql-test-utils: build-core
69 @(cd $(top_builddir)/src ; $(MAKE) sparql_lexer_test sparql_parser_test)
70
71 check-local: build-roqet build-sparql-test-utils
72 @$(PERL) $(srcdir)/../../improve .
73
74 get-testsuites-list:
75 @echo "sparql-lexer sparql-parser sparql-query"
76
77 get-testsuite-sparql-lexer get-testsuite-sparql-parser:
78 @type=`echo $@ | sed -e 's/^.*sparql-//' -e 's/er$$//'`; \
79 verb=`echo $$type`ing; \
80 prog=sparql_`echo $$type`er_test; \
81 $(RECHO) '@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .'; \
82 $(RECHO) '@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .'; \
83 $(RECHO) '@prefix t: <http://ns.librdf.org/2009/test-manifest#> .'; \
84 $(RECHO) ' '; \
85 $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL legal $$verb\"; mf:entries ("; \
86 for test in $(SPARQL_TEST_FILES); do \
87 comment="sparql $$type of $$test"; \
88 $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(top_builddir)/src/$$prog $(srcdir)/$$test\" ]"; \
89 done; \
90 $(RECHO) ")."
91
92 get-testsuite-sparql-query:
93 @$(RECHO) '@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .'; \
94 $(RECHO) '@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .'; \
95 $(RECHO) '@prefix t: <http://ns.librdf.org/2009/test-manifest#> .'; \
96 $(RECHO) ' '; \
97 $(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \
98 for test in $(EXPECTED_SPARQL_CORRECT); do \
99 comment="sparql query $$test"; \
100 $(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"\"\"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) \"$$test\" \"\"\" ]"; \
101 done; \
102 $(RECHO) ")."