| 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 |
syntax-basic-01.rq syntax-basic-02.rq syntax-basic-03.rq \ |
| 27 |
syntax-basic-04.rq syntax-basic-05.rq syntax-basic-06.rq \ |
| 28 |
syntax-bnodes-01.rq syntax-bnodes-02.rq \ |
| 29 |
syntax-bnodes-05.rq syntax-bnodes-06.rq \ |
| 30 |
syntax-bnodes-07.rq syntax-expr-01.rq syntax-expr-02.rq \ |
| 31 |
syntax-expr-03.rq syntax-expr-04.rq syntax-expr-05.rq \ |
| 32 |
syntax-forms-01.rq syntax-forms-02.rq syntax-limit-offset-07.rq \ |
| 33 |
syntax-limit-offset-08.rq syntax-limit-offset-09.rq \ |
| 34 |
syntax-lists-01.rq syntax-lists-02.rq syntax-lists-03.rq \ |
| 35 |
syntax-lists-04.rq syntax-lists-05.rq syntax-lit-01.rq \ |
| 36 |
syntax-lit-02.rq syntax-lit-03.rq syntax-lit-04.rq syntax-lit-05.rq \ |
| 37 |
syntax-lit-06.rq syntax-lit-07.rq syntax-lit-08.rq syntax-lit-09.rq \ |
| 38 |
syntax-lit-10.rq syntax-lit-11.rq syntax-lit-12.rq syntax-lit-13.rq \ |
| 39 |
syntax-lit-14.rq syntax-order-01.rq syntax-order-02.rq \ |
| 40 |
syntax-order-03.rq syntax-order-04.rq syntax-order-05.rq \ |
| 41 |
syntax-order-06.rq syntax-pat-01.rq syntax-pat-02.rq syntax-pat-03.rq \ |
| 42 |
syntax-pat-04.rq syntax-qname-01.rq syntax-qname-02.rq \ |
| 43 |
syntax-qname-03.rq syntax-qname-04.rq syntax-qname-05.rq \ |
| 44 |
syntax-qname-06.rq syntax-qname-07.rq syntax-qname-08.rq \ |
| 45 |
syntax-struct-01.rq syntax-struct-02.rq syntax-struct-03.rq \ |
| 46 |
syntax-struct-04.rq syntax-struct-05.rq syntax-struct-06.rq \ |
| 47 |
syntax-struct-07.rq syntax-struct-08.rq syntax-struct-09.rq \ |
| 48 |
syntax-struct-10.rq syntax-struct-11.rq syntax-struct-12.rq \ |
| 49 |
syntax-union-01.rq syntax-union-02.rq |
| 50 |
|
| 51 |
EXPECTED_SPARQL_CORRECT= \ |
| 52 |
"syntax-basic-01.rq" \ |
| 53 |
"syntax-basic-02.rq" \ |
| 54 |
"syntax-basic-03.rq" \ |
| 55 |
"syntax-basic-04.rq" \ |
| 56 |
"syntax-basic-05.rq" \ |
| 57 |
"syntax-basic-06.rq" \ |
| 58 |
"syntax-qname-01.rq" \ |
| 59 |
"syntax-qname-02.rq" \ |
| 60 |
"syntax-qname-03.rq" \ |
| 61 |
"syntax-qname-04.rq" \ |
| 62 |
"syntax-qname-05.rq" \ |
| 63 |
"syntax-qname-06.rq" \ |
| 64 |
"syntax-qname-07.rq" \ |
| 65 |
"syntax-qname-08.rq" \ |
| 66 |
"syntax-lit-01.rq" \ |
| 67 |
"syntax-lit-02.rq" \ |
| 68 |
"syntax-lit-03.rq" \ |
| 69 |
"syntax-lit-04.rq" \ |
| 70 |
"syntax-lit-05.rq" \ |
| 71 |
"syntax-lit-06.rq" \ |
| 72 |
"syntax-lit-07.rq" \ |
| 73 |
"syntax-lit-08.rq" \ |
| 74 |
"syntax-lit-09.rq" \ |
| 75 |
"syntax-lit-10.rq" \ |
| 76 |
"syntax-lit-11.rq" \ |
| 77 |
"syntax-lit-12.rq" \ |
| 78 |
"syntax-lit-13.rq" \ |
| 79 |
"syntax-lit-14.rq" \ |
| 80 |
"syntax-struct-01.rq" \ |
| 81 |
"syntax-struct-02.rq" \ |
| 82 |
"syntax-struct-03.rq" \ |
| 83 |
"syntax-struct-04.rq" \ |
| 84 |
"syntax-struct-05.rq" \ |
| 85 |
"syntax-struct-06.rq" \ |
| 86 |
"syntax-struct-07.rq" \ |
| 87 |
"syntax-struct-08.rq" \ |
| 88 |
"syntax-struct-09.rq" \ |
| 89 |
"syntax-struct-10.rq" \ |
| 90 |
"syntax-struct-11.rq" \ |
| 91 |
"syntax-struct-12.rq" \ |
| 92 |
"syntax-lists-01.rq" \ |
| 93 |
"syntax-lists-02.rq" \ |
| 94 |
"syntax-lists-03.rq" \ |
| 95 |
"syntax-lists-04.rq" \ |
| 96 |
"syntax-lists-05.rq" \ |
| 97 |
"syntax-bnodes-01.rq" \ |
| 98 |
"syntax-bnodes-02.rq" \ |
| 99 |
"syntax-bnodes-05.rq" \ |
| 100 |
"syntax-bnodes-06.rq" \ |
| 101 |
"syntax-bnodes-07.rq" \ |
| 102 |
"syntax-forms-01.rq" \ |
| 103 |
"syntax-forms-02.rq" \ |
| 104 |
"syntax-union-01.rq" \ |
| 105 |
"syntax-union-02.rq" \ |
| 106 |
"syntax-expr-01.rq" \ |
| 107 |
"syntax-expr-02.rq" \ |
| 108 |
"syntax-expr-03.rq" \ |
| 109 |
"syntax-expr-04.rq" \ |
| 110 |
"syntax-expr-05.rq" \ |
| 111 |
"syntax-order-01.rq" \ |
| 112 |
"syntax-order-02.rq" \ |
| 113 |
"syntax-order-03.rq" \ |
| 114 |
"syntax-order-04.rq" \ |
| 115 |
"syntax-order-05.rq" \ |
| 116 |
"syntax-order-06.rq" \ |
| 117 |
"syntax-limit-offset-07.rq" \ |
| 118 |
"syntax-limit-offset-08.rq" \ |
| 119 |
"syntax-limit-offset-09.rq" \ |
| 120 |
"syntax-pat-01.rq" \ |
| 121 |
"syntax-pat-02.rq" \ |
| 122 |
"syntax-pat-03.rq" \ |
| 123 |
"syntax-pat-04.rq" |
| 124 |
|
| 125 |
EXTRA_DIST= \ |
| 126 |
$(SPARQL_MANIFEST_FILES) \ |
| 127 |
$(SPARQL_TEST_FILES) |
| 128 |
|
| 129 |
|
| 130 |
CLEANFILES=diff.out roqet.err roqet.out roqet.tmp result.out |
| 131 |
|
| 132 |
build-roqet: |
| 133 |
@(cd $(top_builddir)/utils ; $(MAKE) roqet) |
| 134 |
|
| 135 |
build-sparql-lexer-test: |
| 136 |
@(cd $(top_builddir)/src ; $(MAKE) sparql_lexer_test) |
| 137 |
|
| 138 |
build-sparql-parser-test: |
| 139 |
@(cd $(top_builddir)/src ; $(MAKE) sparql_parser_test) |
| 140 |
|
| 141 |
check-local: build-roqet build-sparql-lexer-test build-sparql-parser-test |
| 142 |
@$(PERL) $(srcdir)/../../../improve . |
| 143 |
|
| 144 |
get-testsuites-list: |
| 145 |
@echo "sparql-lexer sparql-parser sparql-query" |
| 146 |
|
| 147 |
get-testsuite-sparql-lexer get-testsuite-sparql-parser: |
| 148 |
@type=`echo $@ | sed -e 's/^.*sparql-//' -e 's/er$$//'`; \ |
| 149 |
verb=`echo $$type`ing; \ |
| 150 |
prog=sparql_`echo $$type`er_test; \ |
| 151 |
$(RECHO) '@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .'; \ |
| 152 |
$(RECHO) '@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .'; \ |
| 153 |
$(RECHO) '@prefix t: <http://ns.librdf.org/2009/test-manifest#> .'; \ |
| 154 |
$(RECHO) ' '; \ |
| 155 |
$(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL legal $$verb\"; mf:entries ("; \ |
| 156 |
for test in $(SPARQL_TEST_FILES); do \ |
| 157 |
comment="sparql $$type of $$test"; \ |
| 158 |
$(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(top_builddir)/src/$$prog $(srcdir)/$$test\" ]"; \ |
| 159 |
done; \ |
| 160 |
$(RECHO) ")." |
| 161 |
|
| 162 |
get-testsuite-sparql-query: |
| 163 |
@$(RECHO) '@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .'; \ |
| 164 |
$(RECHO) '@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .'; \ |
| 165 |
$(RECHO) '@prefix t: <http://ns.librdf.org/2009/test-manifest#> .'; \ |
| 166 |
$(RECHO) ' '; \ |
| 167 |
$(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ |
| 168 |
for test in $(EXPECTED_SPARQL_CORRECT); do \ |
| 169 |
comment="sparql query $$test"; \ |
| 170 |
$(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../../check-sparql -s $(srcdir) '$$test'\" ]"; \ |
| 171 |
done; \ |
| 172 |
$(RECHO) ")." |