diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-08-01 15:56:57 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-08-03 11:50:42 -0400 |
commit | b5c1dbb7a04ce9dba85de3a7d8cacaefe6746b86 (patch) | |
tree | 9d103029c94d31c3fb3d8c1d1a1c148b1595ab0b | |
parent | 909141e1357e679793828a88104d868096c02091 (diff) | |
download | phoronix-test-suite-upstream-b5c1dbb7a04ce9dba85de3a7d8cacaefe6746b86.tar.gz phoronix-test-suite-upstream-b5c1dbb7a04ce9dba85de3a7d8cacaefe6746b86.tar.xz phoronix-test-suite-upstream-b5c1dbb7a04ce9dba85de3a7d8cacaefe6746b86.zip |
Swithch defined("PTS_DEBUG_MODE") to IS_DEBUG_MODE
-rw-r--r-- | pts-core/functions/pts-functions.php | 4 | ||||
-rw-r--r-- | pts-core/functions/pts-functions_modules.php | 2 | ||||
-rw-r--r-- | pts-core/functions/pts-init.php | 3 | ||||
-rw-r--r-- | pts-core/pts-run-cmd.php | 4 |
4 files changed, 8 insertions, 5 deletions
diff --git a/pts-core/functions/pts-functions.php b/pts-core/functions/pts-functions.php index d17c189..163943f 100644 --- a/pts-core/functions/pts-functions.php +++ b/pts-core/functions/pts-functions.php @@ -477,7 +477,7 @@ function pts_shutdown() { define("PTS_END_TIME", time()); - if(defined("PTS_DEBUG_MODE") && defined("PTS_DEBUG_FILE")) + if(IS_DEBUG_MODE && defined("PTS_DEBUG_FILE")) { if(!is_dir(PTS_USER_DIR . "debug-messages/")) mkdir(PTS_USER_DIR . "debug-messages/"); @@ -550,7 +550,7 @@ function pts_format_time_string($time, $format = "SECONDS") } function pts_debug_message($message) { - if(defined("PTS_DEBUG_MODE")) + if(IS_DEBUG_MODE) { if(strpos($message, "$") > 0) foreach(pts_env_variables() as $key => $value) diff --git a/pts-core/functions/pts-functions_modules.php b/pts-core/functions/pts-functions_modules.php index 4b05919..feb8a9f 100644 --- a/pts-core/functions/pts-functions_modules.php +++ b/pts-core/functions/pts-functions_modules.php @@ -52,7 +52,7 @@ function pts_auto_detect_modules($load_here = FALSE) if(!in_array($module, $GLOBALS["PTS_MODULES"]) && ($e = getenv($env_var)) != FALSE && !empty($e)) { - if(defined("PTS_DEBUG_MODE")) + if(IS_DEBUG_MODE) echo "Attempting To Add Module: " . $module . "\n"; array_push($GLOBALS["PTS_MODULES"], $module); diff --git a/pts-core/functions/pts-init.php b/pts-core/functions/pts-init.php index 83c648e..e5276b2 100644 --- a/pts-core/functions/pts-init.php +++ b/pts-core/functions/pts-init.php @@ -55,6 +55,7 @@ function pts_init() if(getenv("DEBUG") == "1" || ($debug_file = getenv("DEBUG_FILE")) != FALSE) { define("PTS_DEBUG_MODE", 1); + define("IS_DEBUG_MODE", true); if($debug_file != FALSE) { @@ -62,6 +63,8 @@ function pts_init() $GLOBALS["DEBUG_CONTENTS"] = ""; } } + else + define("IS_DEBUG_MODE", false); // Operating System Detection $supported_operating_systems = array("Linux", array("Solaris", "Sun"), "FreeBSD", "BSD"); diff --git a/pts-core/pts-run-cmd.php b/pts-core/pts-run-cmd.php index 3d3a0e1..54da48a 100644 --- a/pts-core/pts-run-cmd.php +++ b/pts-core/pts-run-cmd.php @@ -143,7 +143,7 @@ switch($COMMAND) $status = $xml_parser->getXMLValue(P_TEST_STATUS); $identifier = basename($benchmark_file, ".xml"); - if(defined("PTS_DEBUG_MODE")) + if(IS_DEBUG_MODE) { $version = $xml_parser->getXMLValue(P_TEST_PTSVERSION); $test_download_size = $xml_parser->getXMLValue(P_TEST_DOWNLOADSIZE); @@ -169,7 +169,7 @@ switch($COMMAND) $benchmark_type = $xml_parser->getXMLValue(P_SUITE_TYPE); $identifier = basename($benchmark_file, ".xml"); - if(defined("PTS_DEBUG_MODE")) + if(IS_DEBUG_MODE) { $version = $xml_parser->getXMLValue(P_SUITE_VERSION); $type = $xml_parser->getXMLValue(P_SUITE_TYPE); |