com phpruntests: Improved build automation.: Doxyfile build.xml
| From: | David Soria Parra | Date: | Mon, 20 Jul 2009 14:48:02 +0000 |
| Subject: | com phpruntests: Improved build automation.: Doxyfile build.xml | ||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-66319@lists.php.net to get a copy of this message | ||
Commit: 41cc6451cc5c13403c8f5ade2aa17d8374726fae
Author: Stefan Priebsch <spriebsch@php.net> Mon, 20 Jul 2009 14:48:02 +0000
Parents: a0e2fa43ea0312ceb4a532da62e18cd24b0704bd
Branches: master
Link: http://git.php.net/?p=phpruntests.git;a=commitdiff;h=41cc6451cc5c13403c8f5ade2aa17d8374726fae
Log:
Improved build automation.
Changed paths:
M Doxyfile
M build.xml
diff --git a/Doxyfile b/Doxyfile index 05f8feb..4e12ec7 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NUMBER = # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = docs +OUTPUT_DIRECTORY = _docs # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output @@ -647,7 +647,7 @@ FILTER_SOURCE_FILES = NO # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. -SOURCE_BROWSER = NO +SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. @@ -658,19 +658,19 @@ INLINE_SOURCES = NO # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. -STRIP_CODE_COMMENTS = YES +STRIP_CODE_COMMENTS = NO # If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. -REFERENCED_BY_RELATION = NO +REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. -REFERENCES_RELATION = NO +REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from @@ -691,7 +691,7 @@ USE_HTAGS = NO # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. -VERBATIM_HEADERS = YES +VERBATIM_HEADERS = NO #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index @@ -701,7 +701,7 @@ VERBATIM_HEADERS = YES # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. -ALPHABETICAL_INDEX = NO +ALPHABETICAL_INDEX = YES # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns @@ -867,7 +867,7 @@ ENUM_VALUES_PER_LINE = 4 # releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE # respectively. -GENERATE_TREEVIEW = NONE +GENERATE_TREEVIEW = FRAME # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree @@ -1117,7 +1117,7 @@ PERLMOD_MAKEVAR_PREFIX = # evaluate all C-preprocessor directives found in the sources and include # files. -ENABLE_PREPROCESSING = YES +ENABLE_PREPROCESSING = NO # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional @@ -1135,7 +1135,7 @@ EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. -SEARCH_INCLUDES = YES +SEARCH_INCLUDES = NO # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by @@ -1321,7 +1321,7 @@ INCLUDED_BY_GRAPH = YES # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. -CALL_GRAPH = NO +CALL_GRAPH = YES # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function @@ -1329,7 +1329,7 @@ CALL_GRAPH = NO # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. -CALLER_GRAPH = NO +CALLER_GRAPH = YES # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. diff --git a/build.xml b/build.xml index 29025c3..03d518d 100755 --- a/build.xml +++ b/build.xml @@ -1,23 +1,35 @@ <?xml version="1.0"?> -<project name="runtests" default="test" basedir="."> +<project name="runtests" default="qa" basedir="."> - <property name="build.dir" value="_build" /> + <target name="clean"> + <delete dir="_compare" /> + <delete dir="_coverage" /> + <delete dir="_docs" /> + <delete dir="_sniff" /> + <delete dir="QA/ext" /> + <delete dir="QA/sapi" /> + <delete dir="QA/tests" /> + <delete dir="QA/Zend" /> + </target> + + <target name="qa" depends="lint, test, coverage, compare, doc" description="Perform quality assurance."> + </target> - <target name="doc" description="Create API documentation in docs/html/."> - <delete dir="docs" /> - <exec command="doxygen" /> + <target name="doc" description="Create API documentation in _docs/html/."> + <delete dir="_docs" /> + <exec command="doxygen" checkReturn="true"/> </target> - <target name="lint" description="Run a lint check on all PHP files."> - <phplint> + <target name="lint" description="Lint check all PHP files."> + <phplint haltonfailure="true"> <fileset dir="src"> <include name="*.php"/> <include name="**/*.php"/> </fileset> </phplint> - <phplint> + <phplint haltonfailure="true"> <fileset dir="tests"> <include name="*.php"/> <include name="**/*.php"/> @@ -26,32 +38,37 @@ </target> <target name="test" description="Run all unit tests."> - <delete dir="coverage" /> - <exec command="phpunit --coverage-html coverage tests" passthru="true" /> + <delete dir="_coverage" /> + <exec command="phpunit tests" passthru="true" checkReturn="true"/> </target> - <target name="sniff" description="Run all PHP_CodeSniffer sniffs."> - <exec command="phpcs -n --extensions=php --standard=${project.basedir}/cs/all src" passthru="true" /> + <target name="coverage" description="Create code coverage report in _coverage."> + <delete dir="_coverage" /> + <exec command="phpunit --coverage-html _coverage tests" /> </target> - <target name="sniff-compatibility" description="Run PHP_CodeSniffer compatibility sniffs."> - <exec command="phpcs -n --extensions=php --standard=${project.basedir}/cs/compatibility src" passthru="true" /> - </target> + <target name="compare" description="Old/New comparison of phpt results."> + <fail unless="php" message="Path to PHP executable not defined, use -Dphp=/path/to/php" /> - <target name="sniff-formatting" description="Run PHP_CodeSniffer formatting sniffs."> - <exec command="phpcs -n --extensions=php --standard=${project.basedir}/cs/formatting src" passthru="true" /> - </target> + <delete dir="_compare" /> + <mkdir dir="_compare" /> - <target name="sniff-naming" description="Run PHP_CodeSniffer naming sniffs."> - <exec command="phpcs -n --extensions=php --standard=${project.basedir}/cs/naming src" passthru="true" /> - </target> + <delete dir="QA/ext" /> + <delete dir="QA/sapi" /> + <delete dir="QA/tests" /> + <delete dir="QA/Zend" /> - <target name="sniff-documentation" description="Run PHP_CodeSniffer documentation sniffs."> - <exec command="phpcs -n --extensions=php --standard=${project.basedir}/cs/documentation src" passthru="true" /> + <exec command="tar xfz QATESTS.tgz" dir="QA" passthru="true" /> + <exec command="${php} run-tests.php -p ${php} Zend ext sapi tests > ${project.basedir}/_compare/old.out" dir="QA" passthru="true" checkReturn="true"/> + <exec command="${php} ${project.basedir}/src/run-tests.php -p ${php} -o csv -s ${project.basedir}/_compare/new.out QA" dir="${project.basedir}" passthru="true" checkReturn="true" /> + <exec command="${php} QA/compareNewOld.php ${project.basedir}/_compare/new.out ${project.basedir}/_compare/old.out QA > ${project.basedir}/_compare/compare.out" dir="${project.basedir}" passthru="true" checkReturn="true"/> </target> - <target name="sniff-guidelines" description="Run PHP_CodeSniffer guidelines sniffs."> - <exec command="phpcs -n --extensions=php --standard=${project.basedir}/cs/guidelines src" passthru="true" /> + <target name="sniff" description="Run all PHP_CodeSniffer sniffs."> + <delete dir="_sniff" /> + <mkdir dir="_sniff" /> + + <exec command="phpcs -n --extensions=php --report=full src > ${project.basedir}/_sniff/sniff.out" passthru="true"/> </target> </project>
diff --git a/Doxyfile b/Doxyfile index 05f8feb..4e12ec7 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NUMBER = # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = docs +OUTPUT_DIRECTORY = _docs # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output @@ -647,7 +647,7 @@ FILTER_SOURCE_FILES = NO # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. -SOURCE_BROWSER = NO +SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. @@ -658,19 +658,19 @@ INLINE_SOURCES = NO # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. -STRIP_CODE_COMMENTS = YES +STRIP_CODE_COMMENTS = NO # If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. -REFERENCED_BY_RELATION = NO +REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. -REFERENCES_RELATION = NO +REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from @@ -691,7 +691,7 @@ USE_HTAGS = NO # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. -VERBATIM_HEADERS = YES +VERBATIM_HEADERS = NO #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index @@ -701,7 +701,7 @@ VERBATIM_HEADERS = YES # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. -ALPHABETICAL_INDEX = NO +ALPHABETICAL_INDEX = YES # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns @@ -867,7 +867,7 @@ ENUM_VALUES_PER_LINE = 4 # releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE # respectively. -GENERATE_TREEVIEW = NONE +GENERATE_TREEVIEW = FRAME # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree @@ -1117,7 +1117,7 @@ PERLMOD_MAKEVAR_PREFIX = # evaluate all C-preprocessor directives found in the sources and include # files. -ENABLE_PREPROCESSING = YES +ENABLE_PREPROCESSING = NO # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional @@ -1135,7 +1135,7 @@ EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. -SEARCH_INCLUDES = YES +SEARCH_INCLUDES = NO # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by @@ -1321,7 +1321,7 @@ INCLUDED_BY_GRAPH = YES # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. -CALL_GRAPH = NO +CALL_GRAPH = YES # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function @@ -1329,7 +1329,7 @@ CALL_GRAPH = NO # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. -CALLER_GRAPH = NO +CALLER_GRAPH = YES # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. diff --git a/build.xml b/build.xml index 29025c3..03d518d 100755 --- a/build.xml +++ b/build.xml @@ -1,23 +1,35 @@ <?xml version="1.0"?> -<project name="runtests" default="test" basedir="."> +<project name="runtests" default="qa" basedir="."> - <property name="build.dir" value="_build" /> + <target name="clean"> + <delete dir="_compare" /> + <delete dir="_coverage" /> + <delete dir="_docs" /> + <delete dir="_sniff" /> + <delete dir="QA/ext" /> + <delete dir="QA/sapi" /> + <delete dir="QA/tests" /> + <delete dir="QA/Zend" /> + </target> + + <target name="qa" depends="lint, test, coverage, compare, doc" description="Perform quality assurance."> + </target> - <target name="doc" description="Create API documentation in docs/html/."> - <delete dir="docs" /> - <exec command="doxygen" /> + <target name="doc" description="Create API documentation in _docs/html/."> + <delete dir="_docs" /> + <exec command="doxygen" checkReturn="true"/> </target> - <target name="lint" description="Run a lint check on all PHP files."> - <phplint> + <target name="lint" description="Lint check all PHP files."> + <phplint haltonfailure="true"> <fileset dir="src"> <include name="*.php"/> <include name="**/*.php"/> </fileset> </phplint> - <phplint> + <phplint haltonfailure="true"> <fileset dir="tests"> <include name="*.php"/> <include name="**/*.php"/> @@ -26,32 +38,37 @@ </target> <target name="test" description="Run all unit tests."> - <delete dir="coverage" /> - <exec command="phpunit --coverage-html coverage tests" passthru="true" /> + <delete dir="_coverage" /> + <exec command="phpunit tests" passthru="true" checkReturn="true"/> </target> - <target name="sniff" description="Run all PHP_CodeSniffer sniffs."> - <exec command="phpcs -n --extensions=php --standard=${project.basedir}/cs/all src" passthru="true" /> + <target name="coverage" description="Create code coverage report in _coverage."> + <delete dir="_coverage" /> + <exec command="phpunit --coverage-html _coverage tests" /> </target> - <target name="sniff-compatibility" description="Run PHP_CodeSniffer compatibility sniffs."> - <exec command="phpcs -n --extensions=php --standard=${project.basedir}/cs/compatibility src" passthru="true" /> - </target> + <target name="compare" description="Old/New comparison of phpt results."> + <fail unless="php" message="Path to PHP executable not defined, use -Dphp=/path/to/php" /> - <target name="sniff-formatting" description="Run PHP_CodeSniffer formatting sniffs."> - <exec command="phpcs -n --extensions=php --standard=${project.basedir}/cs/formatting src" passthru="true" /> - </target> + <delete dir="_compare" /> + <mkdir dir="_compare" /> - <target name="sniff-naming" description="Run PHP_CodeSniffer naming sniffs."> - <exec command="phpcs -n --extensions=php --standard=${project.basedir}/cs/naming src" passthru="true" /> - </target> + <delete dir="QA/ext" /> + <delete dir="QA/sapi" /> + <delete dir="QA/tests" /> + <delete dir="QA/Zend" /> - <target name="sniff-documentation" description="Run PHP_CodeSniffer documentation sniffs."> - <exec command="phpcs -n --extensions=php --standard=${project.basedir}/cs/documentation src" passthru="true" /> + <exec command="tar xfz QATESTS.tgz" dir="QA" passthru="true" /> + <exec command="${php} run-tests.php -p ${php} Zend ext sapi tests > ${project.basedir}/_compare/old.out" dir="QA" passthru="true" checkReturn="true"/> + <exec command="${php} ${project.basedir}/src/run-tests.php -p ${php} -o csv -s ${project.basedir}/_compare/new.out QA" dir="${project.basedir}" passthru="true" checkReturn="true" /> + <exec command="${php} QA/compareNewOld.php ${project.basedir}/_compare/new.out ${project.basedir}/_compare/old.out QA > ${project.basedir}/_compare/compare.out" dir="${project.basedir}" passthru="true" checkReturn="true"/> </target> - <target name="sniff-guidelines" description="Run PHP_CodeSniffer guidelines sniffs."> - <exec command="phpcs -n --extensions=php --standard=${project.basedir}/cs/guidelines src" passthru="true" /> + <target name="sniff" description="Run all PHP_CodeSniffer sniffs."> + <delete dir="_sniff" /> + <mkdir dir="_sniff" /> + + <exec command="phpcs -n --extensions=php --report=full src > ${project.basedir}/_sniff/sniff.out" passthru="true"/> </target> </project>