1 |
|
---|
2 | # RDFInt.php - RDF Interfaces for PHP
|
---|
3 | # Copyright 2011 netlabs.org
|
---|
4 | # Author: Christian Langanke, Adrian Gschwend
|
---|
5 | #
|
---|
6 | # Licensed under the Apache License, Version 2.0 (the "License");
|
---|
7 | # you may not use this file except in compliance with the License.
|
---|
8 | # You may obtain a copy of the License at
|
---|
9 | #
|
---|
10 | # http://www.apache.org/licenses/LICENSE-2.0
|
---|
11 | #
|
---|
12 | # Unless required by applicable law or agreed to in writing, software
|
---|
13 | # distributed under the License is distributed on an "AS IS" BASIS,
|
---|
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
15 | # See the License for the specific language governing permissions and
|
---|
16 | # limitations under the License.
|
---|
17 |
|
---|
18 | # ----- CONFIGURE HERE
|
---|
19 |
|
---|
20 |
|
---|
21 | # -- test script in subdirectories
|
---|
22 | TESTSCRIPT=unittest.php
|
---|
23 |
|
---|
24 | # -- selected W3C testcases, to be executed by rdftestcases/$(TESTSCRIPT)
|
---|
25 | RDFTESTCASES= \
|
---|
26 | amp-in-url/test001 \
|
---|
27 | datatypes/test001 \
|
---|
28 | datatypes/test002 \
|
---|
29 | rdf-element-not-mandatory/test001 \
|
---|
30 | rdfms-reification-required/test001 \
|
---|
31 | rdfms-uri-substructure/test001 \
|
---|
32 | rdfms-xmllang/test001 \
|
---|
33 | rdfms-xmllang/test002 \
|
---|
34 | rdfms-xmllang/test003 \
|
---|
35 | rdfms-xmllang/test004 \
|
---|
36 | rdfms-xmllang/test005 \
|
---|
37 | rdfms-xmllang/test006 \
|
---|
38 | unrecognised-xml-attributes/test001 \
|
---|
39 | unrecognised-xml-attributes/test002 \
|
---|
40 | rdf-charmod-literals/test001 \
|
---|
41 | rdf-charmod-uris/test001 \
|
---|
42 | rdf-charmod-uris/test002 \
|
---|
43 | rdf-containers-syntax-vs-schema/test001 \
|
---|
44 | rdf-containers-syntax-vs-schema/test002 \
|
---|
45 | rdf-containers-syntax-vs-schema/test003 \
|
---|
46 | rdf-containers-syntax-vs-schema/test004 \
|
---|
47 | rdf-containers-syntax-vs-schema/test006 \
|
---|
48 | rdf-containers-syntax-vs-schema/test007 \
|
---|
49 | rdf-containers-syntax-vs-schema/test008 \
|
---|
50 | rdf-ns-prefix-confusion/test0001 \
|
---|
51 | rdf-ns-prefix-confusion/test0003 \
|
---|
52 | rdf-ns-prefix-confusion/test0004 \
|
---|
53 | rdf-ns-prefix-confusion/test0005 \
|
---|
54 | rdf-ns-prefix-confusion/test0006 \
|
---|
55 | rdf-ns-prefix-confusion/test0009 \
|
---|
56 | rdf-ns-prefix-confusion/test0010 \
|
---|
57 | rdf-ns-prefix-confusion/test0011 \
|
---|
58 | rdf-ns-prefix-confusion/test0012 \
|
---|
59 | rdf-ns-prefix-confusion/test0013 \
|
---|
60 | rdf-ns-prefix-confusion/test0014 \
|
---|
61 | rdfms-difference-between-ID-and-about/test1 \
|
---|
62 | rdfms-difference-between-ID-and-about/test2 \
|
---|
63 | rdfms-difference-between-ID-and-about/test3 \
|
---|
64 | rdfms-duplicate-member-props/test001 \
|
---|
65 | rdfms-empty-property-elements/test001 \
|
---|
66 | rdfms-empty-property-elements/test002 \
|
---|
67 | rdfms-empty-property-elements/test003 \
|
---|
68 | rdfms-empty-property-elements/test004 \
|
---|
69 | rdfms-empty-property-elements/test005 \
|
---|
70 | rdfms-empty-property-elements/test006 \
|
---|
71 | rdfms-empty-property-elements/test007 \
|
---|
72 | rdfms-empty-property-elements/test008 \
|
---|
73 | rdfms-empty-property-elements/test009 \
|
---|
74 | rdfms-empty-property-elements/test010 \
|
---|
75 | rdfms-empty-property-elements/test011 \
|
---|
76 | rdfms-empty-property-elements/test012 \
|
---|
77 | rdfms-empty-property-elements/test013 \
|
---|
78 | rdfms-empty-property-elements/test014 \
|
---|
79 | rdfms-empty-property-elements/test015 \
|
---|
80 | rdfms-empty-property-elements/test016 \
|
---|
81 | rdfms-empty-property-elements/test017 \
|
---|
82 | rdfms-identity-anon-resources/test001 \
|
---|
83 | rdfms-identity-anon-resources/test002 \
|
---|
84 | rdfms-identity-anon-resources/test003 \
|
---|
85 | rdfms-identity-anon-resources/test004 \
|
---|
86 | rdfms-identity-anon-resources/test005 \
|
---|
87 | rdfms-not-id-and-resource-attr/test001 \
|
---|
88 | rdfms-not-id-and-resource-attr/test002 \
|
---|
89 | rdfms-not-id-and-resource-attr/test004 \
|
---|
90 | rdfms-not-id-and-resource-attr/test005 \
|
---|
91 | rdfms-para196/test001 \
|
---|
92 | rdfms-rdf-names-use/test-001 \
|
---|
93 | rdfms-rdf-names-use/test-002 \
|
---|
94 | rdfms-rdf-names-use/test-003 \
|
---|
95 | rdfms-rdf-names-use/test-004 \
|
---|
96 | rdfms-rdf-names-use/test-005 \
|
---|
97 | rdfms-rdf-names-use/test-006 \
|
---|
98 | rdfms-rdf-names-use/test-007 \
|
---|
99 | rdfms-rdf-names-use/test-008 \
|
---|
100 | rdfms-rdf-names-use/test-009 \
|
---|
101 | rdfms-rdf-names-use/test-010 \
|
---|
102 | rdfms-rdf-names-use/test-011 \
|
---|
103 | rdfms-rdf-names-use/test-012 \
|
---|
104 | rdfms-rdf-names-use/test-013 \
|
---|
105 | rdfms-rdf-names-use/test-014 \
|
---|
106 | rdfms-rdf-names-use/test-015 \
|
---|
107 | rdfms-rdf-names-use/test-016 \
|
---|
108 | rdfms-rdf-names-use/test-017 \
|
---|
109 | rdfms-rdf-names-use/test-018 \
|
---|
110 | rdfms-rdf-names-use/test-019 \
|
---|
111 | rdfms-rdf-names-use/test-020 \
|
---|
112 | rdfms-rdf-names-use/test-021 \
|
---|
113 | rdfms-rdf-names-use/test-022 \
|
---|
114 | rdfms-rdf-names-use/test-023 \
|
---|
115 | rdfms-rdf-names-use/test-024 \
|
---|
116 | rdfms-rdf-names-use/test-025 \
|
---|
117 | rdfms-rdf-names-use/test-026 \
|
---|
118 | rdfms-rdf-names-use/test-027 \
|
---|
119 | rdfms-rdf-names-use/test-028 \
|
---|
120 | rdfms-rdf-names-use/test-029 \
|
---|
121 | rdfms-rdf-names-use/test-030 \
|
---|
122 | rdfms-rdf-names-use/test-031 \
|
---|
123 | rdfms-rdf-names-use/test-032 \
|
---|
124 | rdfms-rdf-names-use/test-033 \
|
---|
125 | rdfms-rdf-names-use/test-034 \
|
---|
126 | rdfms-rdf-names-use/test-035 \
|
---|
127 | rdfms-rdf-names-use/test-036 \
|
---|
128 | rdfms-rdf-names-use/test-037 \
|
---|
129 | rdfms-seq-representation/test001 \
|
---|
130 | rdfms-syntax-incomplete/test001 \
|
---|
131 | rdfms-syntax-incomplete/test002 \
|
---|
132 | rdfms-syntax-incomplete/test003 \
|
---|
133 | rdfms-syntax-incomplete/test004 \
|
---|
134 | xmlbase/test001 \
|
---|
135 | xmlbase/test002 \
|
---|
136 | xmlbase/test003 \
|
---|
137 | xmlbase/test004 \
|
---|
138 | xmlbase/test006 \
|
---|
139 | xmlbase/test007 \
|
---|
140 | xmlbase/test008 \
|
---|
141 | xmlbase/test009 \
|
---|
142 | xmlbase/test010 \
|
---|
143 | xmlbase/test011 \
|
---|
144 | xmlbase/test013 \
|
---|
145 | xmlbase/test014 \
|
---|
146 | # FAIL rdfms-xml-literal-namespaces/test001 \
|
---|
147 | # FAIL rdfms-xml-literal-namespaces/test002 \
|
---|
148 | rdfs-domain-and-range/test001 \
|
---|
149 | rdfs-domain-and-range/test002 \
|
---|
150 | rdfs-no-cycles-in-subClassOf/test001 \
|
---|
151 | rdfs-no-cycles-in-subPropertyOf/test001 \
|
---|
152 | rdfs-subPropertyOf-semantics/test001 \
|
---|
153 |
|
---|
154 |
|
---|
155 | # failing tescases, to be examined by maintainer
|
---|
156 | RDFTESTCASES_FAIL= \
|
---|
157 | xml-canon/test001 \
|
---|
158 | rdfms-xml-literal-namespaces/test001 \
|
---|
159 | rdfms-xml-literal-namespaces/test002 \
|
---|
160 |
|
---|
161 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
---|
162 |
|
---|
163 | # determine os dependent values
|
---|
164 | ifeq ($(OS), Windows_NT)
|
---|
165 | CAT=type
|
---|
166 | else
|
---|
167 | CAT=cat
|
---|
168 | endif
|
---|
169 |
|
---|
170 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
---|
171 |
|
---|
172 | # --- phony targets
|
---|
173 |
|
---|
174 | .PHONY: help all lib rdf run
|
---|
175 |
|
---|
176 | # - - - - - - - - - - - - - - - - - -
|
---|
177 |
|
---|
178 | help:
|
---|
179 | @$(CAT) help.txt
|
---|
180 |
|
---|
181 | all: lib rdf
|
---|
182 |
|
---|
183 | list:
|
---|
184 | @echo Available library testcases:
|
---|
185 | ifeq ($(OS), Windows_NT)
|
---|
186 | -@for /d %%c in (*_*) do @echo %%c
|
---|
187 | else
|
---|
188 | -@for c in `find . -maxdepth 1 -type d -path "./*_*"` ; do echo " " $$c; done
|
---|
189 | endif
|
---|
190 | @echo Available RDF Testcases:
|
---|
191 | ifeq ($(OS), Windows_NT)
|
---|
192 | -@for /d %%c in ($(RDFTESTCASES)) do @echo %%c
|
---|
193 | else
|
---|
194 | -@for c in $(RDFTESTCASES); do echo " " $$c; done
|
---|
195 | endif
|
---|
196 |
|
---|
197 |
|
---|
198 | # - - - - - - - - - - - - - - - - - -
|
---|
199 |
|
---|
200 | # execute all or selected library specific testcases
|
---|
201 |
|
---|
202 | lib:
|
---|
203 | ifeq ($(TESTCASE),)
|
---|
204 | ifeq ($(OS), Windows_NT)
|
---|
205 | @for /d %%c in (*_*) do @make -s TESTCASE=%%c SUBDIR=%%c run
|
---|
206 | else
|
---|
207 | @for c in `find . -maxdepth 1 -type d -path "./*_*"`; do make -s TESTCASE=$$c SUBDIR=$$c run; done
|
---|
208 | endif
|
---|
209 | else
|
---|
210 | @make -s TESTCASE=$(TESTCASE) SUBDIR=$(TESTCASE) run
|
---|
211 | endif
|
---|
212 |
|
---|
213 | # - - - - - - - - - - - - - - - - - -
|
---|
214 |
|
---|
215 | # execute all or selected W3C RDF testcases
|
---|
216 |
|
---|
217 | rdf:
|
---|
218 | ifeq ($(TESTCASE),)
|
---|
219 | ifeq ($(OS), Windows_NT)
|
---|
220 | -@for /d %%c in ($(RDFTESTCASES)) do @make -s TESTCASE=%%c SUBDIR=rdftestcases run
|
---|
221 | else
|
---|
222 | -@for d in $(RDFTESTCASES); do make -s TESTCASE=$$d SUBDIR=rdftestcases run; done
|
---|
223 | endif
|
---|
224 | else
|
---|
225 | @make -s TESTCASE=$(TESTCASE) SUBDIR=rdftestcases run
|
---|
226 | endif
|
---|
227 |
|
---|
228 | # - - - - - - - - - - - - - - - - - -
|
---|
229 |
|
---|
230 | # for maintainers only
|
---|
231 | # execute all failing W3C RDF testcases
|
---|
232 |
|
---|
233 | rdffail:
|
---|
234 | ifeq ($(OS), Windows_NT)
|
---|
235 | -@for /d %%c in ($(RDFTESTCASES_FAIL)) do @make -s TESTCASE=%%c SUBDIR=rdftestcases run
|
---|
236 | else
|
---|
237 | -@for d in $(RDFTESTCASES_FAIL); do make -s TESTCASE=$$d SUBDIR=rdftestcases run; done
|
---|
238 | endif
|
---|
239 |
|
---|
240 | # - - - - - - - - - - - - - - - - - -
|
---|
241 |
|
---|
242 | # this target to change into the subdirectory of
|
---|
243 | # the testcase and execute it
|
---|
244 | run:
|
---|
245 | @echo =====================================
|
---|
246 | @cd $(SUBDIR) && phpunit $(TESTSCRIPT)
|
---|