summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-10-12 20:38:23 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-10-12 20:38:23 -0400
commit002c0dfcf5b5aaa18de979ec9402656c071b1b00 (patch)
tree5138818cf7814b62ccb56d513beb14a0cc466131
parent22327c3886de6c0dbba8fb47ba16e4876eafd1cb (diff)
downloadphoronix-test-suite-upstream-002c0dfcf5b5aaa18de979ec9402656c071b1b00.tar.gz
phoronix-test-suite-upstream-002c0dfcf5b5aaa18de979ec9402656c071b1b00.tar.xz
phoronix-test-suite-upstream-002c0dfcf5b5aaa18de979ec9402656c071b1b00.zip
pts-core: When running list-suites, don't show suites that aren't
supported at all by the installed software/hardware and indicate only partially supported suites
-rw-r--r--EXPERIMENTAL-CHANGE-LOG1
-rw-r--r--pts-core/functions/pts-functions_tests.php20
-rw-r--r--pts-core/pts-run-cmd.php23
3 files changed, 43 insertions, 1 deletions
diff --git a/EXPERIMENTAL-CHANGE-LOG b/EXPERIMENTAL-CHANGE-LOG
index 3fa1c6b..500cd19 100644
--- a/EXPERIMENTAL-CHANGE-LOG
+++ b/EXPERIMENTAL-CHANGE-LOG
@@ -15,6 +15,7 @@ Phoronix Test Suite
- pts-core: Show average run-time with info <test> command
- pts-core: Don't pass $test_results as an argument to parse-results.sh or parse-results.php with tests using $LOG_FILE
- pts-core: Change format of list-test-usage
+- pts-core: When running list-suites, don't show suites that aren't supported at all by the installed software/hardware and indicate only partially supported suites
- pts: Move more test profiles to using $LOG_FILE for result information
- pts: Update openssl test profile to OpenSSL version 0.9.8i
- pts: Update encode-mp3 test profile to LAME version 3.98.2
diff --git a/pts-core/functions/pts-functions_tests.php b/pts-core/functions/pts-functions_tests.php
index 8152490..64493da 100644
--- a/pts-core/functions/pts-functions_tests.php
+++ b/pts-core/functions/pts-functions_tests.php
@@ -326,6 +326,26 @@ function pts_test_version_supported($identifier)
return $supported;
}
+function pts_suite_supported($identifier)
+{
+ $tests = pts_contained_tests($identifier, TRUE);
+ $original_size = count($tests);
+
+ for($i = 0; $i < $original_size; $i++)
+ if(!pts_test_supported($tests[$i]))
+ unset($tests[$i]);
+
+ $supported_size = count($tests);
+
+ if($supported_size == 0)
+ $return_code = 0;
+ else if($supported_size != $original_size)
+ $return_code = 1;
+ else
+ $return_code = 2;
+
+ return $return_code;
+}
function pts_test_supported($identifier)
{
return pts_test_architecture_supported($identifier) && pts_test_platform_supported($identifier) && pts_test_version_supported($identifier);
diff --git a/pts-core/pts-run-cmd.php b/pts-core/pts-run-cmd.php
index c6c0b72..e92eab9 100644
--- a/pts-core/pts-run-cmd.php
+++ b/pts-core/pts-run-cmd.php
@@ -191,6 +191,7 @@ switch($COMMAND)
break;
case "LIST_SUITES":
echo pts_string_header("Phoronix Test Suite - Suites");
+ $has_partially_supported_suite = false;
foreach(pts_available_suites_array() as $identifier)
{
$xml_parser = new tandem_XmlReader(pts_location_suite($identifier));
@@ -205,9 +206,29 @@ switch($COMMAND)
printf("%-26ls - %-32ls %-4ls %-12ls\n", $identifier, $name, $version, $type);
}
else
- printf("%-22ls - %-32ls [Type: %s]\n", $identifier, $name, $test_type);
+ {
+ $suite_support_code = pts_suite_supported($identifier);
+
+ if($suite_support_code > 0)
+ {
+ $identifier_prefix = " ";
+ if($suite_support_code == 1)
+ {
+ $identifier_prefix = "*";
+
+ if(!$has_partially_supported_suite)
+ $has_partially_supported_suite = true;
+ }
+
+ printf("%-24ls - %-32ls [Type: %s]\n", $identifier_prefix . " " . $identifier, $name, $test_type);
+ }
+ }
}
echo "\n";
+ if($has_partially_supported_suite)
+ {
+ echo "* Indicates a partially supported suite.\n\n";
+ }
break;
case "LIST_MODULES":
echo pts_string_header("Phoronix Test Suite - Modules");