summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-init.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-12-02 22:05:51 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-12-02 22:05:51 -0500
commit822459a4b92fda1aabbd0edbd33ab4d8445e3808 (patch)
treee54fe8bc92324f56dc26e0f9ec98892fcf69c1fd /pts-core/functions/pts-init.php
parent3828e81cf3832f592c03a8168d0250c9c52bfd9a (diff)
downloadphoronix-test-suite-upstream-822459a4b92fda1aabbd0edbd33ab4d8445e3808.tar.gz
phoronix-test-suite-upstream-822459a4b92fda1aabbd0edbd33ab4d8445e3808.tar.xz
phoronix-test-suite-upstream-822459a4b92fda1aabbd0edbd33ab4d8445e3808.zip
pts-core: Cut down on use of pts_exit() command due to the new option
architecture, instead use returns appropriately
Diffstat (limited to 'pts-core/functions/pts-init.php')
-rw-r--r--pts-core/functions/pts-init.php37
1 files changed, 31 insertions, 6 deletions
diff --git a/pts-core/functions/pts-init.php b/pts-core/functions/pts-init.php
index 30bca33..840afa4 100644
--- a/pts-core/functions/pts-init.php
+++ b/pts-core/functions/pts-init.php
@@ -23,6 +23,7 @@
function pts_init()
{
+ pts_define_directories(); // Define directories
pts_basic_init(); // Initalize common / needed PTS start-up work
if(IS_SCTP_MODE)
@@ -57,6 +58,36 @@ function pts_directory()
return $dir;
}
+function pts_define_directories()
+{
+ // User's home directory for storing results, module files, test installations, etc.
+ define("PTS_DIR", pts_directory());
+ define("PTS_USER_DIR", pts_user_home() . ".phoronix-test-suite/");
+
+ // Distribution External Dependency Locations
+ define("XML_DISTRO_DIR", PTS_DIR . "pts/distro-xml/");
+ define("SCRIPT_DISTRO_DIR", PTS_DIR . "pts/distro-scripts/");
+
+ // Misc Locations
+ define("ETC_DIR", PTS_DIR . "pts/etc/");
+ define("MODULE_DIR", PTS_DIR . "pts-core/modules/");
+ define("RESULTS_VIEWER_DIR", PTS_DIR . "pts-core/results-viewer/");
+ define("TEST_LIBRARIES_DIR", PTS_DIR . "pts-core/test-libraries/");
+ define("STATIC_DIR", PTS_DIR . "pts-core/static/");
+ define("FONT_DIR", RESULTS_VIEWER_DIR . "fonts/");
+
+ // Test & Suite Locations
+ define("XML_PROFILE_DIR", PTS_DIR . "pts/test-profiles/");
+ define("XML_PROFILE_CTP_BASE_DIR", XML_PROFILE_DIR . "base/");
+ define("XML_SUITE_DIR", PTS_DIR . "pts/test-suites/");
+ define("TEST_RESOURCE_DIR", PTS_DIR . "pts/test-resources/");
+ define("TEST_RESOURCE_CTP_BASE_DIR", TEST_RESOURCE_DIR . "base/");
+ define("XML_PROFILE_LOCAL_DIR", PTS_USER_DIR . "test-profiles/");
+ define("XML_PROFILE_LOCAL_CTP_BASE_DIR", XML_PROFILE_LOCAL_DIR . "base/");
+ define("XML_SUITE_LOCAL_DIR", PTS_USER_DIR . "test-suites/");
+ define("TEST_RESOURCE_LOCAL_DIR", PTS_USER_DIR . "test-resources/");
+ define("TEST_RESOURCE_LOCAL_CTP_BASE_DIR", TEST_RESOURCE_LOCAL_DIR . "base/");
+}
function pts_basic_init()
{
// Initialize The Phoronix Test Suite
@@ -196,12 +227,6 @@ function pts_extended_init()
// 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