summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGE-LOG1
-rw-r--r--pts-core/functions/pts-functions-install_dependencies.php2
-rw-r--r--pts-core/options/install_all_dependencies.php43
3 files changed, 45 insertions, 1 deletions
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 @@
+<?php
+
+/*
+ Phoronix Test Suite
+ URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/
+ Copyright (C) 2008, Phoronix Media
+ Copyright (C) 2008, Michael Larabel
+
+ 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
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+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);
+ }
+ }
+}
+
+?>