diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-10-22 14:33:37 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-10-22 14:33:37 -0400 |
commit | 35517ee589bbc859b5fbc10651e76df25f28c4f5 (patch) | |
tree | 1b87015fb017f5c7a637b2c828e580f81592122f | |
parent | 818ec8e8353ad5a29e3693c44dfc73af79573afc (diff) | |
download | phoronix-test-suite-upstream-35517ee589bbc859b5fbc10651e76df25f28c4f5.tar.gz phoronix-test-suite-upstream-35517ee589bbc859b5fbc10651e76df25f28c4f5.tar.xz phoronix-test-suite-upstream-35517ee589bbc859b5fbc10651e76df25f28c4f5.zip |
pts-core: Add __event_global_upload to PTS modules support for calling
this function and passing the Phoronix Global URL when results have been
uploaded
-rw-r--r-- | EXPERIMENTAL-CHANGE-LOG | 1 | ||||
-rw-r--r-- | pts-core/functions/pts-functions_modules.php | 4 | ||||
-rw-r--r-- | pts-core/objects/pts_module_interface.php | 11 | ||||
-rw-r--r-- | pts-core/pts-run-cmd.php | 1 | ||||
-rw-r--r-- | pts-core/pts-run-test.php | 1 |
5 files changed, 18 insertions, 0 deletions
diff --git a/EXPERIMENTAL-CHANGE-LOG b/EXPERIMENTAL-CHANGE-LOG index 79cfb56..d393896 100644 --- a/EXPERIMENTAL-CHANGE-LOG +++ b/EXPERIMENTAL-CHANGE-LOG @@ -29,6 +29,7 @@ Phoronix Test Suite (Git) - pts-core: Support for running a test from a PTS graph file that's rendered as an SVG and then the user will be prompted with available choices - pts-core: Add support for reading DMI information from dmidecode where available through the read_dmidecode() function - pts-core: Add Linux support for reading DIMM speed, capacity, and bank information through DMI +- pts-core: Add __event_global_upload to PTS modules support for calling this function and passing the Phoronix Global URL when results have been uploaded - pts: Update espeak test profile with eSpeak engine 1.39 - pts: Change run-count for gtkperf test profile from 2000 to 5000 - pts: Drop etc/ folder full of XML template files diff --git a/pts-core/functions/pts-functions_modules.php b/pts-core/functions/pts-functions_modules.php index d9b982a..aad3a8e 100644 --- a/pts-core/functions/pts-functions_modules.php +++ b/pts-core/functions/pts-functions_modules.php @@ -183,6 +183,10 @@ function pts_module_processes() return array("__startup", "__pre_install_process", "__pre_test_install", "__post_test_install", "__post_install_process", "__pre_run_process", "__pre_test_run", "__interim_test_run", "__post_test_run", "__post_run_process", "__shutdown"); } +function pts_module_events() +{ + return array("__event_global_upload"); +} function pts_module_call($module, $process, $object_pass = null) { if(pts_module_type($module) == "PHP") diff --git a/pts-core/objects/pts_module_interface.php b/pts-core/objects/pts_module_interface.php index e368839..e2a2551 100644 --- a/pts-core/objects/pts_module_interface.php +++ b/pts-core/objects/pts_module_interface.php @@ -106,6 +106,17 @@ class pts_module_interface // Passed is an array of test identifiers for all tests that were scheduled to run return; } + + // + // Event-driven Functions + // + + + public static function __event_global_upload($obj = null) + { + // Passed is a string of the URL for the test results uploaded to Phoronix Global + return; + } } ?> diff --git a/pts-core/pts-run-cmd.php b/pts-core/pts-run-cmd.php index df10328..a59616c 100644 --- a/pts-core/pts-run-cmd.php +++ b/pts-core/pts-run-cmd.php @@ -680,6 +680,7 @@ switch($COMMAND) if(!empty($upload_url)) { echo "Results Uploaded To: " . $upload_url . "\n\n"; + pts_module_process("__event_global_upload", $upload_url); } else { diff --git a/pts-core/pts-run-test.php b/pts-core/pts-run-test.php index 2361529..3c708b7 100644 --- a/pts-core/pts-run-test.php +++ b/pts-core/pts-run-test.php @@ -562,6 +562,7 @@ if($SAVE_RESULTS) if(!empty($upload_url)) { echo "\nResults Uploaded To: " . $upload_url . "\n"; + pts_module_process("__event_global_upload", $upload_url); display_web_browser($upload_url, "Do you want to launch Phoronix Global", true); } else |