diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-10-03 07:49:52 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-10-03 07:49:52 -0400 |
commit | d444086d93600e0c2308dae49e06e40a0f111bff (patch) | |
tree | 15ea9d8c48d793a50ab1553de4132cc715257f55 /pts-core | |
parent | 33ec438fc30e3ef048f07e7189038e1ebab61409 (diff) | |
download | phoronix-test-suite-upstream-d444086d93600e0c2308dae49e06e40a0f111bff.tar.gz phoronix-test-suite-upstream-d444086d93600e0c2308dae49e06e40a0f111bff.tar.xz phoronix-test-suite-upstream-d444086d93600e0c2308dae49e06e40a0f111bff.zip |
pts-core: Add UnsupportedPlatforms tag to test profiles, which is
evaluated the opposite of SupportedPlatforms
Looks like a few pts_Graph SVG fixes are also squeezed in.
Diffstat (limited to 'pts-core')
-rw-r--r-- | pts-core/functions/pts-functions.php | 9 | ||||
-rw-r--r-- | pts-core/functions/pts-functions_tests.php | 26 | ||||
-rw-r--r-- | pts-core/functions/pts-interfaces.php | 1 | ||||
-rw-r--r-- | pts-core/objects/pts_Graph.php | 3 |
4 files changed, 31 insertions, 8 deletions
diff --git a/pts-core/functions/pts-functions.php b/pts-core/functions/pts-functions.php index 37ded6e..85963ff 100644 --- a/pts-core/functions/pts-functions.php +++ b/pts-core/functions/pts-functions.php @@ -176,7 +176,7 @@ function pts_save_result($save_to = null, $save_results = null) else $t = new pts_BarGraph($results_name[$i], $results_attributes[$i], $results_scale[$i]); - if(pts_gd_available()) + if(pts_gd_available() && getenv("SVG_DEBUG") == FALSE) { // Render to PNG $t->setRenderer("PNG"); @@ -184,7 +184,12 @@ function pts_save_result($save_to = null, $save_results = null) } else { - echo "\nThe PHP GD extension is missing, so the experimental SVG rendering engine is being used.\n"; + if(!defined("PHP_SVG_TEXT")) + { + echo "\nThe PHP GD extension is missing, so the experimental SVG rendering engine is being used.\n"; + define("PHP_SVG_TEXT", 1); + } + // Render to SVG $t->setRenderer("SVG"); pts_copy(RESULTS_VIEWER_DIR . "pts-svg-results-viewer.xsl", $save_to_dir . "/pts-results-viewer.xsl"); diff --git a/pts-core/functions/pts-functions_tests.php b/pts-core/functions/pts-functions_tests.php index 9d505a6..a734c86 100644 --- a/pts-core/functions/pts-functions_tests.php +++ b/pts-core/functions/pts-functions_tests.php @@ -240,16 +240,30 @@ function pts_test_platform_supported($identifier) { $xml_parser = new pts_test_tandem_XmlReader(pts_location_test($identifier)); $platforms = $xml_parser->getXMLValue(P_TEST_SUPPORTEDPLATFORMS); + $un_platforms = $xml_parser->getXMLValue(P_TEST_UNSUPPORTEDPLATFORMS); - if(!empty($platforms)) + if(OPERATING_SYSTEM != "Unknown") { - $platforms = explode(",", $platforms); + if(!empty($un_platforms)) + { + $un_platforms = explode(",", $un_platforms); - foreach($platforms as $key => $value) - $platforms[$key] = trim($value); + foreach($un_platforms as $key => $value) + $un_platforms[$key] = trim($value); - if(!in_array(OPERATING_SYSTEM, $platforms) && OPERATING_SYSTEM != "Unknown") - $supported = false; + if(in_array(OPERATING_SYSTEM, $un_platforms)) + $supported = false; + } + if(!empty($platforms)) + { + $platforms = explode(",", $platforms); + + foreach($platforms as $key => $value) + $platforms[$key] = trim($value); + + if(!in_array(OPERATING_SYSTEM, $platforms)) + $supported = false; + } } } diff --git a/pts-core/functions/pts-interfaces.php b/pts-core/functions/pts-interfaces.php index a9392bd..6214fc8 100644 --- a/pts-core/functions/pts-interfaces.php +++ b/pts-core/functions/pts-interfaces.php @@ -50,6 +50,7 @@ define("P_TEST_LICENSE", "PhoronixTestSuite/TestProfile/License"); // Test softw define("P_TEST_STATUS", "PhoronixTestSuite/TestProfile/Status"); // The status of the test profile define("P_TEST_SUPPORTEDARCHS", "PhoronixTestSuite/TestProfile/SupportedArchitectures"); // The system architectures supported by this test define("P_TEST_SUPPORTEDPLATFORMS", "PhoronixTestSuite/TestProfile/SupportedPlatforms"); // The OS software platforms supported by this test +define("P_TEST_UNSUPPORTEDPLATFORMS", "PhoronixTestSuite/TestProfile/UnsupportedPlatforms"); // The OS software platforms NOT supported by this test define("P_TEST_CTPEXTENDS", "PhoronixTestSuite/TestProfile/Extends"); // Does this test profile extend another test? (Cascading Test Profiles) define("P_TEST_ROOTNEEDED", "PhoronixTestSuite/TestProfile/RequiresRoot"); // Is root access needed? (TODO: Implement RequiresRoot) define("P_TEST_DOWNLOADSIZE", "PhoronixTestSuite/TestProfile/DownloadSize"); // Estimated size of capacity needed for downloads (in MB) diff --git a/pts-core/objects/pts_Graph.php b/pts-core/objects/pts_Graph.php index 41d57a0..6ee9bd3 100644 --- a/pts-core/objects/pts_Graph.php +++ b/pts-core/objects/pts_Graph.php @@ -104,7 +104,10 @@ class pts_Graph public function setRenderer($Renderer) { if($Renderer == "SVG") + { $this->graph_renderer = "SVG"; + $this->graph_left_start += 10; + } else $this->graph_renderer = "PNG"; } |