summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-05-22 13:38:43 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-05-22 13:38:43 -0400
commit57c9203e39c7416872b35731cedaf30b366af1a5 (patch)
tree9df9fb2aa597cf73baa4a37a5186774238f2685c
parentb904cffa72fa6ad441de858dccc03605e27a3e71 (diff)
downloadphoronix-test-suite-upstream-57c9203e39c7416872b35731cedaf30b366af1a5.tar.gz
phoronix-test-suite-upstream-57c9203e39c7416872b35731cedaf30b366af1a5.tar.xz
phoronix-test-suite-upstream-57c9203e39c7416872b35731cedaf30b366af1a5.zip
Add install-all option for installing all available tests (Thanks to
uncle_fungus patch)
-rw-r--r--CHANGE-LOG1
-rwxr-xr-xphoronix-test-suite4
-rw-r--r--pts-core/functions/pts-functions-install.php9
-rw-r--r--pts-core/pts-run-cmd.php20
4 files changed, 27 insertions, 7 deletions
diff --git a/CHANGE-LOG b/CHANGE-LOG
index 01bbfd2..5735ea0 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -28,6 +28,7 @@ Phoronix Test Suite
- Add build-apache profile for building Apache/HTTPD 2.2
- Fix divide by zero error when test fails
- Fix quake4 profile, works now
+- Add install-all option for installing all available tests
Phoronix Test Suite 0.7.0
May 17, 2008
diff --git a/phoronix-test-suite b/phoronix-test-suite
index 9040704..ccaaf93 100755
--- a/phoronix-test-suite
+++ b/phoronix-test-suite
@@ -68,6 +68,9 @@ case "$1" in
"install-dependencies")
$PHP_BIN pts-core/pts-run-cmd.php INSTALL_EXTERNAL_DEPENDENCIES $2
;;
+"install-all")
+ $PHP_BIN pts-core/pts-run-cmd.php INSTALL_ALL
+ ;;
"run")
$PHP_BIN pts-core/pts-run-benchmark.php $2
;;
@@ -152,6 +155,7 @@ http://www.phoronix-test-suite.com/
install <suite OR test>: Install or Update The Specified Test(s)
install-dependencies <suite OR test>: Install The External (Distribution) Dependencies For Specified Test(s)
+install-all: Install or Update all available tests
run <suite OR test>: Run The Specified Test/Suite
batch-run <suite OR test>: Run The Specified Test/Suite in Batch Mode
benchmark <suite OR test OR saved file>: Same as manually running install and then run
diff --git a/pts-core/functions/pts-functions-install.php b/pts-core/functions/pts-functions-install.php
index 5989a38..498c4a9 100644
--- a/pts-core/functions/pts-functions-install.php
+++ b/pts-core/functions/pts-functions-install.php
@@ -305,6 +305,8 @@ function pts_external_dependency_generic($Name)
$file_check = $xml_parser->getXMLArrayValues(P_EXDEP_PACKAGE_FILECHECK);
$selection = -1;
+ $PTS_MANUAL_SUPPORT = 0;
+
for($i = 0; $i < count($title) && $selection == -1; $i++)
{
if($Name == $package_name[$i])
@@ -312,13 +314,16 @@ function pts_external_dependency_generic($Name)
$selection = $i;
if(pts_file_missing_check(explode(",", $file_check[$selection])))
{
- if(!defined("PTS_MANUAL_SUPPORT"))
- define("PTS_MANUAL_SUPPORT", 1);
+ if($PTS_MANUAL_SUPPORT == 0)
+ $PTS_MANUAL_SUPPORT = 1;
echo pts_string_header($title[$selection] . "\nPossible Package Names: " . $possible_packages[$selection]);
}
}
}
+
+ if($PTS_MANUAL_SUPPORT == 1)
+ pts_bool_question("The above dependencies should be installed before proceeding otherwise one or more benchmarks could fail. Press any key when you're ready to continue");
}
return $generic_information;
diff --git a/pts-core/pts-run-cmd.php b/pts-core/pts-run-cmd.php
index bf0e403..be3ee30 100644
--- a/pts-core/pts-run-cmd.php
+++ b/pts-core/pts-run-cmd.php
@@ -79,15 +79,25 @@ switch($COMMAND)
// Any external dependencies?
pts_install_package_on_distribution($ARG_1);
- if(defined("PTS_MANUAL_SUPPORT"))
- {
- pts_bool_question("These dependencies should be installed before proceeding as one or more benchmarks could fail. Press any key when you're ready to continue");
- }
-
// Install benchmarks
$install_objects = "";
pts_recurse_install_benchmark($ARG_1, $install_objects);
break;
+ case "INSTALL_ALL":
+ require_once("pts-core/functions/pts-functions-install.php");
+
+ foreach(glob(TEST_RESOURCE_DIR . "*/downloads.xml") as $downloads_file)
+ {
+ $test = substr($downloads_file, strlen(TEST_RESOURCE_DIR), 0 - 14);
+
+ // Any external dependencies?
+ pts_install_package_on_distribution($test);
+
+ // Install benchmarks
+ $install_objects = "";
+ pts_recurse_install_benchmark($test, $install_objects);
+ }
+ break;
case "INSTALL_EXTERNAL_DEPENDENCIES":
require_once("pts-core/functions/pts-functions-install.php");