| 1 |
# -*- Mode: Makefile -*- |
| 2 |
# |
| 3 |
# Makefile.am - automake file for Rasqal SPARQL Update tests |
| 4 |
# |
| 5 |
# Copyright (C) 2010, David Beckett http://www.dajobe.org/ |
| 6 |
# |
| 7 |
# This package is Free Software and part of Redland http://librdf.org/ |
| 8 |
# |
| 9 |
# It is licensed under the following three licenses as alternatives: |
| 10 |
# 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version |
| 11 |
# 2. GNU General Public License (GPL) V2 or any newer version |
| 12 |
# 3. Apache License, V2.0 or any newer version |
| 13 |
# |
| 14 |
# You may not use this file except in compliance with at least one of |
| 15 |
# the above three licenses. |
| 16 |
# |
| 17 |
# See LICENSE.html or LICENSE.txt at the top of this package for the |
| 18 |
# complete terms and further detail along with the license texts for |
| 19 |
# the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. |
| 20 |
# |
| 21 |
|
| 22 |
SPARQL_MANIFEST_FILES= manifest.ttl |
| 23 |
|
| 24 |
SPARQL_MODEL_FILES= \ |
| 25 |
data.ttl |
| 26 |
|
| 27 |
EXPECTED_SPARQL_CORRECT= \ |
| 28 |
insert-data-1.rq \ |
| 29 |
insert-data-2.rq \ |
| 30 |
insert-data-3.rq \ |
| 31 |
insert-data-4.rq \ |
| 32 |
delete-data-1.rq \ |
| 33 |
delete-data-2.rq \ |
| 34 |
delete-1.rq \ |
| 35 |
delete-2.rq \ |
| 36 |
insert-1.rq \ |
| 37 |
insert-2.rq \ |
| 38 |
insert-3.rq \ |
| 39 |
load-1.rq \ |
| 40 |
load-2.rq \ |
| 41 |
load-3.rq \ |
| 42 |
load-4.rq \ |
| 43 |
clear-1.rq \ |
| 44 |
clear-2.rq \ |
| 45 |
clear-3.rq \ |
| 46 |
clear-4.rq \ |
| 47 |
create-1.rq \ |
| 48 |
create-2.rq \ |
| 49 |
delete-1.rq \ |
| 50 |
drop-1.rq \ |
| 51 |
drop-2.rq \ |
| 52 |
delete-insert-1.rq \ |
| 53 |
copy-1.rq \ |
| 54 |
copy-2.rq \ |
| 55 |
copy-3.rq \ |
| 56 |
move-1.rq \ |
| 57 |
move-2.rq \ |
| 58 |
move-3.rq \ |
| 59 |
add-1.rq \ |
| 60 |
add-2.rq \ |
| 61 |
add-3.rq \ |
| 62 |
multiple-1.rq \ |
| 63 |
delete-where-1.rq \ |
| 64 |
delete-where-2.rq |
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
SPARQL_BAD_TEST_FILES= \ |
| 69 |
bad-1.rq |
| 70 |
|
| 71 |
EXPECTED_SPARQL_CORRECT_FAILURES= |
| 72 |
|
| 73 |
EXTRA_DIST= \ |
| 74 |
$(SPARQL_MANIFEST_FILES) \ |
| 75 |
$(SPARQL_MODEL_FILES) \ |
| 76 |
$(EXPECTED_SPARQL_CORRECT) \ |
| 77 |
$(SPARQL_BAD_TEST_FILES) |
| 78 |
|
| 79 |
build-sparql-parser-test: |
| 80 |
@(cd $(top_builddir)/src ; $(MAKE) sparql_parser_test) |
| 81 |
|
| 82 |
check-local: build-sparql-parser-test |
| 83 |
@$(PERL) $(srcdir)/../../improve . |
| 84 |
|
| 85 |
get-testsuites-list: |
| 86 |
@echo "sparql-parse-good sparql-parse-bad" |
| 87 |
|
| 88 |
get-testsuite-sparql-parse-good: |
| 89 |
@prog=sparql_parser_test; \ |
| 90 |
$(RECHO) '@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .'; \ |
| 91 |
$(RECHO) '@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .'; \ |
| 92 |
$(RECHO) '@prefix t: <http://ns.librdf.org/2009/test-manifest#> .'; \ |
| 93 |
$(RECHO) ' '; \ |
| 94 |
$(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL 1.1 Update legal parsing\"; mf:entries ("; \ |
| 95 |
for test in $(EXPECTED_SPARQL_CORRECT); do \ |
| 96 |
comment="sparql parsing of $$test"; \ |
| 97 |
$(RECHO) " [ a t:PositiveTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(top_builddir)/src/$$prog -i sparql11 $(srcdir)/$$test\" ]"; \ |
| 98 |
done; \ |
| 99 |
for test in $(EXPECTED_SPARQL_CORRECT_FAILURES); do \ |
| 100 |
comment="sparql parsing of $$test"; \ |
| 101 |
$(RECHO) " [ a t:NegativeTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(top_builddir)/src/$$prog -i sparql11 $(srcdir)/$$test\" ]"; \ |
| 102 |
done; \ |
| 103 |
$(RECHO) ")." |
| 104 |
|
| 105 |
|
| 106 |
get-testsuite-sparql-parse-bad: |
| 107 |
@prog=sparql_parser_test; \ |
| 108 |
$(RECHO) '@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .'; \ |
| 109 |
$(RECHO) '@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .'; \ |
| 110 |
$(RECHO) '@prefix t: <http://ns.librdf.org/2009/test-manifest#> .'; \ |
| 111 |
$(RECHO) ' '; \ |
| 112 |
$(RECHO) "<> a mf:Manifest; rdfs:comment \"SPARQL 1.1 Update illegal parsing\"; mf:entries ("; \ |
| 113 |
for test in $(SPARQL_BAD_TEST_FILES); do \ |
| 114 |
comment="sparql failing to parse of $$test"; \ |
| 115 |
$(RECHO) " [ a t:NegativeTest; mf:name \"$$test\"; rdfs:comment \"$$comment\"; mf:action \"$(top_builddir)/src/$$prog -i sparql11 $(srcdir)/$$test\" ]"; \ |
| 116 |
done; \ |
| 117 |
$(RECHO) ")." |
| 118 |
|