make debugging and coverage separate settings
This commit is contained in:
parent
9257decc50
commit
304c479dba
2 changed files with 5 additions and 4 deletions
|
@ -808,14 +808,14 @@ function _end_cache() {
|
|||
* Code coverage *
|
||||
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
function _start_debug() {
|
||||
function _start_coverage() {
|
||||
if(function_exists("xdebug_start_code_coverage")) {
|
||||
#xdebug_start_code_coverage(XDEBUG_CC_UNUSED|XDEBUG_CC_DEAD_CODE);
|
||||
xdebug_start_code_coverage(XDEBUG_CC_UNUSED);
|
||||
}
|
||||
}
|
||||
|
||||
function _end_debug() {
|
||||
function _end_coverage() {
|
||||
if(function_exists("xdebug_get_code_coverage")) {
|
||||
if(!file_exists("data/coverage")) mkdir("data/coverage");
|
||||
$n = 0;
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
|
||||
// set up and purify the environment
|
||||
define("DEBUG", true);
|
||||
define("COVERAGE", true);
|
||||
define("CACHE_MEMCACHE", false);
|
||||
define("CACHE_DIR", false);
|
||||
define("SCORE_VERSION", 's2hack');
|
||||
|
@ -64,7 +65,7 @@ if(!file_exists("config.php")) {
|
|||
|
||||
require_once "config.php";
|
||||
require_once "core/util.inc.php";
|
||||
if(DEBUG) {_start_debug();}
|
||||
if(COVERAGE) {_start_coverage();}
|
||||
_version_check();
|
||||
_sanitise_environment();
|
||||
_start_cache();
|
||||
|
@ -148,5 +149,5 @@ catch(Exception $e) {
|
|||
</html>
|
||||
EOD;
|
||||
}
|
||||
if(DEBUG) {_end_debug();}
|
||||
if(COVERAGE) {_end_coverage();}
|
||||
?>
|
||||
|
|
Reference in a new issue