summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2016-11-10i965_test_config: return properly unsupported profileDaniel Charles4-33/+174
jpege/jpegd and avce/avcd config tests to check against all supported entrypoints for a profile. UNSUPPORTED_PROFILE is expected when no entrypoints are available for a given profile, else expect UNSUPPORTED_ENTRYPOINT. Signed-off-by: Daniel Charles <daniel.charles@intel.com> Reviewed-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2016-11-10Add the missing filename to the listXiang, Haihao1-0/+1
Otherwise the package created by 'make dist' doesn't include the missing file Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> (cherry picked from commit ed6baee7d523d512ac296d71132c26b37c0d818a)
2016-10-28test: use YUVImage in JPEG encode testsU. Artie Eoff3-271/+86
The YUVImage class allows for more efficient (faster) operations on the YUV input/output of these tests. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-28test: streamable valarrayU. Artie Eoff1-0/+25
Add stream operators for std::valarray. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-28test: add YUVImage classU. Artie Eoff3-0/+815
Add a class that employs std::valarray and std::slice to manage YUV input/output data. Using valarray's and slice's are generally more efficient than std::vector in most test use cases where YUV data is needed. Current test cases that are using different (yet similar) code to manage it's own YUV input/output data can eventually converge onto use of this common class instead. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-28test: use C random library for random numbersU. Artie Eoff3-12/+18
The speed of random number generation can have a significant impact on test execution time when initializing large arrays of random values. The C++ random number engines and generators are much slower than std::rand. Thus, use C's rand() to generate pseudo-random values within a given [min,max] range. For testing purposes, deterministic sequences would be preferable anyway. That is, if a particular sequence exposes a test failure, then we can reproduce it later. Also, we seed the pseudo-random number generator with the current time so that the sequence is not always the same across executions. The seed is then recorded in the test results so that the sequence can be reproduced if needed. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-28test: add a timer classU. Artie Eoff1-0/+26
The timer is useful to quickly instrument various sections of code during test development optimization tasks or other timing needs. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-19test: use valarray for raw image comparisonScott D Phillips1-16/+13
std::valarray can fuse elementwise operations across arrays for more efficient comparison. Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com> Reviewed-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2016-10-13test: add some avce context testsU. Artie Eoff5-0/+385
Add some simple avce context tests to verify various encode context fields are appropriately configured. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-13test: allow default attribs param for create configU. Artie Eoff2-3/+5
Driver does not require config attributes to create a config. Thus, allow I965TestFixture::createConfig to be called without specifying ConfigAttribs. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-13test: allow default surface param for create contextU. Artie Eoff2-3/+5
The driver does not require surfaces to create a context. That is, i965_CreateContext can accept an empty render_targets list. Thus, make Surfaces an optional parameter to I965TestFixture::createContext so that simple tests don't have to bother with Surfaces if they are irrelevant to the test case. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-06test: use common I965ConfigTest fixture for jpeg enc/decU. Artie Eoff5-40/+109
Instantiate the JPEG encode/decode Entrypoint tests from the common I965ConfigTest fixture with additional test inputs. Also, separate them into their own files. This changes their test case names, too. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-06test: add avce/avcd create config testsU. Artie Eoff5-0/+304
Add a common I965ConfigTest parameterized test fixture with a i965_CreateConfig test case and add the AVC encode/decode create config test instantiations with associated profile and entrypoint inputs. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-06test: add ostream operators for VAProfile and VAEntrypointU. Artie Eoff1-0/+84
Add ostream operators for VAProfile and VAEntrypoint so the testing framework and tests can log them by name. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-06test: move vaInitialize/vaTerminate to a global test environmentU. Artie Eoff6-158/+202
Move the VADisplay, vaInitialize and vaTerminate responsibility out of the I965TestFixture class and into a global I965TestEnvironment (::testing::Environment) singleton. The I965TestEnvironment singleton instance is registered with the gtest framework at startup and it's SetUp and TearDown routines are executed before and after all tests are executed. This allows all tests to obtain access to the VADisplay et. al. outside of an I965TestFixture instance. Essentially, this results in only one VADisplay being shared between all executed test cases and one init/term sequence for the entire test program execution. This more closely resembles how several real-world programs would use the driver (i.e. init driver once, encode/decode multiple streams and terminate driver once). Prior to this, each test case had it's own VADisplay instance and init/term sequence. That behavior can still be achieved by executing one test case at a time via the --gtest_filter option. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-04test: add create surface testU. Artie Eoff3-0/+122
Add test to verify correct result for create surfaces with supported and unsupported pixel formats. Currently the IYUV pixel format case fails... see https://bugs.freedesktop.org/show_bug.cgi?id=98033 Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-03test: jpeg/enc: add tests for Y800 inputsU. Artie Eoff3-5/+25
Add support for Y800 input data for jpeg encode tests. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-03test: jpeg/enc: add tests for YUY2 and UYVY inputsU. Artie Eoff3-19/+104
...plus optimize TestInput::toOutputFourcc() Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-03test: jpeg/enc: return empty TestInput::Shared if fourcc not handledU. Artie Eoff2-41/+48
Move JPEG::Encode::TestInput member initialization to its static "create" routine so that an empty/invalid Shared can be returned if the input fourcc is not handled/implemented. This will allow a caller/test to react appropriately. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-03test: jpeg/enc: improve random YUV data initializationU. Artie Eoff2-9/+10
Make initialization of YUV input for jpeg encode a little faster, esp. for larger resolution. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-03test: jpeg/enc: move YUV conversion to TestInput classU. Artie Eoff3-24/+28
Let the ::JPEG::Encode::TestInput class deal with converting from its input fourcc to its expected output fourcc. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-03test: jpeg/enc: enable shared_from_this on TestInputU. Artie Eoff3-3/+13
...and make the constructor private so that only Shared instances can be created. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-03test: jpeg/enc: move input creators to data fileU. Artie Eoff3-80/+110
Move the ::JPEG::Encode::TestInputCreator's to the i965_jpeg_test_data[.h|.cpp] files. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-03test: jpeg/enc: move TestInput impl to compilation unitU. Artie Eoff4-95/+98
Move the implementation of JPEG::Encode::TestInput to the compilation unit file (.cpp). This helps reduce the number of include headers needed in the header file. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-03test: jpeg/enc: fix TestInput::SharedConst typedefU. Artie Eoff1-1/+1
The ::JPEG::Encode::TestInput::SharedConst typedef should actually use a 'const TestInput' template parameter for the std::shared_ptr. Hence, the name. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-03test: move generic toString to i965_streamable.hU. Artie Eoff2-10/+9
The toString template is generic and should be part of the i965_streamable.h header. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-10-03test: move ASSERT_NO_FAILURE macro to test.hU. Artie Eoff3-8/+4
Both jpeg decode and encode test files use this macro. So move it to the common test.h header to avoid duplicating it. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-09-28test: add some jpeg encode testsU. Artie Eoff4-4/+895
Add JPEG encode tests that encode raw I420 and NV12 data at quality 100 and then decodes them to verify proper encoding. Currently, the 7680x4320 I420 test fails because ~40-60 Y-values (i.e. plane 0) in each line from the decoded bitstream are off by more than 2 of the original raw I420 values. It is not clear why only this resolution exhibits this problem. v2: don't create any input data in test fixture if jpeg encoding is not supported. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
2016-09-28test: add common test utilsU. Artie Eoff2-0/+50
Common utilities and functions that may be useful for multiple tests. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
2016-09-28test: add wrapper for SyncSurfaceU. Artie Eoff3-0/+15
Add a wrapper that calls the driver i965_SyncSurface. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
2016-09-28test: add streamable operators for VA structs and otherU. Artie Eoff2-0/+362
Add convenience streamable operators for VA and other common data structures so that tests can log them as needed. v2: put std::array stream operators into the std namespace otherwise gcc 5.x complains. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
2016-09-28test: add wrapper for CreateSurfaces2U. Artie Eoff2-7/+23
Add support for calling i965_CreateSurfaces2 so that we can pass VASurfaceAttributes. This is needed to set a particular surface pixel format in some tests. We must call i965_CreateSurfaces2 via the vtable since it is a static function within the i965_drv_video.c file... thus hidden. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
2016-09-28test: wrap jpeg decode tests and data in namespaceU. Artie Eoff3-60/+33
Put the JPEG decode tests and test data into its own namespace so that it can be distinguished from encode. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
2016-09-28test: split jpeg test data into header and cppU. Artie Eoff3-734/+765
Move static definitions of JPEG TestPatternData into the .cpp so that multiple files can include the i965_jpeg_test_data.h header file. Otherwise, there will be "multiple definition" compiler errors. Also, change generateSolid to be inline for the same reason. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
2016-09-08test: skip jpeg fourcc decode test if unsupported by hwU. Artie Eoff1-0/+9
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@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-09-08test: add getFullTestName to i965 test fixtureU. Artie Eoff2-0/+12
Add I965TestFixture::getFullTestName to allow tests to log the current test's name. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-09-08test: add jpeg entrypoint testU. Artie Eoff1-5/+32
Add a test to verify the i965_CreateConfig functionality for the VAProfileJPEGBaseline/VAEntrypointVLD entrypoint based on platform supported or not. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-09-08test: add more convenience macros and wrap VAStatusU. Artie Eoff1-2/+107
Add some more convenience test macros and wrap the VAStatus in a class so that it can be streamed by its name instead of its value by the gtest framework. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-09-07test: fix jpeg decode invalid indexingU. Artie Eoff1-33/+32
Use hsample and vsample factor in printComponentDataTo to avoid invalid indexes into the data array. This fixes a segfault in the jpeg fourcc tests that may be triggered during 'make check'. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2016-09-07test: add some chipset testsU. Artie Eoff3-0/+108
Add various tests to verify the integrity of the chipset and pciid definitions and lookups. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-09-07test: add some object_heap testsU. Artie Eoff3-0/+252
Add some basic object_heap tests to verify logical usage. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-09-07test: add some JPEG decode test casesU. Artie Eoff3-0/+1379
Test that the driver properly decodes JPEG data that is encoded in various fourcc formats. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-09-07test: add an i965 initialize testU. Artie Eoff2-0/+67
Add basic i965 initialize test to verify certain driver data is properly initialized and to demonstrate the usage of the I965TestFixture class. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-09-07test: add i965 test fixtureU. Artie Eoff4-0/+534
Add an i965 test fixture class which creates a va drm display for driver testing and initializes/terminates va. It also provides some conversion operators for converting to various driver data types. Various driver wrapper functions are provided, too, for convenience. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-09-07test: link to i965 convenience libraryU. Artie Eoff1-0/+1
Link the i965 convenience library to the i965 test executable for testing. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-09-07test: add initial test_i965_drv_video targetU. Artie Eoff3-0/+124
Add test_i965_drv_video as noinst program with an initial test main() definition. Also provide a test.h header with common test includes and definitions that can be included by all test compilation units. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-09-07toolchain: build gtest convenience libraryU. Artie Eoff1-0/+38
Define autoconf/automake rules to build libgtest.la as a convenience library. Add --enable-tests configure option (default:no). Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
2016-09-07test: add googletest release-1.8.0 sourceU. Artie Eoff48-0/+37695
We will use the Google Test Framework for testing. Google Test is not meant to be packaged and used as a system dependency like other libraries. Google Test recommends that it be custom compiled for each project that uses it. Thus, we'll keep our own copy of it here and compile it as needed. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>