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