summaryrefslogtreecommitdiffstats
path: root/pts/test-resources/byte
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-07-03 21:09:19 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-07-03 21:09:19 -0400
commit619a33b49b3330b1074c99bc77c7856afb96b5f7 (patch)
tree07f588244f5b86f18c8e586a2427c3660439e9ec /pts/test-resources/byte
parentb9b469eee994c4d8c3122a7f0d05899b046976c1 (diff)
downloadphoronix-test-suite-upstream-619a33b49b3330b1074c99bc77c7856afb96b5f7.tar.gz
phoronix-test-suite-upstream-619a33b49b3330b1074c99bc77c7856afb96b5f7.tar.xz
phoronix-test-suite-upstream-619a33b49b3330b1074c99bc77c7856afb96b5f7.zip
Add BYTE Unix Benchmarks test (profile named byte)
Diffstat (limited to 'pts/test-resources/byte')
-rw-r--r--pts/test-resources/byte/downloads.xml8
-rw-r--r--pts/test-resources/byte/install.sh29
-rw-r--r--pts/test-resources/byte/parse-results.php14
3 files changed, 51 insertions, 0 deletions
diff --git a/pts/test-resources/byte/downloads.xml b/pts/test-resources/byte/downloads.xml
new file mode 100644
index 0000000..35ebf92
--- /dev/null
+++ b/pts/test-resources/byte/downloads.xml
@@ -0,0 +1,8 @@
+<PhoronixTestSuite>
+ <Downloads>
+ <Package>
+ <URL>http://www.phoronix-test-suite.com/benchmark-files/byte-benchmark-1.tar.gz, http://www.phoronix.net/downloads/phoronix-test-suite/benchmark-files/byte-benchmark-1.tar.gz</URL>
+ <MD5>bd9f2fe88fd35aad9e1199709df802f9</MD5>
+ </Package>
+ </Downloads>
+</PhoronixTestSuite>
diff --git a/pts/test-resources/byte/install.sh b/pts/test-resources/byte/install.sh
new file mode 100644
index 0000000..c3031bb
--- /dev/null
+++ b/pts/test-resources/byte/install.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+tar -xvf byte-benchmark-1.tar.gz
+cd bm/
+make clean
+make
+cd ..
+
+echo "#!/bin/sh
+rm -f result
+cd bm/
+
+case \"\$1\" in
+\"TEST_DHRY2\")
+ ./Run dhry2 > ../result
+ ;;
+\"TEST_REGISTER\")
+ ./Run register > ../result
+ ;;
+\"TEST_INT\")
+ ./Run int > ../result
+ ;;
+\"TEST_FLOAT\")
+ ./Run float > ../result
+ ;;
+esac
+
+cat ../result | grep lps" > byte
+chmod +x byte
diff --git a/pts/test-resources/byte/parse-results.php b/pts/test-resources/byte/parse-results.php
new file mode 100644
index 0000000..9fa68c9
--- /dev/null
+++ b/pts/test-resources/byte/parse-results.php
@@ -0,0 +1,14 @@
+<?php
+
+$file = @file_get_contents("result");
+$results = trim(substr($file, 0, strrpos($file, "INDEX VALUES")));
+$results = trim(substr($results, 0, strrpos($results, "(")));
+
+$result_unit = substr($results, strrpos($results, " ") + 1);
+
+$results = substr($results, 0, (-1 - strlen($result_unit)));
+$results = substr($results, strrpos($results, " ") + 1);
+
+echo $results;
+
+?>