summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-12-12 22:01:13 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-12-12 22:01:13 -0500
commite3987a410b7cf4e9670aabe0dc6bae562d885d9e (patch)
tree359880683cf2bc6b14843b61e1fbdbb04f0c363f
parentbc98974134c910291f721737fb2e4c0e1d2d3194 (diff)
downloadphoronix-test-suite-upstream-e3987a410b7cf4e9670aabe0dc6bae562d885d9e.tar.gz
phoronix-test-suite-upstream-e3987a410b7cf4e9670aabe0dc6bae562d885d9e.tar.xz
phoronix-test-suite-upstream-e3987a410b7cf4e9670aabe0dc6bae562d885d9e.zip
pts-core: Few fixes for some regressions from today's work plus other
cleaning
-rw-r--r--pts-core/functions/pts-functions-install.php2
-rw-r--r--pts-core/functions/pts-functions_global.php34
-rw-r--r--pts-core/functions/pts-functions_tests.php34
-rw-r--r--pts-core/functions/pts-functions_types.php2
-rw-r--r--pts-core/objects/pts_Graph/pts_BarGraph.php2
-rw-r--r--pts-core/objects/tandem_Xml/pts_results_tandem_XmlReader.php2
6 files changed, 38 insertions, 38 deletions
diff --git a/pts-core/functions/pts-functions-install.php b/pts-core/functions/pts-functions-install.php
index ba36399..19ba3c1 100644
--- a/pts-core/functions/pts-functions-install.php
+++ b/pts-core/functions/pts-functions-install.php
@@ -53,7 +53,7 @@ function pts_start_install($to_install)
if(pts_read_assignment("COMMAND") != "benchmark")
{
- echo pts_string_header("\nNot recognized: " . $TO_INSTALL . "\n");
+ echo pts_string_header("\nNot recognized: " . $to_install[0] . "\n");
}
return false;
}
diff --git a/pts-core/functions/pts-functions_global.php b/pts-core/functions/pts-functions_global.php
index 8de5501..1d3b59d 100644
--- a/pts-core/functions/pts-functions_global.php
+++ b/pts-core/functions/pts-functions_global.php
@@ -52,5 +52,39 @@ function pts_global_valid_id_string($global_id)
return $is_valid;
}
+function pts_global_upload_result($result_file, $tags = "")
+{
+ // Upload a test result to the Phoronix Global database
+ $test_results = file_get_contents($result_file);
+ $test_results = str_replace(array("\n", "\t"), "", $test_results);
+ $switch_tags = array("Benchmark>" => "B>", "Results>" => "R>", "Group>" => "G>", "Entry>" => "E>", "Identifier>" => "I>", "Value>" => "V>", "System>" => "S>", "Attributes>" => "A>");
+
+ foreach($switch_tags as $f => $t)
+ {
+ $test_results = str_replace($f, $t, $test_results);
+ }
+
+ $ToUpload = base64_encode($test_results);
+ $GlobalUser = pts_current_user();
+ $GlobalKey = pts_read_user_config(P_OPTION_GLOBAL_UPLOADKEY, "");
+ $tags = base64_encode($tags);
+ $return_stream = "";
+
+ $upload_data = array("result_xml" => $ToUpload, "global_user" => $GlobalUser, "global_key" => $GlobalKey, "tags" => $tags);
+ $upload_data = http_build_query($upload_data);
+
+ $http_parameters = array("http" => array("method" => "POST", "content" => $upload_data));
+
+ $stream_context = stream_context_create($http_parameters);
+ $opened_url = @fopen("http://www.phoronix-test-suite.com/global/user-upload.php", "rb", false, $stream_context);
+ $response = @stream_get_contents($opened_url);
+
+ if($response !== false)
+ {
+ $return_stream = $response;
+ }
+
+ return $return_stream;
+}
?>
diff --git a/pts-core/functions/pts-functions_tests.php b/pts-core/functions/pts-functions_tests.php
index 89e7153..42bb551 100644
--- a/pts-core/functions/pts-functions_tests.php
+++ b/pts-core/functions/pts-functions_tests.php
@@ -227,40 +227,6 @@ function pts_get_results_viewer_xsl_formatted($format_type = "PNG")
return str_replace("<!-- GRAPH TAGS -->", $graph_string, $raw_xsl);
}
-function pts_global_upload_result($result_file, $tags = "")
-{
- // Upload a test result to the Phoronix Global database
- $test_results = file_get_contents($result_file);
- $test_results = str_replace(array("\n", "\t"), "", $test_results);
- $switch_tags = array("Benchmark>" => "B>", "Results>" => "R>", "Group>" => "G>", "Entry>" => "E>", "Identifier>" => "I>", "Value>" => "V>", "System>" => "S>", "Attributes>" => "A>");
-
- foreach($switch_tags as $f => $t)
- {
- $test_results = str_replace($f, $t, $test_results);
- }
-
- $ToUpload = base64_encode($test_results);
- $GlobalUser = pts_current_user();
- $GlobalKey = pts_read_user_config(P_OPTION_GLOBAL_UPLOADKEY, "");
- $tags = base64_encode($tags);
- $return_stream = "";
-
- $upload_data = array("result_xml" => $ToUpload, "global_user" => $GlobalUser, "global_key" => $GlobalKey, "tags" => $tags);
- $upload_data = http_build_query($upload_data);
-
- $http_parameters = array("http" => array("method" => "POST", "content" => $upload_data));
-
- $stream_context = stream_context_create($http_parameters);
- $opened_url = @fopen("http://www.phoronix-test-suite.com/global/user-upload.php", "rb", false, $stream_context);
- $response = @stream_get_contents($opened_url);
-
- if($response !== false)
- {
- $return_stream = $response;
- }
-
- return $return_stream;
-}
function pts_test_needs_updated_install($identifier)
{
// Checks if test needs updating
diff --git a/pts-core/functions/pts-functions_types.php b/pts-core/functions/pts-functions_types.php
index 53d17dc..b083d67 100644
--- a/pts-core/functions/pts-functions_types.php
+++ b/pts-core/functions/pts-functions_types.php
@@ -334,7 +334,7 @@ function pts_contained_tests($object, $include_extensions = false)
}
else if(is_file(SAVE_RESULTS_DIR . $object . "/composite.xml")) // Object is a saved results file
{
- $xml_parser = new pts_suite_tandem_XmlReader($object);
+ $xml_parser = new pts_results_tandem_XmlReader($object);
$tests_in_save = $xml_parser->getXMLArrayValues(P_RESULTS_TEST_TESTNAME);
foreach($tests_in_save as $test)
diff --git a/pts-core/objects/pts_Graph/pts_BarGraph.php b/pts-core/objects/pts_Graph/pts_BarGraph.php
index 85d3380..9cf8364 100644
--- a/pts-core/objects/pts_Graph/pts_BarGraph.php
+++ b/pts-core/objects/pts_Graph/pts_BarGraph.php
@@ -74,7 +74,7 @@ class pts_BarGraph extends pts_CustomGraph
}
else
{
- $this->graph_image->write_text_center($this->graph_identifiers[$i], $this->graph_font, $this->graph_font_size_identifiers, $this->graph_color_headers, $px_bound_left, $px_from_top_end - 5, $px_bound_right, $px_from_top_end - 5, false, true);
+ $this->graph_image->write_text_center($this->graph_identifiers[$i], $this->graph_font, $this->graph_font_size_identifiers, $this->graph_color_headers, $px_bound_left, $px_from_top_end - 3, $px_bound_right, $px_from_top_end - 3, false, true);
}
}
}
diff --git a/pts-core/objects/tandem_Xml/pts_results_tandem_XmlReader.php b/pts-core/objects/tandem_Xml/pts_results_tandem_XmlReader.php
index 35864f0..8011f40 100644
--- a/pts-core/objects/tandem_Xml/pts_results_tandem_XmlReader.php
+++ b/pts-core/objects/tandem_Xml/pts_results_tandem_XmlReader.php
@@ -30,7 +30,7 @@ class pts_results_tandem_XmlReader extends tandem_XmlReader
{
if(!is_file($read_xml) && is_file(SAVE_RESULTS_DIR . $read_xml . "/composite.xml"))
{
- $read_xml = pts_location_suite(SAVE_RESULTS_DIR . $read_xml . "/composite.xml");
+ $read_xml = SAVE_RESULTS_DIR . $read_xml . "/composite.xml";
}
parent::__construct($read_xml, $cache_support);