From 28643a2c1073642f86be8e506fefd8824770df61 Mon Sep 17 00:00:00 2001 From: Michael Larabel Date: Sun, 28 Dec 2008 21:15:33 -0500 Subject: pts-core: When installing or running a test, only print to standard output if under 10KB --- pts-core/functions/pts-functions-install.php | 8 +++++++- pts-core/functions/pts-functions-run.php | 9 +++++++-- pts-core/objects/bilde_renderer/bilde_jpg_renderer.php | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) (limited to 'pts-core') diff --git a/pts-core/functions/pts-functions-install.php b/pts-core/functions/pts-functions-install.php index d2d08f8..21e94c5 100644 --- a/pts-core/functions/pts-functions-install.php +++ b/pts-core/functions/pts-functions-install.php @@ -426,11 +426,17 @@ function pts_install_test($identifier) pts_user_message($pre_install_message); - echo $install_log = pts_call_test_script($identifier, "install", null, TEST_ENV_DIR . $identifier . "/", pts_run_additional_vars($identifier), false); + $install_log = pts_call_test_script($identifier, "install", null, TEST_ENV_DIR . $identifier . "/", pts_run_additional_vars($identifier), false); if(!empty($install_log)) { @file_put_contents(TEST_ENV_DIR . $identifier . "/install.log", $install_log); + + if(strlen($install_log) < 10240) + { + // Not worth printing files over 10kb to screen + echo $install_log; + } } pts_user_message($post_install_message); diff --git a/pts-core/functions/pts-functions-run.php b/pts-core/functions/pts-functions-run.php index 4c74cd2..749d505 100644 --- a/pts-core/functions/pts-functions-run.php +++ b/pts-core/functions/pts-functions-run.php @@ -871,9 +871,14 @@ function pts_run_test($test_identifier, $extra_arguments = "", $arguments_descri echo pts_string_header($test_title . " (Run " . ($i + 1) . " of " . $times_to_run . ")"); $result_output = array(); - echo $test_results = pts_exec("cd " . $to_execute . " && " . $execute_binary_prepend . "./" . $execute_binary . " " . $pts_test_arguments, $test_extra_runtime_variables); + $test_results = pts_exec("cd " . $to_execute . " && " . $execute_binary_prepend . "./" . $execute_binary . " " . $pts_test_arguments, $test_extra_runtime_variables); - if(is_file($benchmark_log_file) && trim($test_results) == "") + if(strlen($test_results) < 10240) + { + echo $test_results; + } + + if(is_file($benchmark_log_file) && trim($test_results) == "" && filesize($benchmark_log_file) < 10240) { echo file_get_contents($benchmark_log_file); } diff --git a/pts-core/objects/bilde_renderer/bilde_jpg_renderer.php b/pts-core/objects/bilde_renderer/bilde_jpg_renderer.php index 6f1a5f1..7810f37 100644 --- a/pts-core/objects/bilde_renderer/bilde_jpg_renderer.php +++ b/pts-core/objects/bilde_renderer/bilde_jpg_renderer.php @@ -5,7 +5,7 @@ URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/ Copyright (C) 2008, Phoronix Media Copyright (C) 2008, Michael Larabel - bilde_png_renderer: The PNG rendering implementation for bilde_renderer. + bilde_jpg_renderer: The JPEG rendering implementation for bilde_renderer. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -- cgit