summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_tests.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-10-09 13:59:07 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-10-09 13:59:07 -0400
commitf62ec5fbb084d26220d928d7b54f51641ab1ab85 (patch)
treead8d52a7dc4e47f56a3cecf7011c3a22920fed0f /pts-core/functions/pts-functions_tests.php
parenta3c3298174acb6f96fc627bf971ca1405964ac4a (diff)
downloadphoronix-test-suite-upstream-f62ec5fbb084d26220d928d7b54f51641ab1ab85.tar.gz
phoronix-test-suite-upstream-f62ec5fbb084d26220d928d7b54f51641ab1ab85.tar.xz
phoronix-test-suite-upstream-f62ec5fbb084d26220d928d7b54f51641ab1ab85.zip
pts-core: Add RequiresCoreVersion tag if the test profile is only
compatible with select versions of the Phoronix Test Suite
Diffstat (limited to 'pts-core/functions/pts-functions_tests.php')
-rw-r--r--pts-core/functions/pts-functions_tests.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/pts-core/functions/pts-functions_tests.php b/pts-core/functions/pts-functions_tests.php
index 767a2f5..795f6e5 100644
--- a/pts-core/functions/pts-functions_tests.php
+++ b/pts-core/functions/pts-functions_tests.php
@@ -300,9 +300,24 @@ function pts_test_platform_supported($identifier)
return $supported;
}
+function pts_test_version_supported($identifier)
+{
+ // Check if the test profile's version is compatible with pts-core
+ $supported = true;
+
+ if(is_test($identifier))
+ {
+ $xml_parser = new pts_test_tandem_XmlReader(pts_location_test($identifier));
+ $requires_core_version = $xml_parser->getXMLValue(P_TEST_SUPPORTS_COREVERSION);
+
+ $supported = pts_test_version_compatible($requires_core_version);
+ }
+
+ return $supported;
+}
function pts_test_supported($identifier)
{
- return pts_test_architecture_supported($identifier) && pts_test_platform_supported($identifier);
+ return pts_test_architecture_supported($identifier) && pts_test_platform_supported($identifier) && pts_test_version_supported($identifier);
}
function pts_available_tests_array()
{