summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-11-29 18:49:02 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-11-29 18:49:02 -0500
commit2d9499273f3f799b65ebe06c97786aa68ba797c7 (patch)
treec4455cb36cbeacffcc07828ebc7e1f92b6628f9d
parentc7356bebfd9ade46678a591b6f53f06b8c0b7261 (diff)
downloadphoronix-test-suite-upstream-2d9499273f3f799b65ebe06c97786aa68ba797c7.tar.gz
phoronix-test-suite-upstream-2d9499273f3f799b65ebe06c97786aa68ba797c7.tar.xz
phoronix-test-suite-upstream-2d9499273f3f799b65ebe06c97786aa68ba797c7.zip
pts-core: Ensure all PTS options extend the pts_option_interface
-rw-r--r--TYDAL-CHANGE-LOG1
-rwxr-xr-xphoronix-test-suite28
-rw-r--r--pts-core/functions/pts-functions.php8
-rw-r--r--pts-core/functions/pts-functions_modules.php8
-rw-r--r--pts-core/options/analyze_all_runs.php2
-rw-r--r--pts-core/options/analyze_batch.php2
-rw-r--r--pts-core/options/batch_setup.php4
-rw-r--r--pts-core/options/benchmark.php2
-rw-r--r--pts-core/options/clone_global_result.php2
-rw-r--r--pts-core/options/core_version.php4
-rw-r--r--pts-core/options/diagnostics_dump.php4
-rw-r--r--pts-core/options/global_login.php4
-rw-r--r--pts-core/options/information.php2
-rw-r--r--pts-core/options/initial_config.php4
-rw-r--r--pts-core/options/install_all.php4
-rw-r--r--pts-core/options/install_external_dependencies.php2
-rw-r--r--pts-core/options/install_test.php2
-rw-r--r--pts-core/options/list_installed_tests.php4
-rw-r--r--pts-core/options/list_modules.php4
-rw-r--r--pts-core/options/list_possible_dependencies.php4
-rw-r--r--pts-core/options/list_saved_results.php4
-rw-r--r--pts-core/options/list_suites.php4
-rw-r--r--pts-core/options/list_test_usage.php4
-rw-r--r--pts-core/options/list_tests.php4
-rw-r--r--pts-core/options/make_download_cache.php4
-rw-r--r--pts-core/options/merge_results.php2
-rw-r--r--pts-core/options/module_information.php2
-rw-r--r--pts-core/options/module_setup.php2
-rw-r--r--pts-core/options/refresh_graphs.php2
-rw-r--r--pts-core/options/remove_all_results.php4
-rw-r--r--pts-core/options/remove_installed_test.php2
-rw-r--r--pts-core/options/remove_result.php2
-rw-r--r--pts-core/options/result_information.php2
-rw-r--r--pts-core/options/run_test.php2
-rw-r--r--pts-core/options/show_result.php2
-rw-r--r--pts-core/options/system_information.php4
-rw-r--r--pts-core/options/test_module.php2
-rw-r--r--pts-core/options/upload_result.php2
38 files changed, 73 insertions, 72 deletions
diff --git a/TYDAL-CHANGE-LOG b/TYDAL-CHANGE-LOG
index 627c2e0..f07571f 100644
--- a/TYDAL-CHANGE-LOG
+++ b/TYDAL-CHANGE-LOG
@@ -16,6 +16,7 @@ Phoronix Test Suite (Git)
- pts-core: Rework the pts_run_option interface to set options to run next
- pts-core: Change benchmark option to using the revised pts_run_option interface to avoid double pts-core initalization
- pts-core: Eliminate use of SILENT_INSTALL environmental variable
+- pts-core: Ensure all PTS options extend the pts_option_interface
- pts: Add adjustable file size support for bonnie test profile
- tandem_XmlReader: Major performance improvements and optimizations
- bilde_renderer: New PTS-spawned abstracted image rendering interface that supports SVG and PNG rendering with a standard API
diff --git a/phoronix-test-suite b/phoronix-test-suite
index 9606a28..0f07562 100755
--- a/phoronix-test-suite
+++ b/phoronix-test-suite
@@ -67,7 +67,7 @@ then
PHP5 CLI Must Be Installed To Run The Phoronix Test Suite.
Only PHP For The Command Line Is Needed, Not A Complete PHP w/ Web Server Installation
-The PHP CLI package is usually called php-cli or php5-cli. Also required is the PHP GD library (php-gd)
+The PHP CLI package is usually called php-cli or php5-cli. Also recommended is the PHP GD library (php-gd)
For support visit: http://www.phoronix-test-suite.com/
EOT
@@ -90,21 +90,18 @@ case "$1" in
"install-dependencies")
$PHP_BIN pts-core/phoronix-test-suite.php INSTALL_EXTERNAL_DEPENDENCIES $OPTION_ARG
;;
-"install-all" | "force-install-all")
- $PHP_BIN pts-core/phoronix-test-suite.php INSTALL_ALL
- ;;
-"run")
- $PHP_BIN pts-core/phoronix-test-suite.php RUN_TEST $OPTION_ARG
- ;;
-"batch-run")
- export PTS_BATCH_MODE=1
+"run" | "batch-run")
+ if [ "$1" = "batch-run" ]
+ then
+ export PTS_BATCH_MODE=1
+ fi
$PHP_BIN pts-core/phoronix-test-suite.php RUN_TEST $OPTION_ARG
;;
-"benchmark")
- $PHP_BIN pts-core/phoronix-test-suite.php BENCHMARK $OPTION_ARG
- ;;
-"batch-benchmark")
- export PTS_BATCH_MODE=1
+"benchmark" | "batch-benchmark")
+ if [ "$1" = "batch-benchmark" ]
+ then
+ export PTS_BATCH_MODE=1
+ fi
$PHP_BIN pts-core/phoronix-test-suite.php BENCHMARK $OPTION_ARG
;;
"merge-results")
@@ -176,6 +173,9 @@ case "$1" in
"clone")
$PHP_BIN pts-core/phoronix-test-suite.php CLONE_GLOBAL_RESULT $OPTION_ARG
;;
+"install-all" | "force-install-all")
+ $PHP_BIN pts-core/phoronix-test-suite.php INSTALL_ALL
+ ;;
"initial-config")
$PHP_BIN pts-core/phoronix-test-suite.php INITIAL_CONFIG
;;
diff --git a/pts-core/functions/pts-functions.php b/pts-core/functions/pts-functions.php
index 5319549..d6caf49 100644
--- a/pts-core/functions/pts-functions.php
+++ b/pts-core/functions/pts-functions.php
@@ -689,14 +689,6 @@ function pts_evaluate_script_type($script)
return $script_type;
}
-function pts_set_environment_variable($name, $value)
-{
- // Sets an environmental variable
- if(getenv($name) == false)
- {
- putenv($name . "=" . $value);
- }
-}
function pts_proximity_match($search, $match_to)
{
// Proximity search in $search string for * against $match_to
diff --git a/pts-core/functions/pts-functions_modules.php b/pts-core/functions/pts-functions_modules.php
index 18384b8..b64a87f 100644
--- a/pts-core/functions/pts-functions_modules.php
+++ b/pts-core/functions/pts-functions_modules.php
@@ -378,5 +378,13 @@ function pts_module_activity($process, $value = null)
return $return;
}
+function pts_set_environment_variable($name, $value)
+{
+ // Sets an environmental variable
+ if(getenv($name) == false)
+ {
+ putenv($name . "=" . $value);
+ }
+}
?>
diff --git a/pts-core/options/analyze_all_runs.php b/pts-core/options/analyze_all_runs.php
index 44e9772..43e05e6 100644
--- a/pts-core/options/analyze_all_runs.php
+++ b/pts-core/options/analyze_all_runs.php
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class analyze_all_runs
+class analyze_all_runs implements pts_option_interface
{
public static function run($r)
{
diff --git a/pts-core/options/analyze_batch.php b/pts-core/options/analyze_batch.php
index aa3cd83..d455e00 100644
--- a/pts-core/options/analyze_batch.php
+++ b/pts-core/options/analyze_batch.php
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class analyze_batch
+class analyze_batch implements pts_option_interface
{
public static function run($r)
{
diff --git a/pts-core/options/batch_setup.php b/pts-core/options/batch_setup.php
index be4c2bc..aa9d2a2 100644
--- a/pts-core/options/batch_setup.php
+++ b/pts-core/options/batch_setup.php
@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class batch_setup
+class batch_setup implements pts_option_interface
{
- public static function run()
+ public static function run($r)
{
echo "\nThese are the default configuration options for when running the Phoronix Test Suite in a batch mode (i.e. running phoronix-test-suite batch-benchmark universe). Running in a batch mode is designed to be as autonomous as possible, except for where you'd like any end-user interaction.\n\n";
$batch_options = array();
diff --git a/pts-core/options/benchmark.php b/pts-core/options/benchmark.php
index 1318b74..d5d5bd1 100644
--- a/pts-core/options/benchmark.php
+++ b/pts-core/options/benchmark.php
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class benchmark
+class benchmark implements pts_option_interface
{
public static function run($r)
{
diff --git a/pts-core/options/clone_global_result.php b/pts-core/options/clone_global_result.php
index f389120..6c55065 100644
--- a/pts-core/options/clone_global_result.php
+++ b/pts-core/options/clone_global_result.php
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class clone_global_result
+class clone_global_result implements pts_option_interface
{
public static function run($r)
{
diff --git a/pts-core/options/core_version.php b/pts-core/options/core_version.php
index c5894a6..def64bf 100644
--- a/pts-core/options/core_version.php
+++ b/pts-core/options/core_version.php
@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class core_version
+class core_version implements pts_option_interface
{
- public static function run()
+ public static function run($r)
{
echo "\nPhoronix Test Suite v" . PTS_VERSION . " (" . PTS_CODENAME . ")\n\n";
}
diff --git a/pts-core/options/diagnostics_dump.php b/pts-core/options/diagnostics_dump.php
index 1fbebb0..6a19c09 100644
--- a/pts-core/options/diagnostics_dump.php
+++ b/pts-core/options/diagnostics_dump.php
@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class diagnostics_dump
+class diagnostics_dump implements pts_option_interface
{
- public static function run()
+ public static function run($r)
{
echo pts_string_header("Phoronix Test Suite v" . PTS_VERSION . " (" . PTS_CODENAME . ")\n" . "Diagnostics Dump");
$pts_defined_constants = get_defined_constants(true);
diff --git a/pts-core/options/global_login.php b/pts-core/options/global_login.php
index 993fd76..d17be75 100644
--- a/pts-core/options/global_login.php
+++ b/pts-core/options/global_login.php
@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class global_login
+class global_login implements pts_option_interface
{
- public static function run()
+ public static function run($r)
{
echo "\nIf you haven't already registered for your free Phoronix Global account, you can do so at http://global.phoronix-test-suite.com/\n\nOnce you have registered your account and clicked the link within the verification email, enter your log-in information below.\n\n";
echo "User-Name: ";
diff --git a/pts-core/options/information.php b/pts-core/options/information.php
index 7a3ca07..72a6cfd 100644
--- a/pts-core/options/information.php
+++ b/pts-core/options/information.php
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class information
+class information implements pts_option_interface
{
public static function run($r)
{
diff --git a/pts-core/options/initial_config.php b/pts-core/options/initial_config.php
index 83f66af..f6251c6 100644
--- a/pts-core/options/initial_config.php
+++ b/pts-core/options/initial_config.php
@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class initial_config
+class initial_config implements pts_option_interface
{
- public static function run()
+ public static function run($r)
{
if(is_file(PTS_USER_DIR . "user-config.xml"))
{
diff --git a/pts-core/options/install_all.php b/pts-core/options/install_all.php
index 24290d6..42143c2 100644
--- a/pts-core/options/install_all.php
+++ b/pts-core/options/install_all.php
@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class install_all
+class install_all implements pts_option_interface
{
- public static function run()
+ public static function run($r)
{
include_once("pts-core/functions/pts-functions-install.php");
diff --git a/pts-core/options/install_external_dependencies.php b/pts-core/options/install_external_dependencies.php
index d99f858..bebd36a 100644
--- a/pts-core/options/install_external_dependencies.php
+++ b/pts-core/options/install_external_dependencies.php
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class install_external_dependencies
+class install_external_dependencies implements pts_option_interface
{
public static function run($r)
{
diff --git a/pts-core/options/install_test.php b/pts-core/options/install_test.php
index 0c3ffd4..df1c845 100644
--- a/pts-core/options/install_test.php
+++ b/pts-core/options/install_test.php
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class install_test
+class install_test implements pts_option_interface
{
public static function run($r)
{
diff --git a/pts-core/options/list_installed_tests.php b/pts-core/options/list_installed_tests.php
index b346d2d..26293aa 100644
--- a/pts-core/options/list_installed_tests.php
+++ b/pts-core/options/list_installed_tests.php
@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class list_installed_tests
+class list_installed_tests implements pts_option_interface
{
- public static function run()
+ public static function run($r)
{
echo pts_string_header("Phoronix Test Suite - Installed Tests");
foreach(pts_installed_tests_array() as $identifier)
diff --git a/pts-core/options/list_modules.php b/pts-core/options/list_modules.php
index 1233114..5db3d20 100644
--- a/pts-core/options/list_modules.php
+++ b/pts-core/options/list_modules.php
@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class list_modules
+class list_modules implements pts_option_interface
{
- public static function run()
+ public static function run($r)
{
echo pts_string_header("Phoronix Test Suite - Modules");
$available_modules = array_merge(glob(MODULE_DIR . "*.sh"), glob(MODULE_DIR . "*.php"));
diff --git a/pts-core/options/list_possible_dependencies.php b/pts-core/options/list_possible_dependencies.php
index 5bd1216..50095eb 100644
--- a/pts-core/options/list_possible_dependencies.php
+++ b/pts-core/options/list_possible_dependencies.php
@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class list_possible_dependencies
+class list_possible_dependencies implements pts_option_interface
{
- public static function run()
+ public static function run($r)
{
echo pts_string_header("Phoronix Test Suite - Possible External Dependencies");
$xml_parser = new tandem_XmlReader(XML_DISTRO_DIR . "generic-packages.xml");
diff --git a/pts-core/options/list_saved_results.php b/pts-core/options/list_saved_results.php
index 212d44e..e65dd7f 100644
--- a/pts-core/options/list_saved_results.php
+++ b/pts-core/options/list_saved_results.php
@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class list_saved_results
+class list_saved_results implements pts_option_interface
{
- public static function run()
+ public static function run($r)
{
echo pts_string_header("Phoronix Test Suite - Saved Results");
foreach(glob(SAVE_RESULTS_DIR . "*/composite.xml") as $saved_results_file)
diff --git a/pts-core/options/list_suites.php b/pts-core/options/list_suites.php
index 1cb4928..a65592a 100644
--- a/pts-core/options/list_suites.php
+++ b/pts-core/options/list_suites.php
@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class list_suites
+class list_suites implements pts_option_interface
{
- public static function run()
+ public static function run($r)
{
echo pts_string_header("Phoronix Test Suite - Suites");
$has_partially_supported_suite = false;
diff --git a/pts-core/options/list_test_usage.php b/pts-core/options/list_test_usage.php
index cbd6477..dd2d2b6 100644
--- a/pts-core/options/list_test_usage.php
+++ b/pts-core/options/list_test_usage.php
@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class list_test_usage
+class list_test_usage implements pts_option_interface
{
- public static function run()
+ public static function run($r)
{
echo pts_string_header("Phoronix Test Suite - Test Usage");
printf("%-18ls %-8ls %-13ls %-11ls %-13ls %-10ls\n", "TEST", "VERSION", "INSTALL DATE", "LAST RUN", "AVG RUN-TIME", "TIMES RUN");
diff --git a/pts-core/options/list_tests.php b/pts-core/options/list_tests.php
index c0bc960..e167ae3 100644
--- a/pts-core/options/list_tests.php
+++ b/pts-core/options/list_tests.php
@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class list_tests
+class list_tests implements pts_option_interface
{
- public static function run()
+ public static function run($r)
{
echo pts_string_header("Phoronix Test Suite - Tests");
foreach(pts_available_tests_array() as $identifier)
diff --git a/pts-core/options/make_download_cache.php b/pts-core/options/make_download_cache.php
index 0a9f552..aa2c471 100644
--- a/pts-core/options/make_download_cache.php
+++ b/pts-core/options/make_download_cache.php
@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class make_download_cache
+class make_download_cache implements pts_option_interface
{
- public static function run()
+ public static function run($r)
{
include_once("pts-core/functions/pts-functions-install.php");
echo pts_string_header("Phoronix Test Suite - Generating Download Cache");
diff --git a/pts-core/options/merge_results.php b/pts-core/options/merge_results.php
index 39c9a92..1e831c4 100644
--- a/pts-core/options/merge_results.php
+++ b/pts-core/options/merge_results.php
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class merge_results
+class merge_results implements pts_option_interface
{
public static function run($r)
{
diff --git a/pts-core/options/module_information.php b/pts-core/options/module_information.php
index 6b3614f..0ca41fe 100644
--- a/pts-core/options/module_information.php
+++ b/pts-core/options/module_information.php
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class module_information
+class module_information implements pts_option_interface
{
public static function run($r)
{
diff --git a/pts-core/options/module_setup.php b/pts-core/options/module_setup.php
index b5b4d81..d36ac2e 100644
--- a/pts-core/options/module_setup.php
+++ b/pts-core/options/module_setup.php
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class module_setup
+class module_setup implements pts_option_interface
{
public static function run($r)
{
diff --git a/pts-core/options/refresh_graphs.php b/pts-core/options/refresh_graphs.php
index 97e9063..2314c7f 100644
--- a/pts-core/options/refresh_graphs.php
+++ b/pts-core/options/refresh_graphs.php
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class refresh_graphs
+class refresh_graphs implements pts_option_interface
{
public static function run($r)
{
diff --git a/pts-core/options/remove_all_results.php b/pts-core/options/remove_all_results.php
index 724e0b1..9996b19 100644
--- a/pts-core/options/remove_all_results.php
+++ b/pts-core/options/remove_all_results.php
@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class remove_all_results
+class remove_all_results implements pts_option_interface
{
- public static function run()
+ public static function run($r)
{
$remove_all = pts_bool_question("Are you sure you wish to remove all saved results (Y/n)?", true);
diff --git a/pts-core/options/remove_installed_test.php b/pts-core/options/remove_installed_test.php
index 0c5c7c6..8dfe8e0 100644
--- a/pts-core/options/remove_installed_test.php
+++ b/pts-core/options/remove_installed_test.php
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class remove_installed_test
+class remove_installed_test implements pts_option_interface
{
public static function run($r)
{
diff --git a/pts-core/options/remove_result.php b/pts-core/options/remove_result.php
index 9fefd0e..2d333ea 100644
--- a/pts-core/options/remove_result.php
+++ b/pts-core/options/remove_result.php
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class remove_result
+class remove_result implements pts_option_interface
{
public static function run($r)
{
diff --git a/pts-core/options/result_information.php b/pts-core/options/result_information.php
index 76e7cc2..c431cf6 100644
--- a/pts-core/options/result_information.php
+++ b/pts-core/options/result_information.php
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class result_information
+class result_information implements pts_option_interface
{
public static function run($r)
{
diff --git a/pts-core/options/run_test.php b/pts-core/options/run_test.php
index c29a141..53527b0 100644
--- a/pts-core/options/run_test.php
+++ b/pts-core/options/run_test.php
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class run_test
+class run_test implements pts_option_interface
{
public static function run($r)
{
diff --git a/pts-core/options/show_result.php b/pts-core/options/show_result.php
index 77db302..1944242 100644
--- a/pts-core/options/show_result.php
+++ b/pts-core/options/show_result.php
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class show_result
+class show_result implements pts_option_interface
{
public static function run($r)
{
diff --git a/pts-core/options/system_information.php b/pts-core/options/system_information.php
index 175b5cf..288fe39 100644
--- a/pts-core/options/system_information.php
+++ b/pts-core/options/system_information.php
@@ -20,9 +20,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class system_information
+class system_information implements pts_option_interface
{
- public static function run()
+ public static function run($r)
{
echo pts_string_header("Phoronix Test Suite v" . PTS_VERSION . " (" . PTS_CODENAME . ")\nSystem Information");
echo "Hardware:\n" . pts_hw_string() . "\n\n";
diff --git a/pts-core/options/test_module.php b/pts-core/options/test_module.php
index 98b2d3f..dde72ae 100644
--- a/pts-core/options/test_module.php
+++ b/pts-core/options/test_module.php
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class test_module
+class test_module implements pts_option_interface
{
public static function run($r)
{
diff --git a/pts-core/options/upload_result.php b/pts-core/options/upload_result.php
index 0e4b48e..5c15a94 100644
--- a/pts-core/options/upload_result.php
+++ b/pts-core/options/upload_result.php
@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class upload_result
+class upload_result implements pts_option_interface
{
public static function run($r)
{