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