summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGE-LOG1
-rwxr-xr-xphoronix-test-suite3
-rw-r--r--pts-core/functions/pts-functions-install.php2
-rw-r--r--pts-core/pts-run-cmd.php4
4 files changed, 9 insertions, 1 deletions
diff --git a/CHANGE-LOG b/CHANGE-LOG
index 2764cfa..ad0fabf 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -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?