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
RevLine 
[2]1
[3]2# RDFInt.php - RDF Interfaces for PHP
[2]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
[9]18# ----- CONFIGURE HERE
[2]19
[9]20
21# -- test script in subdirectories
[2]22TESTSCRIPT=unittest.php
23
24# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
25
[5]26# determine os dependent values
27ifeq ($(OS), Windows_NT)
28CAT=type
29else
30CAT=cat
31endif
32
33# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
34
[2]35# --- phony targets
36
[49]37.PHONY: help all lib rdf run
[2]38
[9]39# - - - - - - - - - - - - - - - - - -
[5]40
41help:
42 @$(CAT) help.txt
[49]43
44all: lib rdf
45
[9]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:
[66]54 @make -s -C rdftestcases list
[5]55
[9]56# - - - - - - - - - - - - - - - - - -
57
[49]58# execute all or selected library specific testcases
[9]59
60lib:
61ifeq ($(TESTCASE),)
[2]62ifeq ($(OS), Windows_NT)
[59]63 @for /d %%c in (*_*) do @make -s TESTCASE=%%c SUBDIR=%%c run
[2]64else
[49]65 @for c in `find . -maxdepth 1 -type d -path "./*_*"`; do make -s TESTCASE=$$c SUBDIR=$$c run; done
[2]66endif
[9]67else
[49]68 @make -s TESTCASE=$(TESTCASE) SUBDIR=$(TESTCASE) run
[5]69endif
[2]70
[9]71# - - - - - - - - - - - - - - - - - -
72
[49]73# execute all or selected W3C RDF testcases
[9]74
75rdf:
76ifeq ($(TESTCASE),)
[66]77 @make -s -C rdftestcases all
[9]78else
[66]79 @make -s -C rdftestcases TESTCASE=$(TESTCASE)
[2]80endif
81
[9]82# - - - - - - - - - - - - - - - - - -
83
[49]84# this target to change into the subdirectory of
85# the testcase and execute it
[2]86run:
87 @echo =====================================
[49]88 @cd $(SUBDIR) && phpunit $(TESTSCRIPT)
Note: See TracBrowser for help on using the repository browser.