summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-11-02 17:26:56 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-11-02 17:26:56 -0500
commit01c10d86aa5eacb163f53309585a8c19be030347 (patch)
tree309b117570dcc6298509094fef38df452a6debb2
parent80c4eac6075a40a63585d29cfe6de33b377369ac (diff)
downloadphoronix-test-suite-upstream-01c10d86aa5eacb163f53309585a8c19be030347.tar.gz
phoronix-test-suite-upstream-01c10d86aa5eacb163f53309585a8c19be030347.tar.xz
phoronix-test-suite-upstream-01c10d86aa5eacb163f53309585a8c19be030347.zip
pts: Add qgears2 test profile for a Qt graphics test that can test
XRender and OpenGL
-rw-r--r--CHANGE-LOG1
-rw-r--r--pts/test-profiles/qgears2.xml59
-rw-r--r--pts/test-resources/qgears2/downloads.xml10
-rwxr-xr-xpts/test-resources/qgears2/install.sh40
-rw-r--r--pts/test-resources/qgears2/parse-results.php20
5 files changed, 130 insertions, 0 deletions
diff --git a/CHANGE-LOG b/CHANGE-LOG
index a7d1247..d969c26 100644
--- a/CHANGE-LOG
+++ b/CHANGE-LOG
@@ -35,6 +35,7 @@ Phoronix Test Suite (Git)
- pts_Graph: Support resizing the font size in write_text_center() if it's too large to fit within the bounding box
- pts: Add Qt4 development files to external dependencies through qt4-development generic name
- pts: Ensure all *-devel generic names are now named *-development
+- pts: Add qgears2 test profile for a Qt graphics test that can test XRender and OpenGL
- update_checker: Fix version recognition / comparison
- documentation: Bring all documentation up-to-date with Orkdal
diff --git a/pts/test-profiles/qgears2.xml b/pts/test-profiles/qgears2.xml
new file mode 100644
index 0000000..0373b89
--- /dev/null
+++ b/pts/test-profiles/qgears2.xml
@@ -0,0 +1,59 @@
+<PhoronixTestSuite>
+ <TestProfile>
+ <Version>1.0.0</Version>
+ <TestType>Graphics</TestType>
+ <SoftwareType>Other</SoftwareType>
+ <License>FREE</License>
+ <Status>VERIFIED</Status>
+ <Maintainer>Michael Larabel</Maintainer>
+ <EnvironmentSize>0.42</EnvironmentSize>
+ <ProjectURL>http://zrusin.blogspot.com/</ProjectURL>
+ <ExternalDependencies>build-essential, qt4-development</ExternalDependencies>
+ <SupportedPlatforms>Linux</SupportedPlatforms>
+ </TestProfile>
+ <TestInformation>
+ <Title>QGears2</Title>
+ <Executable>qgears2-run</Executable>
+ <TimesToRun>3</TimesToRun>
+ <ResultScale>Frames Per Second</ResultScale>
+ <Description>This test runs qgears2, which is a test written by Zack Rusin and is based upon cairogears. This test can see how well different rendering backends perform and uses Qt4.</Description>
+ </TestInformation>
+ <TestSettings>
+ <Option>
+ <DisplayName>Rendering</DisplayName>
+ <Identifier>render-backend</Identifier>
+ <Menu>
+ <Entry>
+ <Name>CPU-based Raster</Name>
+ <Value>-image</Value>
+ </Entry>
+ <Entry>
+ <Name>XRender Extension</Name>
+ <Value>-render</Value>
+ </Entry>
+ <Entry>
+ <Name>OpenGL</Name>
+ <Value>-gl</Value>
+ </Entry>
+ </Menu>
+ </Option>
+ <Option>
+ <DisplayName>Test</DisplayName>
+ <Identifier>test-mode</Identifier>
+ <Menu>
+ <Entry>
+ <Name>Gears</Name>
+ <Value>GEARSFANCY</Value>
+ </Entry>
+ <Entry>
+ <Name>Text</Name>
+ <Value>TEXT</Value>
+ </Entry>
+ <Entry>
+ <Name>Image Scaling</Name>
+ <Value>COMPO</Value>
+ </Entry>
+ </Menu>
+ </Option>
+ </TestSettings>
+</PhoronixTestSuite>
diff --git a/pts/test-resources/qgears2/downloads.xml b/pts/test-resources/qgears2/downloads.xml
new file mode 100644
index 0000000..f722231
--- /dev/null
+++ b/pts/test-resources/qgears2/downloads.xml
@@ -0,0 +1,10 @@
+<PhoronixTestSuite>
+ <Downloads>
+ <Package>
+ <URL>http://www.phoronix-test-suite.com/benchmark-files/qgears2.tar.bz2, http://www.phoronix.net/downloads/phoronix-test-suite/benchmark-files/qgears2.tar.bz2, http://ktown.kde.org/~zrusin/examples/qgears2.tar.bz2</URL>
+ <MD5>1a5d0f555745c397216caa551fbda305</MD5>
+ <FileSize>274282</FileSize>
+ </Package>
+ </Downloads>
+</PhoronixTestSuite>
+
diff --git a/pts/test-resources/qgears2/install.sh b/pts/test-resources/qgears2/install.sh
new file mode 100755
index 0000000..cbcdb00
--- /dev/null
+++ b/pts/test-resources/qgears2/install.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+tar -jxf qgears2.tar.bz2
+cd qgears2/
+
+chmod +w commonrenderer.cpp
+echo "--- commonrenderer.cpp.orig 2008-11-02 16:19:16.000000000 -0500
++++ commonrenderer.cpp 2008-11-02 16:20:33.000000000 -0500
+@@ -31,6 +31,7 @@
+ double gear1_rotation = 35;
+ double gear2_rotation = 24;
+ double gear3_rotation = 33.5;
++int frame_report_count = 0;
+
+ #define LINEWIDTH 3
+
+@@ -83,7 +84,13 @@
+
+ ++frame_cnt;
+ if (FRAME_COUNT_INTERVAL == frame_cnt)
++ {
+ printFrameRate();
++ frame_report_count++;
++ }
++
++ if(frame_report_count == 40)
++ exit(0);
+ }
+
+ QPainterPath CommonRenderer::gearPath(double inner_radius, double outer_radius," | patch -p0
+
+
+qmake
+make
+cd ..
+
+echo "#!/bin/sh
+cd qgears2/
+./qgears \$1 \$2 > \$LOG_FILE 2>&1" > qgears2-run
+chmod +x qgears2-run
diff --git a/pts/test-resources/qgears2/parse-results.php b/pts/test-resources/qgears2/parse-results.php
new file mode 100644
index 0000000..8ee6998
--- /dev/null
+++ b/pts/test-resources/qgears2/parse-results.php
@@ -0,0 +1,20 @@
+<?php
+
+$log_file = file_get_contents(getenv("LOG_FILE"));
+$fps_values = array();
+
+foreach(explode("\n", $log_file) as $log_line)
+{
+ $log_value = substr($log_line, strpos($log_line, "= ") + 2);
+ $log_value = substr($log_value, 0, strpos($log_value, " FPS"));
+
+ if(is_numeric($log_value))
+ {
+ array_push($fps_values, $log_value);
+ }
+}
+
+if(count($fps_values) > 0)
+ echo (array_sum($fps_values) / count($fps_values));
+
+?>