diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-10-09 13:59:07 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-10-09 13:59:07 -0400 |
commit | f62ec5fbb084d26220d928d7b54f51641ab1ab85 (patch) | |
tree | ad8d52a7dc4e47f56a3cecf7011c3a22920fed0f /pts-core/functions/pts-functions_tests.php | |
parent | a3c3298174acb6f96fc627bf971ca1405964ac4a (diff) | |
download | phoronix-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.php | 17 |
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() { |