source: php/trunk/unittest/makefile@ 49

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

rdfint

  • added more w3c RDF testcases
  • eliminated extra target changedir and with it one make call level
  • Property svn:eol-style set to native
File size: 2.8 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
41# determine os dependent values
42ifeq ($(OS), Windows_NT)
43CAT=type
44else
45CAT=cat
46endif
47
48# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
49
50# --- phony targets
51
52.PHONY: help all lib rdf run
53
54# - - - - - - - - - - - - - - - - - -
55
56help:
57 @$(CAT) help.txt
58
59all: lib rdf
60
61list:
62 @echo Available library testcases:
63ifeq ($(OS), Windows_NT)
64 -@for /d %%c in (*_*) do @echo %%c
65else
66 -@for c in `find . -maxdepth 1 -type d -path "./*_*"` ; do echo " " $$c; done
67endif
68 @echo Available RDF Testcases:
69ifeq ($(OS), Windows_NT)
70 -@for /d %%c in ($(RDFTESTCASES)) do @echo %%c
71else
72 -@for c in $(RDFTESTCASES); do echo " " $$c; done
73endif
74
75
76# - - - - - - - - - - - - - - - - - -
77
78# execute all or selected library specific testcases
79
80lib:
81ifeq ($(TESTCASE),)
82ifeq ($(OS), Windows_NT)
83 @for /d %%c in (*) do @make -s TESTCASE=%%c SUBDIR=%%c run
84else
85 @for c in `find . -maxdepth 1 -type d -path "./*_*"`; do make -s TESTCASE=$$c SUBDIR=$$c run; done
86endif
87else
88 @make -s TESTCASE=$(TESTCASE) SUBDIR=$(TESTCASE) run
89endif
90
91# - - - - - - - - - - - - - - - - - -
92
93# execute all or selected W3C RDF testcases
94
95rdf:
96ifeq ($(TESTCASE),)
97ifeq ($(OS), Windows_NT)
98 -@for /d %%c in ($(RDFTESTCASES)) do @make -s TESTCASE=%%c SUBDIR=rdftestcases run
99else
100 -@for d in $(RDFTESTCASES); do make -s TESTCASE=$$d SUBDIR=rdftestcases run; done
101endif
102else
103 @make -s TESTCASE=$(TESTCASE) SUBDIR=rdftestcases run
104endif
105
106# - - - - - - - - - - - - - - - - - -
107
108# this target to change into the subdirectory of
109# the testcase and execute it
110run:
111 @echo =====================================
112 @cd $(SUBDIR) && phpunit $(TESTSCRIPT)
Note: See TracBrowser for help on using the repository browser.