| 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.n3 |
| 24 |
|
| 25 |
SPARQL_MODEL_FILES= \ |
| 26 |
boolean-0.n3 \ |
| 27 |
extendedType-0.n3 \ |
| 28 |
typePromotion-0.n3 |
| 29 |
|
| 30 |
SPARQL_TEST_FILES= \ |
| 31 |
boolean-EBV-canonical.rq \ |
| 32 |
boolean-equiv-FALSE.rq \ |
| 33 |
boolean-equiv-TRUE.rq \ |
| 34 |
boolean-equiv-xsdType.rq \ |
| 35 |
boolean-false-canonical.rq \ |
| 36 |
boolean-logical-OR.rq \ |
| 37 |
boolean-true-canonical.rq \ |
| 38 |
extendedType-eq-pass.rq \ |
| 39 |
extendedType-graph.rq \ |
| 40 |
extendedType-literal-eq.rq \ |
| 41 |
extendedType-literal-ne.rq \ |
| 42 |
extendedType-ne-fail.rq \ |
| 43 |
typePromotion-decimal-decimal-fail.rq \ |
| 44 |
typePromotion-decimal-decimal-pass.rq |
| 45 |
|
| 46 |
EXPECTED_SPARQL_CORRECT= \ |
| 47 |
"extendedType-eq-pass" \ |
| 48 |
"extendedType-ne-fail" \ |
| 49 |
"extendedType-literal-eq" \ |
| 50 |
"extendedType-literal-ne" \ |
| 51 |
"extendedType-graph" \ |
| 52 |
"typePromotion-decimal-decimal-fail" \ |
| 53 |
"boolean-equiv-FALSE" \ |
| 54 |
"boolean-equiv-TRUE" \ |
| 55 |
"boolean-equiv-xsdType" \ |
| 56 |
"boolean-logical-OR" |
| 57 |
|
| 58 |
# Test failures |
| 59 |
EXPECTED_SPARQL_CORRECT_FAILURES= \ |
| 60 |
typePromotion-decimal-decimal-pass \ |
| 61 |
boolean-false-canonical \ |
| 62 |
boolean-true-canonical \ |
| 63 |
boolean-EBV-canonical |
| 64 |
|
| 65 |
SPARQL_RESULT_FILES= \ |
| 66 |
boolean-EBV-canonical-result.n3 \ |
| 67 |
boolean-equiv-FALSE-result.n3 \ |
| 68 |
boolean-equiv-TRUE-result.n3 \ |
| 69 |
boolean-equiv-xsdType-result.n3 \ |
| 70 |
boolean-false-canonical-result.n3 \ |
| 71 |
boolean-logical-OR-result.n3 \ |
| 72 |
boolean-true-canonical-result.n3 \ |
| 73 |
extendedType-eq-pass-result.n3 \ |
| 74 |
extendedType-graph-result.n3 \ |
| 75 |
extendedType-literal-eq-result.n3 \ |
| 76 |
extendedType-literal-ne-result.n3 \ |
| 77 |
extendedType-ne-fail-result.n3 \ |
| 78 |
typePromotion-decimal-decimal-fail-result.n3 \ |
| 79 |
typePromotion-decimal-decimal-pass-result.n3 |
| 80 |
|
| 81 |
EXTRA_DIST= \ |
| 82 |
$(SPARQL_MANIFEST_FILES) \ |
| 83 |
$(SPARQL_MODEL_FILES) \ |
| 84 |
$(SPARQL_TEST_FILES) \ |
| 85 |
$(SPARQL_RESULT_FILES) |
| 86 |
|
| 87 |
CLEANFILES=diff.out roqet.err roqet.out roqet.tmp result.out |
| 88 |
|
| 89 |
.PHONY: build-core build-roqet build-sparql-test-utils check-local get-testsuites-list get-testsuite-sparql-lexer get-testsuite-sparql-parser |
| 90 |
|
| 91 |
# This sequence allows parallel building of build-core and then once |
| 92 |
# that is built, parallel building of the dependent programs: roqet, |
| 93 |
# sparql_lexer_test and sparql_parser_test |
| 94 |
build-core: |
| 95 |
@(cd $(top_builddir)/src ; $(MAKE)) |
| 96 |
|
| 97 |
build-roqet: build-core |
| 98 |
@(cd $(top_builddir)/utils ; $(MAKE) roqet) |
| 99 |
|
| 100 |
build-sparql-test-utils: build-core |
| 101 |
@(cd $(top_builddir)/src ; $(MAKE) sparql_lexer_test sparql_parser_test) |
| 102 |
|
| 103 |
check-local: build-roqet build-sparql-test-utils |
| 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 |
for test in $(EXPECTED_SPARQL_CORRECT_FAILURES); do \ |
| 135 |
comment="sparql query $$test"; \ |
| 136 |
$(RECHO) " [ a t:NegativeTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(PERL) $(srcdir)/../check-sparql -s $(srcdir) '$$test'\" ]"; \ |
| 137 |
done; \ |
| 138 |
$(RECHO) ")." |