summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_types.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-10-26 21:45:49 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-10-26 21:45:49 -0400
commitb93d6123b2b601a744918c2dea4de5cf51ddcdb9 (patch)
treeb062075093cc7239f6ff86b7d1d0bf02de24ed98 /pts-core/functions/pts-functions_types.php
parenta95d42ad541711bad96f3ca4f7d0a0ec41d2ad55 (diff)
downloadphoronix-test-suite-upstream-b93d6123b2b601a744918c2dea4de5cf51ddcdb9.tar.gz
phoronix-test-suite-upstream-b93d6123b2b601a744918c2dea4de5cf51ddcdb9.tar.xz
phoronix-test-suite-upstream-b93d6123b2b601a744918c2dea4de5cf51ddcdb9.zip
pts-core: Add base/ support to locally stored test profiles and
resources
Diffstat (limited to 'pts-core/functions/pts-functions_types.php')
-rw-r--r--pts-core/functions/pts-functions_types.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/pts-core/functions/pts-functions_types.php b/pts-core/functions/pts-functions_types.php
index f864cdd..9a3db76 100644
--- a/pts-core/functions/pts-functions_types.php
+++ b/pts-core/functions/pts-functions_types.php
@@ -24,7 +24,8 @@
define("TYPE_TEST", "TEST"); // Type is test
define("TYPE_OS_TEST", "OS_TEST"); // Type is OS-specific test
define("TYPE_TEST_SUITE", "TEST_SUITE"); // Type is a test suite
-define("TYPE_LOCAL_TEST", "LOCAL_TEST"); // Type is test
+define("TYPE_LOCAL_TEST", "LOCAL_TEST"); // Type is local test
+define("TYPE_LOCAL_BASE_TEST", "LOCAL_TEST"); // Type is local base test
define("TYPE_OS_LOCAL_TEST", "OS_LOCAL_TEST"); // Type is test
define("TYPE_LOCAL_TEST_SUITE", "LOCAL_TEST_SUITE"); // Type is a test suite
define("TYPE_SCTP_TEST", "LOCAL_SCTP_TEST"); // Type is a SCTP test
@@ -40,7 +41,7 @@ function is_test($object)
{
$type = pts_test_type($object);
- return $type == TYPE_TEST || $type == TYPE_LOCAL_TEST || $type == TYPE_OS_TEST || $type == TYPE_OS_LOCAL_TEST || $type == TYPE_SCTP_TEST || $type == TYPE_BASE_TEST;
+ return $type == TYPE_TEST || $type == TYPE_LOCAL_TEST || $type == TYPE_LOCAL_BASE_TEST || $type == TYPE_OS_TEST || $type == TYPE_OS_LOCAL_TEST || $type == TYPE_SCTP_TEST || $type == TYPE_BASE_TEST;
}
function pts_test_type($identifier)
{
@@ -67,6 +68,10 @@ function pts_test_type($identifier)
{
$test_type = TYPE_LOCAL_TEST;
}
+ else if(is_file(XML_PROFILE_LOCAL_CTP_BASE_DIR . $identifier . ".xml"))
+ {
+ $test_type = TYPE_LOCAL_BASE_TEST;
+ }
else if(is_file(XML_SUITE_LOCAL_DIR . $identifier . ".xml"))
{
$test_type = TYPE_LOCAL_TEST_SUITE;
@@ -160,6 +165,10 @@ function pts_location_test($identifier)
{
$location = XML_PROFILE_CTP_BASE_DIR . $identifier . ".xml";
}
+ else if($type == TYPE_LOCAL_BASE_TEST)
+ {
+ $location = XML_PROFILE_LOCAL_CTP_BASE_DIR . $identifier . ".xml";
+ }
}
$GLOBALS["PTS_VAR_CACHE"]["TEST_LOCATION"][$identifier] = $location;
@@ -205,6 +214,10 @@ function pts_location_test_resources($identifier)
{
$location = TEST_RESOURCE_CTP_BASE_DIR . $identifier . "/";
}
+ else if($type == TYPE_LOCAL_BASE_TEST && is_dir(TEST_RESOURCE_LOCAL_CTP_BASE_DIR . $identifier))
+ {
+ $location = TEST_RESOURCE_LOCAL_CTP_BASE_DIR . $identifier . "/";
+ }
}
$GLOBALS["PTS_VAR_CACHE"]["TEST_RESOURCE_LOCATION"][$identifier] = $location;