Summary
Description: Phoronix Test Suite open-source benchmarking development
Last Change: Tue 5/21/13 15:49
Recent Commits
>
--git a/pts-core/library/pts-includes-execution.php b/pts-core/library/pts-includes-execution.php
index 740d0f5..4cc654a 100644
--- a/pts-core/library/pts-includes-execution.php
+++ b/pts-core/library/pts-includes-execution.php
@@ -21,7 +21,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-function pts_call_test_script($test_identifier, $script_name, $print_string = null, $pass_argument = null, $extra_vars = null, $use_ctp = true)
+function pts_call_test_script($test_identifier, $script_name, $print_string = null, $pass_argument = null, $extra_vars = null, $use_ctp = true, &$display_mode = null)
{
$result = null;
$test_directory = TEST_ENV_DIR . $test_identifier . "/";
@@ -44,7 +44,14 @@ function pts_call_test_script($test_identifier, $script_name, $print_string = nu
if(!empty($print_string))
{
- echo $print_string;
+ if($display_mode == null)
+ {
+ echo $print_string;
+ }
+ else
+ {
+ $display_mode->test_run_message($print_string);
+ }
}
if($file_extension == "php")
diff --git a/pts-core/library/pts-includes-install.php b/pts-core/library/pts-includes-install.php
index 8bf01d2..07dafc1 100644
--- a/pts-core/library/pts-includes-install.php
+++ b/pts-core/library/pts-includes-install.php
@@ -89,10 +89,7 @@ function pts_start_install($to_install, &$display_mode)
if(!pts_is_assignment("SILENCE_MESSAGES") && count($failed_installs) > 0 && count($tests) > 1)
{
echo "\nThe following tests failed to install:\n\n";
- foreach($failed_installs as $fail)
- {
- echo "\t- " . $fail . "\n";
- }
+ echo pts_text_list($failed_installs, "\t- ");
echo "\n";
}
@@ -306,6 +303,10 @@ function pts_download_test_files($identifier, &$display_mode)
{
$try_again = pts_bool_question("Try downloading the file again (Y/n)?", true, "TRY_DOWNLOAD_AGAIN", $display_mode);
}
+ else
+ {
+ $try_again = false;
+ }
if($try_again)
{
diff --git a/pts-core/library/pts-includes-run.php b/pts-core/library/pts-includes-run.php
index fe88ec5..478248f 100644
--- a/pts-core/library/pts-includes-run.php
+++ b/pts-core/library/pts-includes-run.php
@@ -24,7 +24,7 @@
require_once(PTS_LIBRARY_PATH . "pts-includes-run_setup.php");
require_once(PTS_LIBRARY_PATH . "pts-includes-run_options.php");
-function pts_cleanup_tests_to_run(&$to_run_identifiers)
+function pts_cleanup_tests_to_run(&$to_run_identifiers, &$display_mode)
{
$skip_tests = ($e = getenv("SKIP_TESTS")) ? explode(',', $e) : false;
$tests_missing = array();
@@ -52,7 +52,7 @@ function pts_cleanup_tests_to_run(&$to_run_identifiers)
if($skip_tests && in_array($lower_identifier, $skip_tests))
{
- echo pts_string_header("Skipping test: " . $lower_identifier);
+ echo "Skipping Test: " . $lower_identifier . "\n";
$test_passes = false;
}
else if(pts_is_test($lower_identifier))
@@ -61,7 +61,7 @@ function pts_cleanup_tests_to_run(&$to_run_identifiers)
if(empty($test_title))
{
- echo pts_string_header($lower_identifier . " is not a test.");
+ echo "Not A Test: " . $lower_identifier . "\n";
$test_passes = false;
}
else
@@ -73,7 +73,7 @@ function pts_cleanup_tests_to_run(&$to_run_identifiers)
{
if(pts_suite_version_supported($lower_identifier) == false)
{
- echo pts_string_header($lower_identifier . " is a suite not supported by this version of the Phoronix Test Suite.");
+ echo $lower_identifier . " is a suite not supported by this version of the Phoronix Test Suite.\n";
$test_passes = false;
}
}
@@ -87,7 +87,7 @@ function pts_cleanup_tests_to_run(&$to_run_identifiers)
}
else if(!pts_is_run_object($lower_identifier) && !pts_global_valid_id_string($lower_identifier) && !pts_is_test_result($lower_identifier))
{
- echo pts_string_header($lower_identifier . " is not recognized.");
+ echo "Not Recognized: " . $lower_identifier . "\n";
}
if($test_passes && pts_verify_test_installation($lower_identifier, $tests_missing) == false)
@@ -776,10 +776,11 @@ function pts_run_test(&$test_run_request, &$display_mode)
pts_module_process("__pre_test_run", $test_results);
$time_test_start = time();
+ $display_mode->test_run_start($test_results);
if(!$cache_share_present)
{
- echo pts_call_test_script($test_identifier, "pre", "\nRunning Pre-Test Scripts...\n", $test_directory, $extra_runtime_variables);
+ pts_call_test_script($test_identifier, "pre", "Running Pre-Test Script", $test_directory, $extra_runtime_variables, true, $display_mode);
}
pts_user_message($test_profile->get_pre_run_message());
@@ -807,8 +808,6 @@ function pts_run_test(&$test_run_request, &$display_mode)
$backup_test_log_dir = false;
}
- $display_mode->test_run_start($test_results);
-
for($i = 0, $abort_testing = false, $time_test_start_actual = time(), $defined_times_to_run = $times_to_run; $i < $times_to_run && !$abort_testing; $i++)
{
$display_mode->test_run_instance_header($test_results, ($i + 1), $times_to_run);
@@ -988,7 +987,7 @@ function pts_run_test(&$test_run_request, &$display_mode)
{
if(!$cache_share_present)
{
- echo pts_call_test_script($test_identifier, "interim", null, $test_directory, $extra_runtime_variables);
+ pts_call_test_script($test_identifier, "interim", "Running Interim-Test Script", $test_directory, $extra_runtime_variables, true, $display_mode);
sleep(2); // Rest for a moment between tests
}
@@ -1019,7 +1018,7 @@ function pts_run_test(&$test_run_request, &$display_mode)
if(!$cache_share_present)
{
- echo pts_call_test_script($test_identifier, "post", null, $test_directory, $extra_runtime_variables);
+ pts_call_test_script($test_identifier, "post", "Running Post-Test Script", $test_directory, $extra_runtime_variables, true, $display_mode);
}
if($abort_testing)
diff --git a/pts-core/objects/display_modes/pts_basic_display_mode.php b/pts-core/objects/display_modes/pts_basic_display_mode.php
index 7c36e1a..1e6d724 100644
--- a/pts-core/objects/display_modes/pts_basic_display_mode.php
+++ b/pts-core/objects/display_modes/pts_basic_display_mode.php
@@ -99,6 +99,10 @@ class pts_basic_display_mode implements pts_display_mode_interface
{
return;
}
+ public function test_run_message($message_string)
+ {
+ echo "\n" . $message_string . "\n";
+ }
public function test_run_start(&$test_result)
{
return;
diff --git a/pts-core/objects/display_modes/pts_concise_display_mode.php b/pts-core/objects/display_modes/pts_concise_display_mode.php
index 659139b..f5d4012 100644
--- a/pts-core/objects/display_modes/pts_concise_display_mode.php
+++ b/pts-core/objects/display_modes/pts_concise_display_mode.php
@@ -210,6 +210,10 @@ class pts_concise_display_mode implements pts_display_mode_interface
echo $this->tab . "Expected Trial Run Count: " . $test_result->get_test_profile()->get_times_to_run() . "\n";
}
+ public function test_run_message($message_string)
+ {
+ echo $this->tab . $this->tab . $message_string . " @ " . date("H:i:s") . "\n";
+ }
public function test_run_instance_header(&$test_result, $current_run, $total_run_count)
{
echo $this->tab . $this->tab . "Started Run " . $current_run . " @ " . date("H:i:s") . "\n";
diff --git a/pts-core/objects/display_modes/pts_display_mode_interface.php b/pts-core/objects/display_modes/pts_display_mode_interface.php
index 69e2de5..c9f09b5 100644
--- a/pts-core/objects/display_modes/pts_display_mode_interface.php
+++ b/pts-core/objects/display_modes/pts_display_mode_interface.php
@@ -35,6 +35,7 @@ interface pts_display_mode_interface
public function test_install_error($error_string);
public function test_install_prompt($prompt_string);
public function test_run_start(&$test_result);
+ public function test_run_message($message_string);
public function test_run_instance_header(&$test_result, $current_run, $total_run_count);
public function test_run_output(&$to_output);
public function test_run_end(&$test_result);
diff --git a/pts-core/options/run_test.php b/pts-core/options/run_test.php
index da34893..006a9f4 100644
--- a/pts-core/options/run_test.php
+++ b/pts-core/options/run_test.php
@@ -39,10 +39,11 @@ class run_test implements pts_option_interface
return false;
}
+ $display_mode = pts_get_display_mode_object();
$test_properties = array();
// Cleanup tests to run
- if(pts_cleanup_tests_to_run($to_run_identifiers) == false)
+ if(pts_cleanup_tests_to_run($to_run_identifiers, $display_mode) == false)
{
return false;
}
@@ -274,7 +275,6 @@ class run_test implements pts_option_interface
}
// Run the test process
- $display_mode = pts_get_display_mode_object();
pts_validate_test_installations_to_run($test_run_manager, $display_mode);
if($test_run_manager->get_tests_to_run_count() == 0)
<
Copyright © 2013 by Phoronix Media