summaryrefslogtreecommitdiffstats
path: root/pts-core
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-11-22 09:34:25 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-11-22 09:34:25 -0500
commit052f187be76726df8c2fed355bf81498cef34768 (patch)
tree0ea3b72b2b42f002d65b1fc6024c0b1ddd77a71e /pts-core
parentd100fa6b0f19cb257bb4667543851a815b114fc2 (diff)
downloadphoronix-test-suite-upstream-052f187be76726df8c2fed355bf81498cef34768.tar.gz
phoronix-test-suite-upstream-052f187be76726df8c2fed355bf81498cef34768.tar.xz
phoronix-test-suite-upstream-052f187be76726df8c2fed355bf81498cef34768.zip
graphics_override, email_results, toggle_screensaver: Update to take
advantage of latest API
Diffstat (limited to 'pts-core')
-rw-r--r--pts-core/functions/pts-interfaces.php2
-rw-r--r--pts-core/modules/email_results.php6
-rw-r--r--pts-core/modules/graphics_event_checker.php5
-rw-r--r--pts-core/modules/graphics_override.php3
-rw-r--r--pts-core/modules/toggle_screensaver.php9
-rw-r--r--pts-core/objects/pts_test_usage_details.php2
6 files changed, 16 insertions, 11 deletions
diff --git a/pts-core/functions/pts-interfaces.php b/pts-core/functions/pts-interfaces.php
index 4d998e8..e4c974c 100644
--- a/pts-core/functions/pts-interfaces.php
+++ b/pts-core/functions/pts-interfaces.php
@@ -52,7 +52,7 @@ define("P_TEST_SUPPORTEDPLATFORMS", "PhoronixTestSuite/TestProfile/SupportedPlat
define("P_TEST_UNSUPPORTEDPLATFORMS", "PhoronixTestSuite/TestProfile/UnsupportedPlatforms"); // The OS software platforms NOT supported by this test
define("P_TEST_EXDEP", "PhoronixTestSuite/TestProfile/ExternalDependencies"); // Test external dependencies
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_ROOTNEEDED", "PhoronixTestSuite/TestProfile/RequiresRoot"); // Is root access needed? If set to "TRUE"
define("P_TEST_DOWNLOADSIZE", "PhoronixTestSuite/TestProfile/DownloadSize"); // Estimated size of capacity needed for downloads (in MB)
define("P_TEST_ENVIRONMENTSIZE", "PhoronixTestSuite/TestProfile/EnvironmentSize"); // Estimated size of capacity needed for testing environment (in MB)
define("P_TEST_ESTIMATEDTIME", "PhoronixTestSuite/TestProfile/EstimatedLength"); // Estimated length of time it takes the test to complete (in minutes)
diff --git a/pts-core/modules/email_results.php b/pts-core/modules/email_results.php
index 8198e24..43816bc 100644
--- a/pts-core/modules/email_results.php
+++ b/pts-core/modules/email_results.php
@@ -24,13 +24,13 @@
class email_results extends pts_module_interface
{
const module_name = "E-Mail Results";
- const module_version = "0.0.1";
+ const module_version = "0.1.0";
const module_description = "This is a module that will email the test results to an individual with the recipient email address being set in the EMAIL_RESULTS_TO environmental variable.";
const module_author = "Michael Larabel";
- public static function __shutdown()
+ public static function __post_option_process($process)
{
- if(($buffer = pts_text_save_buffer($to_add)) != null && getenv("EMAIL_RESULTS_TO") != FALSE)
+ if(($buffer = pts_text_save_buffer($to_add)) != null && getenv("EMAIL_RESULTS_TO") != FALSE && $process == "run_test")
{
$email_to = trim(getenv("EMAIL_RESULTS_TO"));
diff --git a/pts-core/modules/graphics_event_checker.php b/pts-core/modules/graphics_event_checker.php
index 7285219..2f9d0f1 100644
--- a/pts-core/modules/graphics_event_checker.php
+++ b/pts-core/modules/graphics_event_checker.php
@@ -24,7 +24,7 @@
class graphics_event_checker extends pts_module_interface
{
const module_name = "Graphics Event Checker";
- const module_version = "0.0.2";
+ const module_version = "0.1.0";
const module_description = "This module checks a number of events prior to and and after running a test to make sure the graphics sub-system wasn't put in a sour or unintended state. For instance, it makes sure syncing to vBlank isn't forced through the driver and that a graphics test hadn't ended prematurely where it left the resolution in an incorrect mode.";
const module_author = "Michael Larabel";
@@ -76,9 +76,8 @@ class graphics_event_checker extends pts_module_interface
{
self::check_video_events($pts_test_result);
}
- public static function __shutdown()
+ public static function __post_option_process()
{
-
if(self::$error_count > 0)
{
$error_breakdown = "\n";
diff --git a/pts-core/modules/graphics_override.php b/pts-core/modules/graphics_override.php
index ae2f765..bd7a76f 100644
--- a/pts-core/modules/graphics_override.php
+++ b/pts-core/modules/graphics_override.php
@@ -166,9 +166,8 @@ class graphics_override extends pts_module_interface
}
}
}
- public static function __shutdown()
+ public static function __post_option_process()
{
-
if(IS_NVIDIA_GRAPHICS)
{
if(self::$preset_aa !== FALSE)
diff --git a/pts-core/modules/toggle_screensaver.php b/pts-core/modules/toggle_screensaver.php
index ca641ab..b61dccc 100644
--- a/pts-core/modules/toggle_screensaver.php
+++ b/pts-core/modules/toggle_screensaver.php
@@ -24,7 +24,7 @@
class toggle_screensaver extends pts_module_interface
{
const module_name = "Toggle Screensaver";
- const module_version = "1.0.0";
+ const module_version = "1.0.1";
const module_description = "This module toggles the system's screensaver while the Phoronix Test Suite is running. At this time, the GNOME and KDE screensavers are supported.";
const module_author = "Phoronix Media";
@@ -76,6 +76,13 @@ class toggle_screensaver extends pts_module_interface
shell_exec("dcop kdesktop KScreensaverIface enable true 2>&1");
}
}
+ public static function __pre_option_process()
+ {
+ if(!self::$screensaver_halted)
+ {
+ shell_exec("xdg-screensaver reset 2>&1");
+ }
+ }
public static function __pre_run_process()
{
if(!self::$screensaver_halted)
diff --git a/pts-core/objects/pts_test_usage_details.php b/pts-core/objects/pts_test_usage_details.php
index ef1ef4d..4a1aeab 100644
--- a/pts-core/objects/pts_test_usage_details.php
+++ b/pts-core/objects/pts_test_usage_details.php
@@ -39,7 +39,7 @@ class pts_test_usage_details
$this->average_run_time = pts_format_time_string($xml_parser->getXMLValue(P_INSTALL_TEST_AVG_RUNTIME), "SECONDS", false);
$this->times_run = $xml_parser->getXMLValue(P_INSTALL_TEST_TIMESRUN);
- if($this->last_run_time == "0000-00-00" || $this->install_time == $this->last_run_time)
+ if($this->last_run_time == "0000-00-00" || empty($this->times_run))
{
$this->last_run_time = "NEVER";
$this->times_run = "";