source: php/trunk/unittest/makefile

Last change on this file was 66, checked in by cla, 14 years ago
  • adapted main makefile to new rdftestcases makefile
  • Property svn:eol-style set to native
File size: 2.1 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# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
25
26# determine os dependent values
27ifeq ($(OS), Windows_NT)
28CAT=type
29else
30CAT=cat
31endif
32
33# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
34
35# --- phony targets
36
37.PHONY: help all lib rdf run
38
39# - - - - - - - - - - - - - - - - - -
40
41help:
42 @$(CAT) help.txt
43
44all: lib rdf
45
46list:
47 @echo Available library testcases:
48ifeq ($(OS), Windows_NT)
49 -@for /d %%c in (*_*) do @echo %%c
50else
51 -@for c in `find . -maxdepth 1 -type d -path "./*_*"` ; do echo " " $$c; done
52endif
53 @echo Available RDF Testcases:
54 @make -s -C rdftestcases list
55
56# - - - - - - - - - - - - - - - - - -
57
58# execute all or selected library specific testcases
59
60lib:
61ifeq ($(TESTCASE),)
62ifeq ($(OS), Windows_NT)
63 @for /d %%c in (*_*) do @make -s TESTCASE=%%c SUBDIR=%%c run
64else
65 @for c in `find . -maxdepth 1 -type d -path "./*_*"`; do make -s TESTCASE=$$c SUBDIR=$$c run; done
66endif
67else
68 @make -s TESTCASE=$(TESTCASE) SUBDIR=$(TESTCASE) run
69endif
70
71# - - - - - - - - - - - - - - - - - -
72
73# execute all or selected W3C RDF testcases
74
75rdf:
76ifeq ($(TESTCASE),)
77 @make -s -C rdftestcases all
78else
79 @make -s -C rdftestcases TESTCASE=$(TESTCASE)
80endif
81
82# - - - - - - - - - - - - - - - - - -
83
84# this target to change into the subdirectory of
85# the testcase and execute it
86run:
87 @echo =====================================
88 @cd $(SUBDIR) && phpunit $(TESTSCRIPT)
Note: See TracBrowser for help on using the repository browser.