summaryrefslogtreecommitdiffstats
path: root/pts/test-resources
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-10-18 21:02:42 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-10-18 21:02:42 -0400
commit4e0074804e10dce573447791bed9ab74ed68e1cc (patch)
treea4c748b46aafaa184a71f69369f2582ba074d9dc /pts/test-resources
parent257b23a06ed1bac8e2a64b802fd26a7b390fffdc (diff)
downloadphoronix-test-suite-upstream-4e0074804e10dce573447791bed9ab74ed68e1cc.tar.gz
phoronix-test-suite-upstream-4e0074804e10dce573447791bed9ab74ed68e1cc.tar.xz
phoronix-test-suite-upstream-4e0074804e10dce573447791bed9ab74ed68e1cc.zip
pts: Add java-environment base test that provides the java external
dependency and reports Java version to test notes
Diffstat (limited to 'pts/test-resources')
-rw-r--r--pts/test-resources/base/java-environment/post.php21
-rwxr-xr-xpts/test-resources/java-scimark2/install.sh14
2 files changed, 28 insertions, 7 deletions
diff --git a/pts/test-resources/base/java-environment/post.php b/pts/test-resources/base/java-environment/post.php
new file mode 100644
index 0000000..1130c39
--- /dev/null
+++ b/pts/test-resources/base/java-environment/post.php
@@ -0,0 +1,21 @@
+<?php
+
+$java_version = trim(shell_exec("java -version 2>&1"));
+
+if(stripos($java_version, "Java") !== FALSE)
+{
+ $java_version = explode("\n", $java_version);
+
+ if(($cut = count($java_version) - 2) > 0)
+ {
+ $v = trim($java_version[$cut]);
+ }
+ else
+ {
+ $v = trim(array_pop($java_version));
+ }
+ file_put_contents("pts-test-note", $v);
+}
+
+?>
+
diff --git a/pts/test-resources/java-scimark2/install.sh b/pts/test-resources/java-scimark2/install.sh
index 2ffa215..dd2d993 100755
--- a/pts/test-resources/java-scimark2/install.sh
+++ b/pts/test-resources/java-scimark2/install.sh
@@ -5,26 +5,26 @@ unzip -o scimark2lib.zip
echo "#!/bin/sh
rm -f *.result
-java jnt.scimark2.commandline > \$LOG_FILE
+java jnt.scimark2.commandline > \$LOG_FILE.result
case \"\$1\" in
\"TEST_COMPOSITE\")
- cat \$LOG_FILE | grep \"Composite Score\"
+ cat \$LOG_FILE.result | grep \"Composite Score\"
;;
\"TEST_FFT\")
- cat \$LOG_FILE | grep \"FFT (1024)\"
+ cat \$LOG_FILE.result | grep \"FFT (1024)\"
;;
\"TEST_SOR\")
- cat \$LOG_FILE | grep \"SOR (100x100)\"
+ cat \$LOG_FILE.result | grep \"SOR (100x100)\"
;;
\"TEST_MONTE\")
- cat \$LOG_FILE | grep \"Monte Carlo\"
+ cat \$LOG_FILE.result | grep \"Monte Carlo\"
;;
\"TEST_SPARSE\")
- cat \$LOG_FILE | grep \"Sparse matmult\"
+ cat \$LOG_FILE.result | grep \"Sparse matmult\"
;;
\"TEST_DENSE\")
- cat \$LOG_FILE | grep \"LU (100x100)\"
+ cat \$LOG_FILE.result | grep \"LU (100x100)\"
;;
esac" > java-scimark2
chmod +x java-scimark2