OSDN Git Service
test: move vaInitialize/vaTerminate to a global test environment
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>