source: php/trunk/unittest/makefile@ 9

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

rdfint

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