summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_tests.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-09-29 20:39:50 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-09-29 20:39:50 -0400
commit7acc92ef2e29b761a703b0b9c4ba807c91318de0 (patch)
tree8a887f6c2254ba8aabbb16197063ca09e279c608 /pts-core/functions/pts-functions_tests.php
parent2686570d0e002fb56edddd21cb7085d2ff0613d9 (diff)
downloadphoronix-test-suite-upstream-7acc92ef2e29b761a703b0b9c4ba807c91318de0.tar.gz
phoronix-test-suite-upstream-7acc92ef2e29b761a703b0b9c4ba807c91318de0.tar.xz
phoronix-test-suite-upstream-7acc92ef2e29b761a703b0b9c4ba807c91318de0.zip
pts-core: Add pts_available_tests_array() and
pts_available_suites_array()
Diffstat (limited to 'pts-core/functions/pts-functions_tests.php')
-rw-r--r--pts-core/functions/pts-functions_tests.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/pts-core/functions/pts-functions_tests.php b/pts-core/functions/pts-functions_tests.php
index 8f8f90f..261edd2 100644
--- a/pts-core/functions/pts-functions_tests.php
+++ b/pts-core/functions/pts-functions_tests.php
@@ -259,5 +259,29 @@ function pts_test_supported($identifier)
{
return pts_test_architecture_supported($identifier) && pts_test_platform_supported($identifier);
}
+function pts_available_tests_array()
+{
+ $tests = glob(XML_PROFILE_DIR . "*.xml");
+ $local_tests = glob(XML_PROFILE_LOCAL_DIR . "*.xml");
+ $tests = array_unique(array_merge($tests, $local_tests));
+ asort($tests);
+
+ for($i = 0; $i < count($tests); $i++)
+ $tests[$i] = basename($tests[$i], ".xml");
+
+ return $tests;
+}
+function pts_available_suites_array()
+{
+ $suites = glob(XML_SUITE_DIR . "*.xml");
+ $local_suites = glob(XML_SUITE_LOCAL_DIR . "*.xml");
+ $suites = array_unique(array_merge($suites, $local_suites));
+ asort($suites);
+
+ for($i = 0; $i < count($suites); $i++)
+ $suites[$i] = basename($suites[$i], ".xml");
+
+ return $suites;
+}
?>