source: php/trunk/unittest/makefile@ 7

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

rdfint

  • added support for executing single testcase
  • added help, displaying help is now the default action
  • Property svn:eol-style set to native
File size: 1.5 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
20TESTSCRIPT=unittest.php
21
22# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
23
24# determine os dependent values
25ifeq ($(OS), Windows_NT)
26CAT=type
27else
28CAT=cat
29endif
30
31# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
32
33# @for i in `find . -maxdepth 1 -type d` do echo $(i)
34# --- phony targets
35
36.PHONY: help all changedir
37
38
39ifneq ($(TESTCASE),)
40all:
41 -@make -s SUBDIR=$(TESTCASE) changedir
42else
43
44help:
45 @$(CAT) help.txt
46
47ifeq ($(OS), Windows_NT)
48all:
49 -@for /d %%a in (*) do @make -s SUBDIR=%%a changedir
50else
51all:
52 -@for d in `find . -maxdepth 1 -type d`; do make -s SUBDIR=$$d changedir; done
53endif
54endif
55
56changedir:
57ifneq ($(SUBDIR), .)
58ifneq ($(SUBDIR), ./.svn)
59 make -s --directory $(SUBDIR) SUBDIR=$(SUBDIR) -f ../makefile run
60endif
61endif
62
63run:
64 @echo =====================================
65 @echo $(SUBDIR)
66 @phpunit $(TESTSCRIPT)
Note: See TracBrowser for help on using the repository browser.