diff options
author | Tom Gall <tom.gall@linaro.org> | 2012-11-21 15:17:47 -0600 |
---|---|---|
committer | Tom Gall <tom.gall@linaro.org> | 2012-11-21 15:17:47 -0600 |
commit | 9e5843ee8346e4e7ac5803c3990dc9a21bfae2aa (patch) | |
tree | 3b9cfc42e734feaff76dd1b7b5f494396de91cba /tests/glmark2 | |
parent | b817d1ec3c80c0bf23db5a09c0011fa1509792a9 (diff) |
Fix up results reporting between the python side in glmark2test.pyglmark2
and from the glmark2 side.
Based on scene results return a proper piglit marked dictionary
Diffstat (limited to 'tests/glmark2')
-rw-r--r-- | tests/glmark2/src/scene-simpletriangle.cpp | 2 | ||||
-rw-r--r-- | tests/glmark2/src/scene.h | 1 | ||||
-rw-r--r-- | tests/glmark2/src/test-collection.cpp | 21 |
3 files changed, 22 insertions, 2 deletions
diff --git a/tests/glmark2/src/scene-simpletriangle.cpp b/tests/glmark2/src/scene-simpletriangle.cpp index a148d70a..c8785fc4 100644 --- a/tests/glmark2/src/scene-simpletriangle.cpp +++ b/tests/glmark2/src/scene-simpletriangle.cpp @@ -38,7 +38,7 @@ SceneSimpleTriangle::SceneSimpleTriangle(Canvas &pCanvas) : Scene(pCanvas, "simpletriangle"), radius_(0.0), orientModel_(false), orientationAngle_(0.0) { - +testResult=Scene::ValidationUnknown; duration_=30; // set for 30 seconds } diff --git a/tests/glmark2/src/scene.h b/tests/glmark2/src/scene.h index e543bf57..3930928d 100644 --- a/tests/glmark2/src/scene.h +++ b/tests/glmark2/src/scene.h @@ -293,6 +293,7 @@ public: ~SceneSimpleTriangle(); protected: + Scene::ValidationResult testResult; Program program_; Mesh mesh_; GLuint texture_; diff --git a/tests/glmark2/src/test-collection.cpp b/tests/glmark2/src/test-collection.cpp index bf960903..31775f30 100644 --- a/tests/glmark2/src/test-collection.cpp +++ b/tests/glmark2/src/test-collection.cpp @@ -25,6 +25,7 @@ #include "options.h" #include "log.h" #include "util.h" +#include "scene.h" TestCollection::~TestCollection() { @@ -120,5 +121,23 @@ TestCollection::benchmarks_contain_normal_scenes() void TestCollection::report_results() { - + Scene::ValidationResult r; + + fflush(stderr); + + for (std::vector<Benchmark *>::const_iterator iter = tests_.begin(); + iter != tests_.end(); + iter++) { + const Benchmark *bench=*iter; + switch(bench->scene().validate()) { + case Scene::ValidationSuccess: + printf("PIGLIT: {'result': 'pass' }\n"); + break; + case Scene::ValidationFailure: + case Scene::ValidationUnknown: + printf("PIGLIT: {'result': 'fail' }\n"); + break; + } + } + fflush(stdout); } |