summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-04-23 13:52:55 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-04-23 13:52:55 -0400
commitadbb4b52c95b1b6a7510669de6d510048dbfd1bd (patch)
tree8a5739fde041151e60e39df9e695897f461f31fb
parentfdc28a7186f6b42eb3b7f7a7bcdca501691608bc (diff)
downloadphoronix-test-suite-upstream-adbb4b52c95b1b6a7510669de6d510048dbfd1bd.tar.gz
phoronix-test-suite-upstream-adbb4b52c95b1b6a7510669de6d510048dbfd1bd.tar.xz
phoronix-test-suite-upstream-adbb4b52c95b1b6a7510669de6d510048dbfd1bd.zip
Add "show-result" argument
-rw-r--r--CHANGE-LOG2
-rwxr-xr-xphoronix-test-suite5
-rw-r--r--pts-core/pts-run-cmd.php65
3 files changed, 45 insertions, 27 deletions
diff --git a/CHANGE-LOG b/CHANGE-LOG
index d4f3a74..f2c39e9 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -14,6 +14,8 @@ Phoronix Test Suite
- Add External Dependencies support for CentOS (Thanks to Pekka Panula)
- Add External Dependencies support for Mandriva (Thanks to Stephane Teletchea)
- Add new OpenGL profile (norsetto-shadow)
+- Major rework of how results are saved and each set of results now has its own directory. Most regressions in this area should be taken care of.
+- Add show-result <Saved File> argument for opening saved results at a later time in your web browser
Phoronix Test Suite 0.3.1
April 19, 2008
diff --git a/phoronix-test-suite b/phoronix-test-suite
index b682034..5842c48 100755
--- a/phoronix-test-suite
+++ b/phoronix-test-suite
@@ -62,6 +62,9 @@ case "${task}" in
"list-saved-results")
php pts-core/pts-run-cmd.php LIST_SAVED_RESULTS
;;
+"show-result")
+ php pts-core/pts-run-cmd.php SHOW_RESULT $2
+ ;;
"system-information")
php pts-core/pts-run-cmd.php SYS_INFO
;;
@@ -96,8 +99,8 @@ case "${task}" in
echo "list-results: List all saved results"
echo "system-information: Dump detected software and hardware information detected by PTS"
echo "upload <Saved File>: Upload these results to be shared globally"
+ echo "show-result <Saved File>: Show this result file in your web browser"
echo "login: Enter in your PTS Global log-in information for uploading results"
-# echo "build-php: Build A Local Copy Of PHP For The Phoronix Test Suite"
echo "\n"
;;
esac
diff --git a/pts-core/pts-run-cmd.php b/pts-core/pts-run-cmd.php
index 7513f02..b2f8ddc 100644
--- a/pts-core/pts-run-cmd.php
+++ b/pts-core/pts-run-cmd.php
@@ -47,6 +47,45 @@ switch($COMMAND)
if(!empty($upload_url))
echo "Results Uploaded To: " . $upload_url . "\n\n"; // TODO: Add checks to make sure it did work out
break;
+ case "LIST_SAVED_RESULTS":
+ echo "\n=================================\n";
+ echo "Phoronix Test Suite - Saved Results\n";
+ echo "=================================\n\n";
+ foreach(glob(SAVE_RESULTS_LOCATION . "*/composite.xml") as $benchmark_file)
+ {
+ $xml_parser = new tandem_XmlReader(file_get_contents($benchmark_file));
+ $title = $xml_parser->getXMLValue("PhoronixTestSuite/Suite/Title");
+ $suite = $xml_parser->getXMLValue("PhoronixTestSuite/Suite/Name");
+ $raw_results = $xml_parser->getXMLArrayValues("PhoronixTestSuite/Benchmark/Results");
+ $results_xml = new tandem_XmlReader($raw_results[0]);
+ $identifiers = $results_xml->getXMLArrayValues("Group/Entry/Identifier");
+ $saved_identifier = array_pop(explode('/', dirname($benchmark_file)));
+
+ if(!empty($title))
+ {
+ echo $title . "\n";
+ printf("Saved Name: %-15ls Test: %-18ls \n", $saved_identifier, $suite);
+
+ foreach($identifiers as $id)
+ echo "\t- $id\n";
+
+ echo "\n\n";
+ }
+ }
+ break;
+ case "SHOW_RESULT":
+ if(is_file(SAVE_RESULTS_LOCATION . $ARG_1 . "/composite.xml"))
+ $URL = SAVE_RESULTS_LOCATION . $ARG_1 . "/composite.xml";
+ //else if(trim(file_get_contents("http://www.phoronix-test-suite.com/global/profile-check.php?id=" . $ARG_1)) == "REMOTE_FILE")
+ // $URL = "http://global.phoronix-test-suite.com/index.php?k=profile&u=" . trim($ARG_1);
+ else
+ $URL = false;
+
+ if($URL != FALSE)
+ shell_exec("./pts/launch-browser.sh $URL &");
+ else
+ echo "\n$ARG_1 was not found.\n";
+ break;
case "INSTALL_BENCHMARK":
if(empty($ARG_1))
{
@@ -122,32 +161,6 @@ switch($COMMAND)
}
echo "\n";
break;
- case "LIST_SAVED_RESULTS":
- echo "\n=================================\n";
- echo "Phoronix Test Suite - Saved Results\n";
- echo "=================================\n\n";
- foreach(glob(SAVE_RESULTS_LOCATION . "*/composite.xml") as $benchmark_file)
- {
- $xml_parser = new tandem_XmlReader(file_get_contents($benchmark_file));
- $title = $xml_parser->getXMLValue("PhoronixTestSuite/Suite/Title");
- $suite = $xml_parser->getXMLValue("PhoronixTestSuite/Suite/Name");
- $raw_results = $xml_parser->getXMLArrayValues("PhoronixTestSuite/Benchmark/Results");
- $results_xml = new tandem_XmlReader($raw_results[0]);
- $identifiers = $results_xml->getXMLArrayValues("Group/Entry/Identifier");
- $saved_identifier = array_pop(explode('/', dirname($benchmark_file)));
-
- if(!empty($title))
- {
- echo $title . "\n";
- printf("Saved Name: %-15ls Test: %-18ls \n", $saved_identifier, $suite);
-
- foreach($identifiers as $id)
- echo "\t- $id\n";
-
- echo "\n\n";
- }
- }
- break;
case "INITIAL_CONFIG":
if(is_file(PTS_USER_DIR . "user-config.xml"))
{