Changeset 9
- Timestamp:
- Jul 11, 2011, 8:04:47 PM (14 years ago)
- Location:
- php/trunk/unittest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
php/trunk/unittest/help.txt
r5 r9 4 4 Valid targets/symbols: 5 5 6 help - display this help 7 all - execute all unittests 8 TESTCASE=<name> - execute specific testcase 6 help - display this help 7 list - list names of testcases 9 8 9 all - execute all testcases (lib && rdf) 10 11 lib - execute all library testcases 12 lib TESTCASE=<name> - execute specified library testcase 13 14 rdf - execute all of selected RDF testcases of W3C 15 rdf TESTCASE=<name> - execute specified RDF testcase 16 17 18 -
php/trunk/unittest/makefile
r5 r9 16 16 # limitations under the License. 17 17 18 # CONFIGURE HERE18 # ----- CONFIGURE HERE 19 19 20 21 # -- test script in subdirectories 20 22 TESTSCRIPT=unittest.php 23 24 # -- selected W3C testcases, to be executed by rdftestcases/$(TESTSCRIPT) 25 RDFTESTCASES= \ 26 amp-in-url/test001 \ 27 datatypes/test001 \ 21 28 22 29 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - … … 31 38 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 32 39 33 # @for i in `find . -maxdepth 1 -type d` do echo $(i)34 40 # --- phony targets 35 41 36 .PHONY: help all changedir42 .PHONY: help all lib rdf changedir 37 43 38 39 ifneq ($(TESTCASE),) 40 all: 41 -@make -s SUBDIR=$(TESTCASE) changedir 42 else 44 # - - - - - - - - - - - - - - - - - - 43 45 44 46 help: 45 47 @$(CAT) help.txt 46 48 49 list: 50 @echo Available library testcases: 47 51 ifeq ($(OS), Windows_NT) 48 all: 49 -@for /d %%a in (*) do @make -s SUBDIR=%%a changedir 52 -@for /d %%c in (*_*) do @echo %%c 50 53 else 51 all: 52 -@for d in `find . -maxdepth 1 -type d`; do make -s SUBDIR=$$d changedir; done 54 -@for c in `find . -maxdepth 1 -type d -path "./*_*"` ; do echo " " $$c; done 53 55 endif 56 @echo Available RDF Testcases: 57 ifeq ($(OS), Windows_NT) 58 -@for /d %%c in ($(RDFTESTCASES)) do @echo %%c 59 else 60 -@for c in $(RDFTESTCASES); do echo " " $$c; done 54 61 endif 55 62 63 64 all: lib rdf 65 66 # - - - - - - - - - - - - - - - - - - 67 68 # execute library specifc testcases 69 70 lib: 71 ifeq ($(TESTCASE),) 72 ifeq ($(OS), Windows_NT) 73 -@for /d %%c in (*) do @make -s TESTCASE=%%c SUBDIR=%%c changedir 74 else 75 -@for c in `find . -maxdepth 1 -type d -path "./*_*"`; do make -s TESTCASE=$$c SUBDIR=$$c changedir; done 76 endif 77 else 78 -@make -s TESTCASE=$(TESTCASE) SUBDIR=$(TESTCASE) changedir 79 endif 80 81 # - - - - - - - - - - - - - - - - - - 82 83 # execute selected W3C RDF testcases 84 85 rdf: 86 ifeq ($(TESTCASE),) 87 ifeq ($(OS), Windows_NT) 88 -@for /d %%c in ($(RDFTESTCASES)) do @make -s TESTCASE=%%c SUBDIR=rdftestcases changedir 89 else 90 -@for d in $(RDFTESTCASES); do make -s TESTCASE=$$d SUBDIR=rdftestcases changedir; done 91 endif 92 else 93 @make -s TESTCASE=$(TESTCASE) SUBDIR=rdftestcases changedir 94 endif 95 96 # - - - - - - - - - - - - - - - - - - 97 98 # this target to change into the subdirectory of the testcase 56 99 changedir: 57 ifneq ($(SUBDIR), .) 58 ifneq ($(SUBDIR), ./.svn) 59 make -s --directory $(SUBDIR) SUBDIR=$(SUBDIR) -f ../makefile run 60 endif 61 endif 100 make -s --directory $(SUBDIR) TESTCASE=$(TESTCASE) -f ../makefile run 101 102 # - - - - - - - - - - - - - - - - - - 103 104 # this target to finally execute the testcase 62 105 63 106 run: 64 107 @echo ===================================== 65 @echo $(SUBDIR)66 108 @phpunit $(TESTSCRIPT)
Note:
See TracChangeset
for help on using the changeset viewer.