Commit Graph

14 Commits

Author SHA1 Message Date
Sil Vilerino b587966f8d tests: enable building on Windows
Signed-off-by: Sil Vilerino <sivileri@microsoft.com>
2022-10-23 21:39:00 +08:00
Carl Zhang 42dd2b216e unify the code styles using the style_unify script
use astyle to unify the code style
copy the style_unify script from
https://github.com/intel/libva/blob/master/style_unify

Signed-off-by: Carl Zhang <carl.zhang@intel.com>
2021-09-29 20:59:40 -04:00
Carl Zhang a09593a7d8 remove version check for test vaInitialize_vaTerminate
it is used to fix such issue, version from libva-utils and libva is different.
because older libva-utils should also work with newer libva.

Signed-off-by: Carl Zhang <carl.zhang@intel.com>
2021-06-21 15:09:13 +08:00
U. Artie Eoff a236e34e64 test: update vaInitialize_vaTerminate_Bad_vaSetDriverName
Since intel/libva#250, driver names are no longer restricted
to a whitelist.  Thus, any driver name is legal except for
a few corner cases (i.e. empty name and name > 255 chars).

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2019-05-08 20:47:02 +08:00
U. Artie Eoff 8a6ef9ed90 test: remove i965 driver specific cases
Conformance tests should be as generic as possible and
not assume availability of any specific driver.

Fixes #93
Fixes #94
Fixes #95

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-05-30 11:18:10 -07:00
U. Artie Eoff 7a08da06dd test/init_terminate: cleanup test cases
Streamline logic, variable names and code formatting

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-12 08:35:10 +08:00
U. Artie Eoff a95be999a7 test: remove local va_version.h.in
The locally generated va_version.h was erroneous and
not even being used in the tests.  This is because
va/va.h already includes the "real" va/va_version.h.

Thus, remove local va_version.h.in.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-12 08:35:10 +08:00
U. Artie Eoff ea2e00239c test/VAAPIInitTerminate: combine .h and .cpp contents
The header is only needed in one compilation unit.
Thus, move it's contents to the compilation unit to
reduce unnecessary complexity and maintenance.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2018-01-02 11:19:31 -08:00
Victor Toso 3c45590f61 test: Fix leak on bad vaSetDriverName() test
880 (480 direct, 400 indirect) bytes in 1 blocks are definitely lost in loss
record 13 of 15
   at 0x4C2EF35: calloc
   by 0x503FF12: va_newDriverContext (in /usr/lib/libva.so.2.0.0)
   by 0x4E39F63: vaGetDisplayDRM (in /usr/lib/libva-drm.so.2.0.0)
   by 0x11ADD1: VAAPI::VAAPIFixture::getDisplay() (test_va_api_fixture.cpp:80)
   by 0x15133E: VAAPI::VAAPIInitTerminate_vaInitialize_vaTerminate_Bad_vaSetDriverName_Test::TestBody()

Signed-off-by: Victor Toso <victortoso@redhat.com>
2017-12-19 10:30:02 -08:00
U. Artie Eoff f3481ced2a test: use new convenience macros
Use new convenience macros to improve logging output.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2017-12-18 12:14:18 -08:00
U. Artie Eoff 5e945b7414 test: appropriately name driver specific tests
Some tests are specific to a particular driver (e.g. i965).
Thus, name them appropriately.

Ideally, driver specific tests should not exist in this
suite.  Rather, these should be in the driver project's
test suite if it makes sense.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2017-12-01 11:29:18 -08:00
U. Artie Eoff c3210a7c89 test: fix VAAPIInitTerminate BadDriverName_Macro test
If LIBVA_DRIVER_NAME is defined before this test executes,
then it will fail since the setenv overwrite parameter was
set to 0.  Thus, set the overwrite parameter to 1 to force
setenv to overwrite the previous setting.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2017-12-01 11:29:18 -08:00
Kelly Ledford f6c9dcfed1 test: fix GCC 7.1.1 warnings/errors
Fixes #52: add explicit braces to avoid 'ambiguous else' warning.

Signed-off-by: Kelly Ledford <kelly.ledford@intel.com>
2017-07-28 10:00:46 +08:00
Daniel Charles 45c32e3484 gtest: initial Gtest set for VA-API
This initial set of files covers the va.h API for all the
functions used to exercise successfully the VA-API.

Tests are divided per VA-API function with a common Fixture that
contains all calling functions to the VA-API.  For the use cases
covered already there are tests for the proper functionality and also
for expected error situations.

The tests creates combinations with all the inputs to the VA-API function
and then it checks the results based on what the driver implementation reports
as supported

The set of tests can be run on any h/w supported and any driver.

The VendorString test is assuming Intel i965 driver, please help
adding the test for other drivers

More tests will be continously added

Signed-off-by: Daniel Charles <daniel.charles@intel.com>
2016-11-29 11:41:17 -08:00