Summary
Description: Unnamed repository; edit this file to name it for gitweb.
Last Change: Sun 9/5/10 11:56
Recent Commits
>
--git a/CHANGE-LOG b/CHANGE-LOG
index 20431bb..0736b86 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -4,6 +4,7 @@ Phoronix Test Suite (Git)
- phoromatic: Add phoromatic.clone-results option for cloning test results from a Phoromatic repository, when the clone option is enabled from the server side
- phoromatic: Add phoromatic.system-schedule option for seeing the system's test schedule from the Phoromatic server
+- phoromatic: Add phoromatic.system-schedule-today option for seeing the system's test schedule for today from the Phoromatic server
- pts: Drop MD5 hashes in the wine-* humus tests
Phoronix Test Suite 2.4.0
diff --git a/pts-core/modules/phoromatic.php b/pts-core/modules/phoromatic.php
index 9716239..13b90dd 100644
--- a/pts-core/modules/phoromatic.php
+++ b/pts-core/modules/phoromatic.php
@@ -94,7 +94,8 @@ class phoromatic extends pts_module_interface
"user_system_return" => "user_system_return",
"upload_results" => "upload_unscheduled_results",
"clone_results" => "clone_results",
- "system_schedule" => "system_schedule"
+ "system_schedule" => "system_schedule",
+ "system_schedule_today" => "system_schedule_today"
);
}
@@ -192,9 +193,43 @@ class phoromatic extends pts_module_interface
{
for($i = 0; $i < count($schedule_titles); $i++)
{
- echo "\n" . $schedule_titles[$i] . ":\n";
- echo "\t" . $schedule_description[$i] . "\n";
- echo "\tRuns at " . $schedule_start_time[$i] . " on " . pts_parse_week_string($schedule_active_on[$i]) . ".\n";
+ echo self::phoromatic_schedule_entry_string($schedule_titles[$i], $schedule_description[$i], $schedule_start_time[$i], $schedule_active_on[$i]);
+ }
+ }
+
+ echo "\n";
+ }
+ public static function system_schedule_today()
+ {
+ if(!phoromatic::phoromatic_setup_module())
+ {
+ return false;
+ }
+
+ $server_response = phoromatic::upload_to_remote_server(array(
+ "r" => "system_schedule"
+ ));
+
+ $schedule_xml = new tandem_XmlReader($server_response);
+ $schedule_titles = $schedule_xml->getXmlArrayValues(M_PHOROMATIC_SCHEDULE_TEST_TITLE);
+ $schedule_description = $schedule_xml->getXmlArrayValues(M_PHOROMATIC_SCHEDULE_TEST_DESCRIPTION);
+ $schedule_active_on = $schedule_xml->getXmlArrayValues(M_PHOROMATIC_SCHEDULE_TEST_ACTIVE_ON);
+ $schedule_start_time = $schedule_xml->getXmlArrayValues(M_PHOROMATIC_SCHEDULE_TEST_START);
+
+ if(count($schedule_titles) == 0)
+ {
+ echo "\nNo test schedules for this system were found on Phoromatic.\n";
+ }
+ else
+ {
+ for($i = 0; $i < count($schedule_titles); $i++)
+ {
+ if($schedule_active_on[$i][(date('w'))] != 1)
+ {
+ continue;
+ }
+
+ echo self::phoromatic_schedule_entry_string($schedule_titles[$i], $schedule_description[$i], $schedule_start_time[$i], $schedule_active_on[$i]);
}
}
@@ -473,6 +508,12 @@ class phoromatic extends pts_module_interface
pts_attach_module($phoromatic);
return true;
}
+ protected static function phoromatic_schedule_entry_string($title, $description, $start_time, $active_on)
+ {
+ echo "\n" . $title . ":\n";
+ echo "\t" . $description . "\n";
+ echo "\tRuns at " . $start_time . " on " . pts_parse_week_string($active_on) . ".\n";
+ }
//
<
Copyright © 2010 by Phoronix Media