From d7c33482e476306becf4f86e2e41dc240537406a Mon Sep 17 00:00:00 2001 From: Michael Larabel Date: Sun, 28 Dec 2008 20:23:16 -0500 Subject: pts-core: Add install-all-dependencies option to install all available external dependencies for that distribution --- CHANGE-LOG | 1 + .../pts-functions-install_dependencies.php | 2 +- pts-core/options/install_all_dependencies.php | 43 ++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 pts-core/options/install_all_dependencies.php diff --git a/CHANGE-LOG b/CHANGE-LOG index 2754f69..c31cfbf 100644 --- a/CHANGE-LOG +++ b/CHANGE-LOG @@ -11,6 +11,7 @@ Phoronix Test Suite (Git) - pts-core: Clean up Display / X.Org server reported string - pts-core: Eliminate use of most preg_ functions - pts-core: Archive installation output of tests in the test's directory in file install.log +- pts-core: Add install-all-dependencies option to install all available external dependencies for that distribution - pts: Add UXA acceleration check to GtkPerf test note reporting - pts: Add 2d-test base profile that reports 2D acceleration mode using Cascading Test Profiles - pts: Add build-mysql test profile for timed build of MySQL 5.1 diff --git a/pts-core/functions/pts-functions-install_dependencies.php b/pts-core/functions/pts-functions-install_dependencies.php index b01486b..b3bca2a 100644 --- a/pts-core/functions/pts-functions-install_dependencies.php +++ b/pts-core/functions/pts-functions-install_dependencies.php @@ -165,7 +165,7 @@ function pts_package_generic_to_distro_name(&$package_install_array, $generic_na for($i = 0; $i < count($generic_package); $i++) { - if(!empty($generic_package[$i]) && in_array($generic_package[$i], $generic_names)) + if(!empty($generic_package[$i]) && ($generic_names == "all" || in_array($generic_package[$i], $generic_names))) { if(!in_array($distro_package[$i], $package_install_array)) { diff --git a/pts-core/options/install_all_dependencies.php b/pts-core/options/install_all_dependencies.php new file mode 100644 index 0000000..517f90f --- /dev/null +++ b/pts-core/options/install_all_dependencies.php @@ -0,0 +1,43 @@ +. +*/ + +class install_all_dependencies implements pts_option_interface +{ + public static function run($r) + { + pts_load_function_set("install"); + + $packages_to_install = array(); + pts_package_generic_to_distro_name($packages_to_install, "all"); + + if(empty($packages_to_install) || count($packages_to_install) == 0) + { + echo pts_string_header("No packages found. Your operating system may not support this feature.\nSeek support from http://www.phoronix-test-suite.com/."); + } + else + { + pts_install_packages_on_distribution_process($packages_to_install); + } + } +} + +?> -- cgit