source: php/trunk/unittest/makefile@ 57

Last change on this file since 57 was 57, checked in by cla, 14 years ago

rdfint

  • added code to unitest for RDF Test Cases

-- implemented _reIdentifyBlankNode() to unify blank nodes. This eliminates the problem that blank nodes get different identifiers, leading to comparison errors
-- added _writeErrorData to write source and result data if testcase fails (NOTE: data gets not cleaned up!!!)

  • testcases 'rdf-element-not-mandatory/test001' and 'rdfms-uri-substructure/test001' from RDFTESTCASES_FAIL to RDFTESTCASES
  • Property svn:eol-style set to native
File size: 3.3 KB
Line 
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
22TESTSCRIPT=unittest.php
23
24# -- selected W3C testcases, to be executed by rdftestcases/$(TESTSCRIPT)
25RDFTESTCASES= \
26amp-in-url/test001 \
27datatypes/test001 \
28datatypes/test002 \
29rdf-element-not-mandatory/test001 \
30rdfms-reification-required/test001 \
31rdfms-uri-substructure/test001 \
32rdfms-xmllang/test001 \
33rdfms-xmllang/test002 \
34rdfms-xmllang/test003 \
35rdfms-xmllang/test004 \
36rdfms-xmllang/test005 \
37rdfms-xmllang/test006 \
38unrecognised-xml-attributes/test001 \
39unrecognised-xml-attributes/test002 \
40rdf-charmod-uris/test001 \
41rdf-charmod-uris/test002 \
42
43
44# failing tescases, to be examined by maintainer
45RDFTESTCASES_FAIL= \
46xml-canon/test001 \
47rdf-charmod-literals/test001 \
48
49# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
50
51# determine os dependent values
52ifeq ($(OS), Windows_NT)
53CAT=type
54else
55CAT=cat
56endif
57
58# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
59
60# --- phony targets
61
62.PHONY: help all lib rdf run
63
64# - - - - - - - - - - - - - - - - - -
65
66help:
67 @$(CAT) help.txt
68
69all: lib rdf
70
71list:
72 @echo Available library testcases:
73ifeq ($(OS), Windows_NT)
74 -@for /d %%c in (*_*) do @echo %%c
75else
76 -@for c in `find . -maxdepth 1 -type d -path "./*_*"` ; do echo " " $$c; done
77endif
78 @echo Available RDF Testcases:
79ifeq ($(OS), Windows_NT)
80 -@for /d %%c in ($(RDFTESTCASES)) do @echo %%c
81else
82 -@for c in $(RDFTESTCASES); do echo " " $$c; done
83endif
84
85
86# - - - - - - - - - - - - - - - - - -
87
88# execute all or selected library specific testcases
89
90lib:
91ifeq ($(TESTCASE),)
92ifeq ($(OS), Windows_NT)
93 @for /d %%c in (*) do @make -s TESTCASE=%%c SUBDIR=%%c run
94else
95 @for c in `find . -maxdepth 1 -type d -path "./*_*"`; do make -s TESTCASE=$$c SUBDIR=$$c run; done
96endif
97else
98 @make -s TESTCASE=$(TESTCASE) SUBDIR=$(TESTCASE) run
99endif
100
101# - - - - - - - - - - - - - - - - - -
102
103# execute all or selected W3C RDF testcases
104
105rdf:
106ifeq ($(TESTCASE),)
107ifeq ($(OS), Windows_NT)
108 -@for /d %%c in ($(RDFTESTCASES)) do @make -s TESTCASE=%%c SUBDIR=rdftestcases run
109else
110 -@for d in $(RDFTESTCASES); do make -s TESTCASE=$$d SUBDIR=rdftestcases run; done
111endif
112else
113 @make -s TESTCASE=$(TESTCASE) SUBDIR=rdftestcases run
114endif
115
116# - - - - - - - - - - - - - - - - - -
117
118# for maintainers only
119# execute all failing W3C RDF testcases
120
121rdffail:
122ifeq ($(OS), Windows_NT)
123 -@for /d %%c in ($(RDFTESTCASES_FAIL)) do @make -s TESTCASE=%%c SUBDIR=rdftestcases run
124else
125 -@for d in $(RDFTESTCASES_FAIL); do make -s TESTCASE=$$d SUBDIR=rdftestcases run; done
126endif
127
128# - - - - - - - - - - - - - - - - - -
129
130# this target to change into the subdirectory of
131# the testcase and execute it
132run:
133 @echo =====================================
134 @cd $(SUBDIR) && phpunit $(TESTSCRIPT)
Note: See TracBrowser for help on using the repository browser.