summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-init.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-08-01 15:48:16 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-08-03 11:50:42 -0400
commitaae3418dbe650d34e43caa67b6f14c4e0ffc2b34 (patch)
treec659fb92545f362c92c7bd3da16f380716c5f203 /pts-core/functions/pts-init.php
parentdba886229e48912957d36943ca6d8dd70467dee8 (diff)
downloadphoronix-test-suite-upstream-aae3418dbe650d34e43caa67b6f14c4e0ffc2b34.tar.gz
phoronix-test-suite-upstream-aae3418dbe650d34e43caa67b6f14c4e0ffc2b34.tar.xz
phoronix-test-suite-upstream-aae3418dbe650d34e43caa67b6f14c4e0ffc2b34.zip
pts-core: Create unified batch mode support and make detection done at
init time
Diffstat (limited to 'pts-core/functions/pts-init.php')
-rw-r--r--pts-core/functions/pts-init.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/pts-core/functions/pts-init.php b/pts-core/functions/pts-init.php
index 74d9288..83c648e 100644
--- a/pts-core/functions/pts-init.php
+++ b/pts-core/functions/pts-init.php
@@ -105,6 +105,7 @@ function pts_extended_init()
file_put_contents(PTS_DOWNLOAD_CACHE_DIR . "make-cache-howto", "A download cache is used for conserving time and bandwidth by eliminating the need for the Phoronix Test Suite to download files that have already been downloaded once. A download cache can also be transferred between PCs running the Phoronix Test Suite. For more information on this feature, view the included documentation. To generate a download cache, run:\n\nphoronix-test-suite make-download-cache\n");
}
+ // OpenGL / graphics detection
$opengl_driver = opengl_version();
if(strpos($opengl_driver, "NVIDIA") !== FALSE)
@@ -120,6 +121,18 @@ function pts_extended_init()
define("IS_ATI_GRAPHICS", false);
if(!defined("IS_MESA_GRAPHICS"))
define("IS_MESA_GRAPHICS", false);
+
+ // Check for batch mode
+ if(getenv("PTS_BATCH_MODE") != FALSE)
+ {
+ if(pts_read_user_config(P_OPTION_BATCH_CONFIGURED, "FALSE") == "FALSE")
+ pts_exit(pts_string_header("The batch mode must first be configured\nRun: phoronix-test-suite batch-setup"));
+
+ define("PTS_BATCH_MODE", "1");
+ define("IS_BATCH_MODE", true);
+ }
+ else
+ define("IS_BATCH_MODE", false);
}
function __autoload($to_load)
{