| 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-bnode-01.rq syntax-bnode-02.rq syntax-bnode-03.rq \ |
| 27 |
syntax-dataset-01.rq syntax-dataset-02.rq syntax-dataset-03.rq \ |
| 28 |
syntax-dataset-04.rq syntax-esc-01.rq syntax-esc-02.rq \ |
| 29 |
syntax-esc-03.rq syntax-esc-04.rq syntax-form-ask-01.rq \ |
| 30 |
syntax-form-ask-02.rq syntax-form-construct01.rq \ |
| 31 |
syntax-form-construct02.rq syntax-form-construct03.rq \ |
| 32 |
syntax-form-construct04.rq syntax-form-construct05.rq \ |
| 33 |
syntax-form-construct06.rq syntax-form-describe01.rq \ |
| 34 |
syntax-form-describe02.rq syntax-form-select-01.rq \ |
| 35 |
syntax-form-select-02.rq syntax-function-01.rq syntax-function-02.rq \ |
| 36 |
syntax-function-03.rq syntax-function-04.rq syntax-general-01.rq \ |
| 37 |
syntax-general-02.rq syntax-general-03.rq syntax-graph-01.rq \ |
| 38 |
syntax-graph-03.rq syntax-graph-04.rq \ |
| 39 |
syntax-graph-05.rq syntax-keywords-01.rq \ |
| 40 |
syntax-keywords-02.rq syntax-keywords-03.rq syntax-lists-01.rq \ |
| 41 |
syntax-lists-02.rq syntax-lists-03.rq syntax-lists-04.rq \ |
| 42 |
syntax-lists-05.rq |
| 43 |
|
| 44 |
EXPECTED_SPARQL_CORRECT= \ |
| 45 |
"syntax-general-01.rq" \ |
| 46 |
"syntax-general-02.rq" \ |
| 47 |
"syntax-general-03.rq" \ |
| 48 |
"syntax-keywords-01.rq" \ |
| 49 |
"syntax-keywords-02.rq" \ |
| 50 |
"syntax-keywords-03.rq" \ |
| 51 |
"syntax-lists-01.rq" \ |
| 52 |
"syntax-lists-02.rq" \ |
| 53 |
"syntax-lists-03.rq" \ |
| 54 |
"syntax-lists-04.rq" \ |
| 55 |
"syntax-lists-05.rq" \ |
| 56 |
"syntax-bnode-01.rq" \ |
| 57 |
"syntax-bnode-02.rq" \ |
| 58 |
"syntax-bnode-03.rq" \ |
| 59 |
"syntax-function-01.rq" \ |
| 60 |
"syntax-function-02.rq" \ |
| 61 |
"syntax-function-03.rq" \ |
| 62 |
"syntax-function-04.rq" \ |
| 63 |
"syntax-form-select-01.rq" \ |
| 64 |
"syntax-form-select-02.rq" \ |
| 65 |
"syntax-form-ask-01.rq" \ |
| 66 |
"syntax-form-ask-02.rq" \ |
| 67 |
"syntax-form-construct01.rq" \ |
| 68 |
"syntax-form-construct02.rq" \ |
| 69 |
"syntax-form-construct03.rq" \ |
| 70 |
"syntax-form-construct04.rq" \ |
| 71 |
"syntax-form-construct05.rq" \ |
| 72 |
"syntax-form-construct06.rq" \ |
| 73 |
"syntax-form-describe01.rq" \ |
| 74 |
"syntax-form-describe02.rq" \ |
| 75 |
"syntax-dataset-01.rq" \ |
| 76 |
"syntax-dataset-02.rq" \ |
| 77 |
"syntax-dataset-03.rq" \ |
| 78 |
"syntax-dataset-04.rq" \ |
| 79 |
"syntax-graph-01.rq" \ |
| 80 |
"syntax-graph-03.rq" \ |
| 81 |
"syntax-graph-04.rq" \ |
| 82 |
"syntax-graph-05.rq" \ |
| 83 |
"syntax-esc-01.rq" \ |
| 84 |
"syntax-esc-02.rq" \ |
| 85 |
"syntax-esc-03.rq" \ |
| 86 |
"syntax-esc-04.rq" |
| 87 |
|
| 88 |
EXTRA_DIST= \ |
| 89 |
$(SPARQL_MANIFEST_FILES) \ |
| 90 |
$(SPARQL_TEST_FILES) |
| 91 |
|
| 92 |
CLEANFILES=diff.out roqet.err roqet.out roqet.tmp result.out |
| 93 |
|
| 94 |
build-roqet: |
| 95 |
@(cd $(top_builddir)/utils ; $(MAKE) roqet) |
| 96 |
|
| 97 |
build-sparql-lexer-test: |
| 98 |
@(cd $(top_builddir)/src ; $(MAKE) sparql_lexer_test) |
| 99 |
|
| 100 |
build-sparql-parser-test: |
| 101 |
@(cd $(top_builddir)/src ; $(MAKE) sparql_parser_test) |
| 102 |
|
| 103 |
check-local: build-roqet build-sparql-lexer-test build-sparql-parser-test |
| 104 |
@$(PERL) $(srcdir)/../../../improve . |
| 105 |
|
| 106 |
get-testsuites-list: |
| 107 |
@echo "sparql-lexer sparql-parser sparql-query" |
| 108 |
|
| 109 |
get-testsuite-sparql-lexer get-testsuite-sparql-parser: |
| 110 |
@type=`echo $@ | sed -e 's/^.*sparql-//' -e 's/er$$//'`; \ |
| 111 |
verb=`echo $$type`ing; \ |
| 112 |
prog=sparql_`echo $$type`er_test; \ |
| 113 |
$(RECHO) '@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .'; \ |
| 114 |
$(RECHO) '@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .'; \ |
| 115 |
$(RECHO) '@prefix t: <http://ns.librdf.org/2009/test-manifest#> .'; \ |
| 116 |
$(RECHO) ' '; \ |
| 117 |
$(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL legal $$verb\"; mf:entries ("; \ |
| 118 |
for test in $(SPARQL_TEST_FILES); do \ |
| 119 |
comment="sparql $$type of $$test"; \ |
| 120 |
$(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(top_builddir)/src/$$prog $(srcdir)/$$test\" ]"; \ |
| 121 |
done; \ |
| 122 |
$(RECHO) ")." |
| 123 |
|
| 124 |
get-testsuite-sparql-query: |
| 125 |
@$(RECHO) '@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .'; \ |
| 126 |
$(RECHO) '@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .'; \ |
| 127 |
$(RECHO) '@prefix t: <http://ns.librdf.org/2009/test-manifest#> .'; \ |
| 128 |
$(RECHO) ' '; \ |
| 129 |
$(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL Query Execution\"; mf:entries ("; \ |
| 130 |
for test in $(EXPECTED_SPARQL_CORRECT); do \ |
| 131 |
comment="sparql query $$test"; \ |
| 132 |
$(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../../check-sparql -s $(srcdir) '$$test'\" ]"; \ |
| 133 |
done; \ |
| 134 |
$(RECHO) ")." |