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 aa46c82..528e659 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -1,5 +1,9 @@
PHORONIX TEST SUITE CHANGE-LOG
+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
+
Phoronix Test Suite 2.4.0
February 2, 2010
diff --git a/pts-core/modules/phoromatic.php b/pts-core/modules/phoromatic.php
index 14f5d0f..1039975 100644
--- a/pts-core/modules/phoromatic.php
+++ b/pts-core/modules/phoromatic.php
@@ -87,7 +87,8 @@ class phoromatic extends pts_module_interface
return array(
"start" => "user_start",
"user_system_return" => "user_system_return",
- "upload_results" => "upload_unscheduled_results"
+ "upload_results" => "upload_unscheduled_results",
+ "clone_results" => "clone_results"
);
}
@@ -109,7 +110,6 @@ class phoromatic extends pts_module_interface
phoromatic::user_system_process();
}
-
public static function upload_unscheduled_results($to_upload)
{
if(!phoromatic::phoromatic_setup_module())
@@ -125,6 +125,42 @@ class phoromatic extends pts_module_interface
phoromatic::upload_unscheduled_test_results($to_upload[0]);
}
+ public static function clone_results($to_clone)
+ {
+ if(!phoromatic::phoromatic_setup_module())
+ {
+ return false;
+ }
+
+ if(!isset($to_clone[0]) || empty($to_clone[0]))
+ {
+ echo "\nNo clone string was provided.\n";
+ return false;
+ }
+
+ $server_response = phoromatic::upload_to_remote_server(array(
+ "r" => "clone_test_results",
+ "i" => $to_clone[0]
+ ));
+
+ switch(pts_xml_read_single_value($server_response, M_PHOROMATIC_GEN_RESPONSE))
+ {
+ case M_PHOROMATIC_RESPONSE_TRUE:
+ $identifier = "phoromatic-clone-" . str_replace(array('_', ':'), null, $to_clone[0]);
+ pts_save_result($identifier . "/composite.xml", $server_response);
+ echo "\nResult Saved To: " . SAVE_RESULTS_DIR . $identifier . "/composite.xml\n\n";
+ pts_set_assignment_next("PREV_SAVE_RESULTS_IDENTIFIER", $identifier);
+ pts_display_web_browser(SAVE_RESULTS_DIR . $identifier . "/index.html");
+ break;
+ case M_PHOROMATIC_RESPONSE_SETTING_DISABLED:
+ echo "\nYou need to enable this support from your Phoromatic account web interface.\n";
+ break;
+ default:
+ case M_PHOROMATIC_RESPONSE_ERROR:
+ echo "\nAn Error Occurred.\n";
+ break;
+ }
+ }
//
// Core Functions
<
Copyright © 2010 by Phoronix Media