[Libva] [PATCH intel-driver 5/5] test: skip jpeg fourcc decode test if unsupported by hw

U. Artie Eoff ullysses.a.eoff at intel.com
Wed Sep 7 20:43:38 UTC 2016


If the hardware does not support jpeg decode, then log this
information and return from the test early.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff at intel.com>
---
 test/i965_jpeg_decode_test.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/test/i965_jpeg_decode_test.cpp b/test/i965_jpeg_decode_test.cpp
index f65aa77cce75..24a30e63c91e 100644
--- a/test/i965_jpeg_decode_test.cpp
+++ b/test/i965_jpeg_decode_test.cpp
@@ -203,6 +203,15 @@ protected:
 
 TEST_P(FourCCTest, Decode)
 {
+    struct i965_driver_data *i965(*this);
+    ASSERT_PTR(i965);
+    if (not HAS_JPEG_DECODING(i965)) {
+        RecordProperty("skipped", true);
+        std::cout << "[  SKIPPED ] " << getFullTestName()
+            << " is unsupported on this hardware" << std::endl;
+        return;
+    }
+
     VAConfigAttrib a = { type:VAConfigAttribRTFormat, value:pd->format };
     ConfigAttribs attribs(1, a);
 
-- 
2.1.0



More information about the Libva mailing list