source: php/trunk/unittest/makefile@ 51

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

rdfint

  • added target rdffail for maintainer, to execute failing testcases that should work well (to be examined!).

This target is NOT documented in the help text

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