summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-10-09 20:26:59 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-10-09 20:26:59 -0400
commit5eeedd8b26e69d59729ef83f2fc834552a407fb5 (patch)
tree745a60f1e0e9af1e24afce83f0d620dc9cd2d8ef
parent6045ce4f8be18c0f48cb372893d8269c652643d1 (diff)
downloadphoronix-test-suite-upstream-5eeedd8b26e69d59729ef83f2fc834552a407fb5.tar.gz
phoronix-test-suite-upstream-5eeedd8b26e69d59729ef83f2fc834552a407fb5.tar.xz
phoronix-test-suite-upstream-5eeedd8b26e69d59729ef83f2fc834552a407fb5.zip
pts: Update many test profiles to using $LOG_FILE
pts-core: Various minor tweaks in the functions run file
-rw-r--r--EXPERIMENTAL-CHANGE-LOG1
-rw-r--r--pts-core/functions/pts-functions-run.php7
-rwxr-xr-xpts/test-resources/ramspeed/install.sh12
-rwxr-xr-xpts/test-resources/scimark2/install.sh14
-rwxr-xr-xpts/test-resources/sunflow/install.sh3
-rw-r--r--pts/test-resources/sunflow/parse-results.php3
-rwxr-xr-xpts/test-resources/super-pi/install.sh2
-rw-r--r--pts/test-resources/super-pi/parse-results.php3
-rwxr-xr-xpts/test-resources/x11perf/install.sh2
-rw-r--r--pts/test-resources/x11perf/parse-results.php4
-rwxr-xr-xpts/test-resources/xplane9/install.sh6
-rw-r--r--pts/test-resources/xplane9/parse-results.php3
12 files changed, 35 insertions, 25 deletions
diff --git a/EXPERIMENTAL-CHANGE-LOG b/EXPERIMENTAL-CHANGE-LOG
index e4cfef8..5665ccc 100644
--- a/EXPERIMENTAL-CHANGE-LOG
+++ b/EXPERIMENTAL-CHANGE-LOG
@@ -13,6 +13,7 @@ Phoronix Test Suite
- pts-core: Add RequiresCoreVersion tag if the test profile is only compatible with select versions of the Phoronix Test Suite
- pts-core: Keep a running average how long it takes to run a given test. This is stored in the AverageRunTime tag within the pts-install.xml
- pts-core: Show average run-time with info <test> command
+- pts-core: Don't pass $test_results as an argument to parse-results.sh or parse-results.php with tests using $LOG_FILE
- pts_Graph: Set viewbox in SVG renderer
Phoronix Test Suite 1.4.0 Alpha 2
diff --git a/pts-core/functions/pts-functions-run.php b/pts-core/functions/pts-functions-run.php
index 331eb94..0406718 100644
--- a/pts-core/functions/pts-functions-run.php
+++ b/pts-core/functions/pts-functions-run.php
@@ -497,6 +497,9 @@ function pts_run_test($test_identifier, $extra_arguments = "", $arguments_descri
echo $test_results = pts_exec("cd " . $to_execute . " && ./" . $execute_binary . " " . $pts_test_arguments, $test_extra_runtime_variables);
+ if(is_file($benchmark_log_file) && trim($test_results) == "")
+ echo file_get_contents($benchmark_log_file);
+
if(!($i == 0 && pts_string_bool($ignore_first_run) && $times_to_run > 1))
{
$test_extra_runtime_variables_post = $test_extra_runtime_variables;
@@ -508,6 +511,10 @@ function pts_run_test($test_identifier, $extra_arguments = "", $arguments_descri
if(is_numeric($run_time))
$test_extra_runtime_variables_post = array_merge($test_extra_runtime_variables_post, array("TIMER_RESULT" => $run_time));
}
+ if(is_file($benchmark_log_file))
+ {
+ $test_results = "";
+ }
if(is_file(pts_location_test_resources($test_identifier) . "parse-results.php"))
{
diff --git a/pts/test-resources/ramspeed/install.sh b/pts/test-resources/ramspeed/install.sh
index 76b595f..2856306 100755
--- a/pts/test-resources/ramspeed/install.sh
+++ b/pts/test-resources/ramspeed/install.sh
@@ -5,23 +5,23 @@ tar -xvf ramspeed-2.5.1.tar.gz
echo "#!/bin/sh
rm -f *.result
-./ramspeed \$@ > \$THIS_RUN_TIME.result
+./ramspeed \$@ > \$LOG_FILE
case \"\$1\" in
\"COPY\")
- cat \$THIS_RUN_TIME.result | grep \"Copy\"
+ cat \$LOG_FILE | grep \"Copy\"
;;
\"SCALE\")
- cat \$THIS_RUN_TIME.result | grep \"Scale\"
+ cat \$LOG_FILE | grep \"Scale\"
;;
\"ADD\")
- cat \$THIS_RUN_TIME.result | grep \"Add\"
+ cat \$LOG_FILE | grep \"Add\"
;;
\"TRIAD\")
- cat \$THIS_RUN_TIME.result | grep \"Triad\"
+ cat \$LOG_FILE | grep \"Triad\"
;;
\"AVERAGE\")
- cat \$THIS_RUN_TIME.result | grep \"AVERAGE\"
+ cat \$LOG_FILE | grep \"AVERAGE\"
;;
esac
" > ramspeed-benchmark
diff --git a/pts/test-resources/scimark2/install.sh b/pts/test-resources/scimark2/install.sh
index 330efcb..3044e3b 100755
--- a/pts/test-resources/scimark2/install.sh
+++ b/pts/test-resources/scimark2/install.sh
@@ -10,26 +10,26 @@ cd scimark2_files/
rm -f *.result
-./scimark2 -large > \$THIS_RUN_TIME.result
+./scimark2 -large > \$LOG_FILE
case \"\$1\" in
\"TEST_COMPOSITE\")
- cat \$THIS_RUN_TIME.result | grep \"Composite Score\"
+ cat \$LOG_FILE | grep \"Composite Score\"
;;
\"TEST_FFT\")
- cat \$THIS_RUN_TIME.result | grep \"FFT\"
+ cat \$LOG_FILE | grep \"FFT\"
;;
\"TEST_SOR\")
- cat \$THIS_RUN_TIME.result | grep \"SOR\"
+ cat \$LOG_FILE | grep \"SOR\"
;;
\"TEST_MONTE\")
- cat \$THIS_RUN_TIME.result | grep \"MonteCarlo\"
+ cat \$LOG_FILE | grep \"MonteCarlo\"
;;
\"TEST_SPARSE\")
- cat \$THIS_RUN_TIME.result | grep \"Sparse matmult\"
+ cat \$LOG_FILE | grep \"Sparse matmult\"
;;
\"TEST_DENSE\")
- cat \$THIS_RUN_TIME.result | grep \"LU\"
+ cat \$LOG_FILE | grep \"LU\"
;;
esac" > scimark2
chmod +x scimark2
diff --git a/pts/test-resources/sunflow/install.sh b/pts/test-resources/sunflow/install.sh
index 2a8c99e..96a4b05 100755
--- a/pts/test-resources/sunflow/install.sh
+++ b/pts/test-resources/sunflow/install.sh
@@ -15,6 +15,5 @@ else
JAVA_VM_MEMORY=256M
fi
-java -server -Xmx\$JAVA_VM_MEMORY -jar sunflow.jar -bench
-" > sunflow-benchmark
+java -server -Xmx\$JAVA_VM_MEMORY -jar sunflow.jar -bench > \$LOG_FILE 2>&1" > sunflow-benchmark
chmod +x sunflow-benchmark
diff --git a/pts/test-resources/sunflow/parse-results.php b/pts/test-resources/sunflow/parse-results.php
index 1eab65a..81ffda8 100644
--- a/pts/test-resources/sunflow/parse-results.php
+++ b/pts/test-resources/sunflow/parse-results.php
@@ -1,6 +1,7 @@
<?php
-$BENCHMARK_RESULTS = substr($argv[1], strpos($argv[1], "Average:"));
+$log_file = file_get_contents(getenv("LOG_FILE"));
+$BENCHMARK_RESULTS = substr($log_file, strpos($log_file, "Average:"));
$BENCHMARK_RESULTS = substr($BENCHMARK_RESULTS, 0, strpos($BENCHMARK_RESULTS, "\n"));
preg_match("/([0-9\.:]*)(.{0,2})/", trim(substr($BENCHMARK_RESULTS, strrpos($BENCHMARK_RESULTS, ':') + 1)), $match);
diff --git a/pts/test-resources/super-pi/install.sh b/pts/test-resources/super-pi/install.sh
index 983f74c..e222ead 100755
--- a/pts/test-resources/super-pi/install.sh
+++ b/pts/test-resources/super-pi/install.sh
@@ -4,6 +4,6 @@ tar -xvf super_pi.tar.gz
# make wrapper shell script for total line
echo "#!/bin/sh
-./super_pi \$@ | grep Total" > superpi
+./super_pi \$@ > \$LOG_FILE" > superpi
chmod +x superpi
diff --git a/pts/test-resources/super-pi/parse-results.php b/pts/test-resources/super-pi/parse-results.php
index 533064e..e25b5d8 100644
--- a/pts/test-resources/super-pi/parse-results.php
+++ b/pts/test-resources/super-pi/parse-results.php
@@ -1,6 +1,7 @@
<?php
-$BENCHMARK_RESULTS = substr($argv[1], strrpos($argv[1], "time=") + 5);
+$log_file = file_get_contents(getenv("LOG_FILE"));
+$BENCHMARK_RESULTS = substr($log_file, strrpos($log_file, "time=") + 5);
echo trim(substr($BENCHMARK_RESULTS, 0, strpos($BENCHMARK_RESULTS, "(")));
?>
diff --git a/pts/test-resources/x11perf/install.sh b/pts/test-resources/x11perf/install.sh
index 2c476f7..5dd1db5 100755
--- a/pts/test-resources/x11perf/install.sh
+++ b/pts/test-resources/x11perf/install.sh
@@ -8,5 +8,5 @@ cd ..
echo "#!/bin/sh
cd x11perf-1.5/
-./x11perf \$@" > x11perf
+./x11perf \$@ > \$LOG_FILE" > x11perf
chmod +x x11perf
diff --git a/pts/test-resources/x11perf/parse-results.php b/pts/test-resources/x11perf/parse-results.php
index bde6afb..12713a7 100644
--- a/pts/test-resources/x11perf/parse-results.php
+++ b/pts/test-resources/x11perf/parse-results.php
@@ -1,6 +1,6 @@
<?php
-
-$BENCHMARK_RESULTS = substr($argv[1], 0, strrpos($argv[1], "/sec"));
+$log_file = file_get_contents(getenv("LOG_FILE"));
+$BENCHMARK_RESULTS = substr($log_file, 0, strrpos($log_file, "/sec"));
$BENCHMARK_RESULTS = trim(substr($BENCHMARK_RESULTS, strrpos($BENCHMARK_RESULTS, " ")));
if(substr($BENCHMARK_RESULTS, 0, 1) == "(")
diff --git a/pts/test-resources/xplane9/install.sh b/pts/test-resources/xplane9/install.sh
index d97235a..bfd2d2e 100755
--- a/pts/test-resources/xplane9/install.sh
+++ b/pts/test-resources/xplane9/install.sh
@@ -7,12 +7,12 @@ cd X-Plane_900r3_timedemo/
case \$OS_TYPE in
\"MacOSX\" )
- ./X-Plane.app/Contents/MacOS/X-Plane \$@ > /dev/null
+ ./X-Plane.app/Contents/MacOS/X-Plane \$@
;;
* )
- ./X-Plane-i686 \$@ > /dev/null
+ ./X-Plane-i686 \$@
;;
esac
-grep FRAMERATE Log.txt" > xplane9
+grep FRAMERATE Log.txt > \$LOG_FILE" > xplane9
chmod +x xplane9
diff --git a/pts/test-resources/xplane9/parse-results.php b/pts/test-resources/xplane9/parse-results.php
index 0b0a279..f84b042 100644
--- a/pts/test-resources/xplane9/parse-results.php
+++ b/pts/test-resources/xplane9/parse-results.php
@@ -1,5 +1,6 @@
<?php
-$BENCHMARK_RESULTS = substr($argv[1], strpos($argv[1], "phase 1:") + 8);
+$log_file = file_get_contents(getenv("LOG_FILE"));
+$BENCHMARK_RESULTS = substr($log_file, strpos($log_file, "phase 1:") + 8);
$BENCHMARK_RESULTS = substr($BENCHMARK_RESULTS, strpos($BENCHMARK_RESULTS, "fps=") + 4);
$BENCHMARK_RESULTS = trim(substr($BENCHMARK_RESULTS, 0, strpos($BENCHMARK_RESULTS, "\n")));
echo $BENCHMARK_RESULTS;