diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-12-05 13:52:00 -0500 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-12-05 13:52:00 -0500 |
commit | a109aa2766f33a4ec332b4e1a70095ecfce8f572 (patch) | |
tree | 40734ebcca295f945eed6c85affc4df593f22da7 /pts-core/functions | |
parent | 2cfc561b54c8a9ac40c335be7fb8f075eb26e35a (diff) | |
download | phoronix-test-suite-upstream-a109aa2766f33a4ec332b4e1a70095ecfce8f572.tar.gz phoronix-test-suite-upstream-a109aa2766f33a4ec332b4e1a70095ecfce8f572.tar.xz phoronix-test-suite-upstream-a109aa2766f33a4ec332b4e1a70095ecfce8f572.zip |
pts-core: Allow multiple tests/suites/identifiers to be passed using the
install (and force-install) option
Diffstat (limited to 'pts-core/functions')
-rw-r--r-- | pts-core/functions/pts-functions-install.php | 20 | ||||
-rw-r--r-- | pts-core/functions/pts-functions-install_dependencies.php | 16 |
2 files changed, 30 insertions, 6 deletions
diff --git a/pts-core/functions/pts-functions-install.php b/pts-core/functions/pts-functions-install.php index 5e96e53..230aa35 100644 --- a/pts-core/functions/pts-functions-install.php +++ b/pts-core/functions/pts-functions-install.php @@ -23,15 +23,29 @@ require_once("pts-core/functions/pts-functions-install_dependencies.php"); -function pts_start_install($TO_INSTALL) +function pts_start_install($to_install) { + if(!is_array($to_install)) + { + $to_install = array($to_install); + } + if(IS_SCTP_MODE) { - $tests = array($TO_INSTALL); + $tests = array($to_install[0]); } else { - $tests = pts_contained_tests($TO_INSTALL, true); + $tests = array(); + + foreach($to_install as $to_install_test) + { + foreach(pts_contained_tests($to_install_test, true) as $test) + { + array_push($tests, $test); + } + } + $tests = array_unique($tests); if(count($tests) == 0) { diff --git a/pts-core/functions/pts-functions-install_dependencies.php b/pts-core/functions/pts-functions-install_dependencies.php index 2fd7274..6665099 100644 --- a/pts-core/functions/pts-functions-install_dependencies.php +++ b/pts-core/functions/pts-functions-install_dependencies.php @@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -function pts_install_package_on_distribution($identifier) +function pts_install_package_on_distribution($identifiers) { // PTS External Dependencies install on distribution if(pts_read_assignment("COMMAND") != "benchmark") @@ -29,9 +29,19 @@ function pts_install_package_on_distribution($identifier) echo "Checking For Needed External Dependencies.\n"; } - $identifier = strtolower($identifier); $install_objects = array(); - pts_start_install_dependencies($identifier, $install_objects); + + if(!is_array($identifiers)) + { + $identifiers = array($identifiers); + } + + foreach($identifiers as $identifier) + { + pts_start_install_dependencies($identifier, $install_objects); + } + $install_objects = array_unique($install_objects); + pts_install_packages_on_distribution_process($install_objects); } function pts_start_install_dependencies($TO_INSTALL, &$PLACE_LIST) |