diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-04-27 07:33:50 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-04-27 07:33:50 -0400 |
commit | c7e5b1d7b3f43e13aa61589b8fdce4087f5e863c (patch) | |
tree | 88fc2e3e36b59d099556063413004c65bba6d03b | |
parent | e4a1b30e7d641a0c12cf739eb8f5af93b7bd7ce5 (diff) | |
download | phoronix-test-suite-upstream-c7e5b1d7b3f43e13aa61589b8fdce4087f5e863c.tar.gz phoronix-test-suite-upstream-c7e5b1d7b3f43e13aa61589b8fdce4087f5e863c.tar.xz phoronix-test-suite-upstream-c7e5b1d7b3f43e13aa61589b8fdce4087f5e863c.zip |
Add force-install option to PTS
-rw-r--r-- | CHANGE-LOG | 1 | ||||
-rwxr-xr-x | phoronix-test-suite | 3 | ||||
-rw-r--r-- | pts-core/functions/pts-functions-install.php | 2 | ||||
-rw-r--r-- | pts-core/pts-run-cmd.php | 4 |
4 files changed, 9 insertions, 1 deletions
@@ -24,6 +24,7 @@ Phoronix Test Suite - Add remove-all-results option - Add in espeak text-to-speech engine test - Add in multicore suite of SMP-friendly tests +- Add force-install option for installing benchmarks already installed Phoronix Test Suite 0.4.0 April 24, 2008 diff --git a/phoronix-test-suite b/phoronix-test-suite index b1315ce..a385a0b 100755 --- a/phoronix-test-suite +++ b/phoronix-test-suite @@ -37,6 +37,9 @@ case "$1" in "install") $PHP_BIN pts-core/pts-run-cmd.php INSTALL_BENCHMARK $2 ;; +"force-install") + $PHP_BIN pts-core/pts-run-cmd.php FORCE_INSTALL_BENCHMARK $2 + ;; "install-dependencies") $PHP_BIN pts-core/pts-run-cmd.php INSTALL_EXTERNAL_DEPENDENCIES $2 ;; diff --git a/pts-core/functions/pts-functions-install.php b/pts-core/functions/pts-functions-install.php index 704ae3e..4ecfbce 100644 --- a/pts-core/functions/pts-functions-install.php +++ b/pts-core/functions/pts-functions-install.php @@ -49,7 +49,7 @@ function pts_install_benchmark($Benchmark) if(pts_benchmark_type($Benchmark) != "BENCHMARK") return; - if(is_file(BENCHMARK_ENV_DIR . "$Benchmark/pts-install") && ((is_file(BENCHMARK_RESOURCE_DIR . "$Benchmark/install.sh") && file_get_contents(BENCHMARK_ENV_DIR . "$Benchmark/pts-install") == @md5_file(BENCHMARK_RESOURCE_DIR . "$Benchmark/install.sh")) || (is_file(BENCHMARK_RESOURCE_DIR . "$Benchmark/install.php") && file_get_contents(BENCHMARK_ENV_DIR . "$Benchmark/pts-install") == @md5_file(BENCHMARK_RESOURCE_DIR . "$Benchmark/install.php")))) + if(!defined("PTS_FORCE_INSTALL") && is_file(BENCHMARK_ENV_DIR . "$Benchmark/pts-install") && ((is_file(BENCHMARK_RESOURCE_DIR . "$Benchmark/install.sh") && file_get_contents(BENCHMARK_ENV_DIR . "$Benchmark/pts-install") == @md5_file(BENCHMARK_RESOURCE_DIR . "$Benchmark/install.sh")) || (is_file(BENCHMARK_RESOURCE_DIR . "$Benchmark/install.php") && file_get_contents(BENCHMARK_ENV_DIR . "$Benchmark/pts-install") == @md5_file(BENCHMARK_RESOURCE_DIR . "$Benchmark/install.php")))) { echo ucwords($Benchmark) . " is already installed, skipping installation routine...\n"; } diff --git a/pts-core/pts-run-cmd.php b/pts-core/pts-run-cmd.php index c390e2d..c6d9b63 100644 --- a/pts-core/pts-run-cmd.php +++ b/pts-core/pts-run-cmd.php @@ -88,6 +88,7 @@ switch($COMMAND) else echo "\n$ARG_1 was not found.\n"; break; + case "FORCE_INSTALL_BENCHMARK": case "INSTALL_BENCHMARK": if(empty($ARG_1)) { @@ -97,6 +98,9 @@ switch($COMMAND) require("pts-core/functions/pts-functions-install.php"); + if($COMMAND == "FORCE_INSTALL_BENCHMARK") + define("PTS_FORCE_INSTALL", 1); + $ARG_1 = strtolower($ARG_1); // Any external dependencies? |