summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Larabel <Michael AT phoronix.com>2008-05-16 17:34:51 -0400
committerMichael Larabel <Michael AT phoronix.com>2008-05-16 17:34:51 -0400
commit29b7786386e3fdce7336369c6a4021ace194665a (patch)
tree9782a262e2a9adbfcf5e5eb92826692122d27c04
parent90648473d4e05ed18fa0e045e33132f0ac0c1385 (diff)
downloadphoronix-test-suite-upstream-29b7786386e3fdce7336369c6a4021ace194665a.tar.gz
phoronix-test-suite-upstream-29b7786386e3fdce7336369c6a4021ace194665a.tar.xz
phoronix-test-suite-upstream-29b7786386e3fdce7336369c6a4021ace194665a.zip
Merge test-info and suite-info into generic info argument (though the earlier options are still compatible) and auto-detect the type.
-rw-r--r--CHANGE-LOG1
-rwxr-xr-xphoronix-test-suite7
-rw-r--r--pts-core/pts-run-cmd.php15
3 files changed, 8 insertions, 15 deletions
diff --git a/CHANGE-LOG b/CHANGE-LOG
index 8389b3d..425c7d8 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -3,6 +3,7 @@ PHORONIX TEST SUITE CHANGE-LOG
Phoronix Test Suite
- Tweaks to suite-info formatting
+- Merge test-info and suite-info into generic info argument (though the earlier options are still compatible) and auto-detect the type
Phoronix Test Suite 0.7.0
May 17, 2008
diff --git a/phoronix-test-suite b/phoronix-test-suite
index 5fcd222..2ed14a3 100755
--- a/phoronix-test-suite
+++ b/phoronix-test-suite
@@ -106,11 +106,8 @@ case "$1" in
"show-result")
$PHP_BIN pts-core/pts-run-cmd.php SHOW_RESULT $2
;;
-"suite-info" | "suite-information")
- $PHP_BIN pts-core/pts-run-cmd.php SUITE_INFO $2
- ;;
-"test-info" | "test-information")
- $PHP_BIN pts-core/pts-run-cmd.php TEST_INFO $2
+"info" | "suite-info" | "suite-information" | "test-info" | "test-information")
+ $PHP_BIN pts-core/pts-run-cmd.php INFO $2
;;
"system-info" | "system-information")
$PHP_BIN pts-core/pts-run-cmd.php SYS_INFO
diff --git a/pts-core/pts-run-cmd.php b/pts-core/pts-run-cmd.php
index de74072..9f836d9 100644
--- a/pts-core/pts-run-cmd.php
+++ b/pts-core/pts-run-cmd.php
@@ -142,8 +142,9 @@ switch($COMMAND)
}
echo "\n";
break;
- case "SUITE_INFO":
- if(pts_test_type($ARG_1) == "TEST_SUITE")
+ case "INFO":
+ $pts_test_type = pts_test_type($ARG_1);
+ if($pts_test_type == "TEST_SUITE")
{
$xml_parser = new tandem_XmlReader(file_get_contents(XML_SUITE_DIR . $ARG_1 . ".xml"));
$suite_name = $xml_parser->getXMLValue(P_SUITE_TITLE);
@@ -164,13 +165,7 @@ switch($COMMAND)
echo "\n";
}
- else
- {
- echo "\n$ARG_1 is not a test suite.\n";
- }
- break;
- case "TEST_INFO":
- if(pts_test_type($ARG_1) == "BENCHMARK")
+ else if($pts_test_type == "BENCHMARK")
{
$xml_parser = new tandem_XmlReader(file_get_contents(XML_PROFILE_DIR . $ARG_1 . ".xml"));
@@ -203,7 +198,7 @@ switch($COMMAND)
}
else
{
- echo "\n$ARG_1 is not a test.\n";
+ echo "\n$ARG_1 is not recognized.\n";
}
break;
case "SHOW_RESULT":