summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-04-24 21:02:45 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-04-24 21:02:45 -0400
commit5f5eadce84e3c7fae63fbb6adbcbeb1f797b650e (patch)
treec9d1b86a25253989f50b32a8b63544524913abf4
parentf3f405f529c51020cc8039604490eddc93924cd5 (diff)
downloadphoronix-test-suite-upstream-5f5eadce84e3c7fae63fbb6adbcbeb1f797b650e.tar.gz
phoronix-test-suite-upstream-5f5eadce84e3c7fae63fbb6adbcbeb1f797b650e.tar.xz
phoronix-test-suite-upstream-5f5eadce84e3c7fae63fbb6adbcbeb1f797b650e.zip
A number of clean-ups to Phoronix Test Suite and support multiple possible paths in PossiblePaths XML for test profile
-rw-r--r--CHANGE-LOG4
-rw-r--r--TODO1
-rw-r--r--pts-core/functions/pts-functions-run.php27
-rw-r--r--pts-core/functions/pts-functions_linux.php2
-rw-r--r--pts-core/pts-run-cmd.php2
5 files changed, 25 insertions, 11 deletions
diff --git a/CHANGE-LOG b/CHANGE-LOG
index 7dbd0ff..603be65 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -4,7 +4,9 @@ Phoronix Test Suite
- Add support so distribution vendors / package mantainers can create their own defaults for user configuration options as a template at /pts/etc/user-config-template.xml
- Clean up all of the *_LOCATION defintions to using *_DIR
-- Support test profiles to write their installation scripts in PHP instead of just SH. If using php, name the file install.php.
+- Support test profiles to write their installation scripts in PHP instead of just SH. If using php, name the file install.php
+- Allow test profiles to have pre.php and post.php process scripts, in addition to pre.sh and post.sh
+- Support multiple possible paths in "PossiblePaths" in test profiles, with each path delimited by a colon
Phoronix Test Suite 0.4.0
April 24, 2008
diff --git a/TODO b/TODO
index c77da7a..d13ee6d 100644
--- a/TODO
+++ b/TODO
@@ -5,7 +5,6 @@
- i.e. if EIST / Cool n Quiet are enabled
- Use new (larger) Wav file for benchmarks... internal Phoronix WAV file used is copyrighted music. Current PTS One is too small for reliable results.
- Improved hardware detection (i.e. recognize multiple graphics cards)
-- Support browsers aside from just Firefox launch. detect what's installed.
- "Optimization Tips"
- More MD5 checks in test scripts
- Change locking system away from time-based but to PID based
diff --git a/pts-core/functions/pts-functions-run.php b/pts-core/functions/pts-functions-run.php
index 96ff74d..f14ae52 100644
--- a/pts-core/functions/pts-functions-run.php
+++ b/pts-core/functions/pts-functions-run.php
@@ -130,12 +130,19 @@ function pts_run_benchmark($benchmark_identifier, $extra_arguments = "", $argume
if(empty($execute_binary))
$execute_binary = $benchmark_identifier;
- if(is_file(BENCHMARK_ENV_DIR . "$benchmark_identifier/$execute_binary") || is_link(BENCHMARK_ENV_DIR . "$benchmark_identifier/$execute_binary"))
- $to_execute = BENCHMARK_ENV_DIR . "$benchmark_identifier/";
- else if(is_file($execute_path . $execute_binary) || is_link($execute_path . $execute_binary)) //TODO: Support multiple paths in PossiblePaths separated by : delimiter.
- $to_execute = $execute_path;
+ if(is_file(BENCHMARK_ENV_DIR . $benchmark_identifier . '/' . $execute_binary) || is_link(BENCHMARK_ENV_DIR . $benchmark_identifier . '/' . $execute_binary))
+ {
+ $to_execute = BENCHMARK_ENV_DIR . $benchmark_identifier . '/';
+ }
else
{
+ foreach(explode(':', $execute_path) as $execute_path_check)
+ if(is_file($execute_path_check . $execute_binary) || is_link($execute_path_check . $execute_binary))
+ $to_execute = $execute_path_check;
+ }
+
+ if(!isset($to_execute) || empty($to_execute))
+ {
echo "This application executable could not be found in " . $execute_path . ". or " . BENCHMARK_ENV_DIR . "$benchmark_identifier/.\nBenchmark terminating.";
return;
}
@@ -153,7 +160,11 @@ function pts_run_benchmark($benchmark_identifier, $extra_arguments = "", $argume
if(is_file(BENCHMARK_RESOURCE_DIR . $benchmark_identifier . "/pre.sh"))
{
- echo shell_exec("sh " . BENCHMARK_RESOURCE_DIR . $benchmark_identifier . "/pre.sh " . BENCHMARK_ENV_DIR . "$benchmark_identifier");
+ echo pts_exec("sh " . BENCHMARK_RESOURCE_DIR . $benchmark_identifier . "/pre.sh " . BENCHMARK_ENV_DIR . "$benchmark_identifier");
+ }
+ if(is_file(BENCHMARK_RESOURCE_DIR . $benchmark_identifier . "/pre.php"))
+ {
+ echo pts_exec("php " . BENCHMARK_RESOURCE_DIR . $benchmark_identifier . "/pre.php " . BENCHMARK_ENV_DIR . "$benchmark_identifier");
}
if(!empty($pre_run_message))
@@ -168,7 +179,7 @@ function pts_run_benchmark($benchmark_identifier, $extra_arguments = "", $argume
echo pts_string_header($benchmark_title . " Benchmark (Run " . ($i + 1) . " of " . $times_to_run . ")");
$result_output = array();
- echo $BENCHMARK_RESULTS = pts_exec("cd $to_execute; ./$execute_binary $PTS_BENCHMARK_ARGUMENTS");
+ echo $BENCHMARK_RESULTS = pts_exec("cd $to_execute && ./$execute_binary $PTS_BENCHMARK_ARGUMENTS");
if(is_file(BENCHMARK_RESOURCE_DIR . $benchmark_identifier . "/parse-results.php"))
{
@@ -181,6 +192,10 @@ function pts_run_benchmark($benchmark_identifier, $extra_arguments = "", $argume
{
echo pts_exec("sh " . BENCHMARK_RESOURCE_DIR . $benchmark_identifier . "/post.sh " . BENCHMARK_ENV_DIR . "$benchmark_identifier");
}
+ if(is_file(BENCHMARK_RESOURCE_DIR . $benchmark_identifier . "/post.php"))
+ {
+ echo pts_exec("php " . BENCHMARK_RESOURCE_DIR . $benchmark_identifier . "/post.php " . BENCHMARK_ENV_DIR . "$benchmark_identifier");
+ }
// End
if(!empty($result_scale))
diff --git a/pts-core/functions/pts-functions_linux.php b/pts-core/functions/pts-functions_linux.php
index af2d1d2..ef31a85 100644
--- a/pts-core/functions/pts-functions_linux.php
+++ b/pts-core/functions/pts-functions_linux.php
@@ -86,8 +86,6 @@ function cpu_job_count()
}
function processor_string()
{
- //TODO: Support Multiple CPUs
-
if(is_file("/proc/cpuinfo"))
{
$info = file_get_contents("/proc/cpuinfo");
diff --git a/pts-core/pts-run-cmd.php b/pts-core/pts-run-cmd.php
index c0d65e6..c22e798 100644
--- a/pts-core/pts-run-cmd.php
+++ b/pts-core/pts-run-cmd.php
@@ -46,7 +46,7 @@ switch($COMMAND)
$upload_url = pts_global_upload_result($USE_FILE);
if(!empty($upload_url))
- echo "Results Uploaded To: " . $upload_url . "\n\n"; // TODO: Add checks to make sure it did work out
+ echo "Results Uploaded To: " . $upload_url . "\n\n";
break;
case "LIST_SAVED_RESULTS":
echo pts_string_header("Phoronix Test Suite - Saved Results");