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