summaryrefslogtreecommitdiffstats
path: root/pts/test-resources
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-08-19 07:43:25 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-08-19 07:43:25 -0400
commit71513bcb1769af20ae3fe590f4c58abafe86e783 (patch)
tree0967337fbd597b4d3d63955ee25f54c7b84f780e /pts/test-resources
parenta40966d1ce313ca4337043f81d91dbf05b50d2fb (diff)
downloadphoronix-test-suite-upstream-71513bcb1769af20ae3fe590f4c58abafe86e783.tar.gz
phoronix-test-suite-upstream-71513bcb1769af20ae3fe590f4c58abafe86e783.tar.xz
phoronix-test-suite-upstream-71513bcb1769af20ae3fe590f4c58abafe86e783.zip
pts: Add j2dbench test profile for a Java OpenGL 2D Microbenchmark
(Thanks to Sun Microsystems)
Diffstat (limited to 'pts/test-resources')
-rw-r--r--pts/test-resources/j2dbench/downloads.xml7
-rwxr-xr-xpts/test-resources/j2dbench/install.sh32
-rw-r--r--pts/test-resources/j2dbench/parse-results.php6
3 files changed, 45 insertions, 0 deletions
diff --git a/pts/test-resources/j2dbench/downloads.xml b/pts/test-resources/j2dbench/downloads.xml
new file mode 100644
index 0000000..b365e90
--- /dev/null
+++ b/pts/test-resources/j2dbench/downloads.xml
@@ -0,0 +1,7 @@
+<PhoronixTestSuite>
+ <Downloads>
+ <Package>
+ <URL>http://download.java.net/javadesktop/jgfxbat/2.0/J2DBench.zip</URL>
+ </Package>
+ </Downloads>
+</PhoronixTestSuite>
diff --git a/pts/test-resources/j2dbench/install.sh b/pts/test-resources/j2dbench/install.sh
new file mode 100755
index 0000000..4934a58
--- /dev/null
+++ b/pts/test-resources/j2dbench/install.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+unzip -o J2DBench.zip
+
+echo "#!/bin/sh
+
+rm -f *.output
+rm -f *.res
+
+case \"\$1\" in
+\"TEST_ALL\")
+ TEST_TYPE=all
+ ;;
+\"TEST_GRAPHICS\")
+ TEST_TYPE=graphics
+ ;;
+\"TEST_IMAGES\")
+ TEST_TYPE=images
+ ;;
+\"TEST_TEXT\")
+ TEST_TYPE=text
+ ;;
+esac
+
+java -Dsun.java2d.opengl=True -jar dist/J2DBench.jar \
+-batch -loadopts \$TEST_TYPE.opt -saveres \$TEST_TYPE.res \
+-title \$TEST_TYPE -desc \$TEST_TYPE > \$THIS_RUN_TIME.output
+
+java -jar dist/J2DAnalyzer.jar \$TEST_TYPE.res | \
+grep \"Overall average:\"
+" > j2dbench
+chmod +x j2dbench
diff --git a/pts/test-resources/j2dbench/parse-results.php b/pts/test-resources/j2dbench/parse-results.php
new file mode 100644
index 0000000..45f4807
--- /dev/null
+++ b/pts/test-resources/j2dbench/parse-results.php
@@ -0,0 +1,6 @@
+<?php
+
+$BENCHMARK_RESULTS = substr($argv[1], strpos($argv[1], ":") + 2);
+echo trim(substr($BENCHMARK_RESULTS, 0, strpos($BENCHMARK_RESULTS, "\n")));
+
+?>