Discussion:
[PATCH intel-driver 3/4] test: add avce/avcd create config tests
(too old to reply)
U. Artie Eoff
2016-10-05 17:54:26 UTC
Permalink
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 <***@intel.com>
---
test/Makefile.am | 4 ++
test/i965_avcd_config_test.cpp | 72 +++++++++++++++++++++++++++
test/i965_avce_config_test.cpp | 109 +++++++++++++++++++++++++++++++++++++++++
test/i965_config_test.cpp | 63 ++++++++++++++++++++++++
test/i965_config_test.h | 56 +++++++++++++++++++++
5 files changed, 304 insertions(+)
create mode 100644 test/i965_avcd_config_test.cpp
create mode 100644 test/i965_avce_config_test.cpp
create mode 100644 test/i965_config_test.cpp
create mode 100644 test/i965_config_test.h

diff --git a/test/Makefile.am b/test/Makefile.am
index 6448ad5b78b8..07189e56e6cb 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -44,6 +44,7 @@ EXTRA_DIST = \
# test_i965_drv_video
noinst_PROGRAMS = test_i965_drv_video
noinst_HEADERS = \
+ i965_config_test.h \
i965_internal_decl.h \
i965_jpeg_test_data.h \
i965_test_environment.h \
@@ -53,7 +54,10 @@ noinst_HEADERS = \
$(NULL)

test_i965_drv_video_SOURCES = \
+ i965_avcd_config_test.cpp \
+ i965_avce_config_test.cpp \
i965_chipset_test.cpp \
+ i965_config_test.cpp \
i965_initialize_test.cpp \
i965_jpeg_test_data.cpp \
i965_jpeg_decode_test.cpp \
diff --git a/test/i965_avcd_config_test.cpp b/test/i965_avcd_config_test.cpp
new file mode 100644
index 000000000000..851e86e890dd
--- /dev/null
+++ b/test/i965_avcd_config_test.cpp
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2016 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "i965_config_test.h"
+
+namespace AVC {
+namespace Decode {
+
+VAStatus HasDecodeSupport()
+{
+ I965TestEnvironment *env(I965TestEnvironment::instance());
+ EXPECT_PTR(env);
+
+ struct i965_driver_data *i965(*env);
+ EXPECT_PTR(i965);
+
+ return HAS_H264_DECODING(i965) ? VA_STATUS_SUCCESS :
+ VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+}
+
+VAStatus HasMVCDecodeSupport(const VAProfile& profile)
+{
+ I965TestEnvironment *env(I965TestEnvironment::instance());
+ EXPECT_PTR(env);
+
+ struct i965_driver_data *i965(*env);
+ EXPECT_PTR(i965);
+
+ return HAS_H264_MVC_DECODING_PROFILE(i965, profile) ? VA_STATUS_SUCCESS :
+ VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+}
+
+static const std::vector<ConfigTestInput> inputs = {
+ {VAProfileH264Baseline, VAEntrypointVLD,
+ []{return VA_STATUS_ERROR_UNSUPPORTED_PROFILE;}},
+
+ {VAProfileH264ConstrainedBaseline, VAEntrypointVLD, &HasDecodeSupport},
+ {VAProfileH264Main, VAEntrypointVLD, &HasDecodeSupport},
+ {VAProfileH264High, VAEntrypointVLD, &HasDecodeSupport},
+
+ {VAProfileH264MultiviewHigh, VAEntrypointVLD,
+ std::bind(&HasMVCDecodeSupport, VAProfileH264MultiviewHigh)},
+ {VAProfileH264StereoHigh, VAEntrypointVLD,
+ std::bind(&HasMVCDecodeSupport, VAProfileH264StereoHigh)},
+};
+
+INSTANTIATE_TEST_CASE_P(
+ AVCDecode, I965ConfigTest, ::testing::ValuesIn(inputs));
+
+} // namespace Decode
+} // namespace AVC
diff --git a/test/i965_avce_config_test.cpp b/test/i965_avce_config_test.cpp
new file mode 100644
index 000000000000..b30abbc3d4aa
--- /dev/null
+++ b/test/i965_avce_config_test.cpp
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2016 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "i965_config_test.h"
+
+namespace AVC {
+namespace Encode {
+
+VAStatus ProfileNotSupported()
+{
+ return VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+}
+
+VAStatus EntrypointNotSupported()
+{
+ return VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+}
+
+VAStatus HasEncodeSupport()
+{
+ I965TestEnvironment *env(I965TestEnvironment::instance());
+ EXPECT_PTR(env);
+
+ struct i965_driver_data *i965(*env);
+ EXPECT_PTR(i965);
+
+ return HAS_H264_ENCODING(i965) ? VA_STATUS_SUCCESS :
+ EntrypointNotSupported();
+}
+
+VAStatus HasLPEncodeSupport()
+{
+ I965TestEnvironment *env(I965TestEnvironment::instance());
+ EXPECT_PTR(env);
+
+ struct i965_driver_data *i965(*env);
+ EXPECT_PTR(i965);
+
+ if (IS_SKL(i965->intel.device_info))
+ return VA_STATUS_SUCCESS;
+
+ return HAS_LP_H264_ENCODING(i965) ? VA_STATUS_SUCCESS :
+ EntrypointNotSupported();
+}
+
+VAStatus HasMVCEncodeSupport()
+{
+ I965TestEnvironment *env(I965TestEnvironment::instance());
+ EXPECT_PTR(env);
+
+ struct i965_driver_data *i965(*env);
+ EXPECT_PTR(i965);
+
+ return HAS_H264_MVC_ENCODING(i965) ? VA_STATUS_SUCCESS :
+ EntrypointNotSupported();
+}
+
+static const std::vector<ConfigTestInput> inputs = {
+ {VAProfileH264Baseline, VAEntrypointEncSlice, &ProfileNotSupported},
+ {VAProfileH264Baseline, VAEntrypointEncSliceLP, &ProfileNotSupported},
+ {VAProfileH264Baseline, VAEntrypointEncPicture, &ProfileNotSupported},
+
+ {VAProfileH264ConstrainedBaseline, VAEntrypointEncSlice, &HasEncodeSupport},
+ {VAProfileH264ConstrainedBaseline, VAEntrypointEncSliceLP, &HasLPEncodeSupport},
+ {VAProfileH264ConstrainedBaseline, VAEntrypointEncPicture, &EntrypointNotSupported},
+
+ {VAProfileH264Main, VAEntrypointEncSlice, &HasEncodeSupport},
+ {VAProfileH264Main, VAEntrypointEncSliceLP, &HasLPEncodeSupport},
+ {VAProfileH264Main, VAEntrypointEncPicture, &EntrypointNotSupported},
+
+ {VAProfileH264High, VAEntrypointEncSlice, &HasEncodeSupport},
+ {VAProfileH264High, VAEntrypointEncSliceLP, &HasLPEncodeSupport},
+ {VAProfileH264High, VAEntrypointEncPicture, &EntrypointNotSupported},
+
+ {VAProfileH264MultiviewHigh, VAEntrypointEncSlice, &HasMVCEncodeSupport},
+ {VAProfileH264MultiviewHigh, VAEntrypointEncSliceLP, &EntrypointNotSupported},
+ {VAProfileH264MultiviewHigh, VAEntrypointEncPicture, &EntrypointNotSupported},
+
+ {VAProfileH264StereoHigh, VAEntrypointEncSlice, &HasMVCEncodeSupport},
+ {VAProfileH264StereoHigh, VAEntrypointEncSliceLP, &EntrypointNotSupported},
+ {VAProfileH264StereoHigh, VAEntrypointEncPicture, &EntrypointNotSupported},
+};
+
+INSTANTIATE_TEST_CASE_P(
+ AVCEncode, I965ConfigTest, ::testing::ValuesIn(inputs));
+
+} // namespace Encode
+} // namespace AVC
diff --git a/test/i965_config_test.cpp b/test/i965_config_test.cpp
new file mode 100644
index 000000000000..3370bc588452
--- /dev/null
+++ b/test/i965_config_test.cpp
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2016 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "i965_config_test.h"
+#include "i965_streamable.h"
+
+std::ostream& operator<<(std::ostream& os, const ConfigTestInput& input)
+{
+ return os << input.profile << " : " << input.entrypoint;
+}
+
+I965ConfigTest::I965ConfigTest()
+ : I965TestFixture()
+ , config(VA_INVALID_ID) // invalid
+{
+ return;
+}
+
+void I965ConfigTest::TearDown()
+{
+ if (config != VA_INVALID_ID) {
+ destroyConfig(config);
+ config = VA_INVALID_ID;
+ }
+ I965TestFixture::TearDown();
+}
+
+TEST_P(I965ConfigTest, Create)
+{
+ const ConfigTestInput& input = GetParam();
+ const VAStatus expect = input.expect();
+
+ RecordProperty("expect_status", toString(VaapiStatus(expect)));
+
+ const VAStatus actual = i965_CreateConfig(
+ *this, input.profile, input.entrypoint, NULL, 0, &config);
+
+ EXPECT_STATUS_EQ(expect, actual);
+
+ if (actual != VA_STATUS_SUCCESS)
+ EXPECT_INVALID_ID(config);
+}
diff --git a/test/i965_config_test.h b/test/i965_config_test.h
new file mode 100644
index 000000000000..79cb9608c2da
--- /dev/null
+++ b/test/i965_config_test.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2016 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef I965_CONFIG_TEST
+#define I965_CONFIG_TEST
+
+#include "i965_test_fixture.h"
+
+#include <functional>
+#include <iostream>
+
+struct ConfigTestInput
+{
+ VAProfile profile;
+ VAEntrypoint entrypoint;
+ std::function<VAStatus (void)> expect;
+
+ friend std::ostream& operator<<(
+ std::ostream& os, const ConfigTestInput& input);
+};
+
+class I965ConfigTest
+ : public I965TestFixture
+ , public ::testing::WithParamInterface<ConfigTestInput>
+{
+public:
+ I965ConfigTest();
+
+protected:
+ virtual void TearDown();
+
+ VAConfigID config;
+};
+
+#endif
--
2.1.0
U. Artie Eoff
2016-10-05 17:54:25 UTC
Permalink
Add ostream operators for VAProfile and VAEntrypoint so
the testing framework and tests can log them by name.

Signed-off-by: U. Artie Eoff <***@intel.com>
---
test/i965_streamable.h | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 84 insertions(+)

diff --git a/test/i965_streamable.h b/test/i965_streamable.h
index aab3111fff56..4969c1413173 100644
--- a/test/i965_streamable.h
+++ b/test/i965_streamable.h
@@ -367,4 +367,88 @@ operator<<(std::ostream& os, const VAImage& image)
return os;
}

+inline std::ostream&
+operator<<(std::ostream& os, const VAProfile& profile)
+{
+ switch(profile) {
+ case VAProfileNone:
+ return os << "VAProfileNone";
+ case VAProfileMPEG2Simple:
+ return os << "VAProfileMPEG2Simple";
+ case VAProfileMPEG2Main:
+ return os << "VAProfileMPEG2Main";
+ case VAProfileMPEG4Simple:
+ return os << "VAProfileMPEG4Simple";
+ case VAProfileMPEG4AdvancedSimple:
+ return os << "VAProfileMPEG4AdvancedSimple";
+ case VAProfileMPEG4Main:
+ return os << "VAProfileMPEG4Main";
+ case VAProfileVC1Simple:
+ return os << "VAProfileVC1Simple";
+ case VAProfileVC1Main:
+ return os << "VAProfileVC1Main";
+ case VAProfileVC1Advanced:
+ return os << "VAProfileVC1Advanced";
+ case VAProfileH263Baseline:
+ return os << "VAProfileH263Baseline";
+ case VAProfileJPEGBaseline:
+ return os << "VAProfileJPEGBaseline";
+ case VAProfileVP8Version0_3:
+ return os << "VAProfileVP8Version0_3";
+ case VAProfileHEVCMain:
+ return os << "VAProfileHEVCMain";
+ case VAProfileHEVCMain10:
+ return os << "VAProfileHEVCMain10";
+ case VAProfileVP9Profile0:
+ return os << "VAProfileVP9Profile0";
+ case VAProfileVP9Profile1:
+ return os << "VAProfileVP9Profile1";
+ case VAProfileVP9Profile2:
+ return os << "VAProfileVP9Profile2";
+ case VAProfileVP9Profile3:
+ return os << "VAProfileVP9Profile3";
+ case VAProfileH264Baseline:
+ return os << "VAProfileH264Baseline";
+ case VAProfileH264ConstrainedBaseline:
+ return os << "VAProfileH264ConstrainedBaseline";
+ case VAProfileH264High:
+ return os << "VAProfileH264High";
+ case VAProfileH264Main:
+ return os << "VAProfileH264Main";
+ case VAProfileH264MultiviewHigh:
+ return os << "VAProfileH264MultiviewHigh";
+ case VAProfileH264StereoHigh:
+ return os << "VAProfileH264StereoHigh";
+ default:
+ return os << "Unknown VAProfile: " << static_cast<int>(profile);
+ }
+}
+
+inline std::ostream&
+operator<<(std::ostream& os, const VAEntrypoint& entrypoint)
+{
+ switch(entrypoint) {
+ case VAEntrypointVLD:
+ return os << "VAEntrypointVLD";
+ case VAEntrypointIZZ:
+ return os << "VAEntrypointIZZ";
+ case VAEntrypointIDCT:
+ return os << "VAEntrypointIDCT";
+ case VAEntrypointMoComp:
+ return os << "VAEntrypointMoComp";
+ case VAEntrypointDeblocking:
+ return os << "VAEntrypointDeblocking";
+ case VAEntrypointVideoProc:
+ return os << "VAEntrypointVideoProc";
+ case VAEntrypointEncSlice:
+ return os << "VAEntrypointEncSlice";
+ case VAEntrypointEncSliceLP:
+ return os << "VAEntrypointEncSliceLP";
+ case VAEntrypointEncPicture:
+ return os << "VAEntrypointEncPicture";
+ default:
+ return os << "Unknown VAEntrypoint: " << static_cast<int>(entrypoint);
+ }
+}
+
#endif // I965_STREAMABLE_H
--
2.1.0
U. Artie Eoff
2016-10-05 17:54:27 UTC
Permalink
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 <***@intel.com>
---
test/Makefile.am | 2 ++
test/i965_jpeg_decode_test.cpp | 22 ----------------
test/i965_jpeg_encode_test.cpp | 18 -------------
test/i965_jpegd_config_test.cpp | 50 ++++++++++++++++++++++++++++++++++++
test/i965_jpege_config_test.cpp | 57 +++++++++++++++++++++++++++++++++++++++++
5 files changed, 109 insertions(+), 40 deletions(-)
create mode 100644 test/i965_jpegd_config_test.cpp
create mode 100644 test/i965_jpege_config_test.cpp

diff --git a/test/Makefile.am b/test/Makefile.am
index 07189e56e6cb..08df3395a383 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -62,6 +62,8 @@ test_i965_drv_video_SOURCES = \
i965_jpeg_test_data.cpp \
i965_jpeg_decode_test.cpp \
i965_jpeg_encode_test.cpp \
+ i965_jpegd_config_test.cpp \
+ i965_jpege_config_test.cpp \
i965_surface_test.cpp \
i965_test_environment.cpp \
i965_test_fixture.cpp \
diff --git a/test/i965_jpeg_decode_test.cpp b/test/i965_jpeg_decode_test.cpp
index 6b8462564cfd..265793d21b2e 100644
--- a/test/i965_jpeg_decode_test.cpp
+++ b/test/i965_jpeg_decode_test.cpp
@@ -38,28 +38,6 @@ namespace Decode {

class JPEGDecodeTest : public I965TestFixture { };

-TEST_F(JPEGDecodeTest, Entrypoint)
-{
- VAConfigID config = VA_INVALID_ID;
- ConfigAttribs attributes;
- struct i965_driver_data *i965(*this);
-
- ASSERT_PTR(i965);
-
- if (HAS_JPEG_DECODING(i965)) {
- config = createConfig(profile, entrypoint, attributes);
- } else {
- VAStatus status = i965_CreateConfig(
- *this, profile, entrypoint, attributes.data(), attributes.size(),
- &config);
- EXPECT_STATUS_EQ(VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT, status);
- EXPECT_INVALID_ID(config);
- }
-
- if (config != VA_INVALID_ID)
- destroyConfig(config);
-}
-
class FourCCTest
: public JPEGDecodeTest
, public ::testing::WithParamInterface<
diff --git a/test/i965_jpeg_encode_test.cpp b/test/i965_jpeg_encode_test.cpp
index 86473a984ec0..29c14dc9a8b5 100644
--- a/test/i965_jpeg_encode_test.cpp
+++ b/test/i965_jpeg_encode_test.cpp
@@ -64,24 +64,6 @@ protected:
VAContextID context;
};

-TEST_F(JPEGEncodeTest, Entrypoint)
-{
- ConfigAttribs attributes;
- struct i965_driver_data *i965(*this);
-
- ASSERT_PTR(i965);
-
- if (HAS_JPEG_ENCODING(i965)) {
- config = createConfig(profile, entrypoint, attributes);
- } else {
- VAStatus status = i965_CreateConfig(
- *this, profile, entrypoint, attributes.data(), attributes.size(),
- &config);
- EXPECT_STATUS_EQ(VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT, status);
- EXPECT_INVALID_ID(config);
- }
-}
-
class JPEGEncodeInputTest
: public JPEGEncodeTest
, public ::testing::WithParamInterface<
diff --git a/test/i965_jpegd_config_test.cpp b/test/i965_jpegd_config_test.cpp
new file mode 100644
index 000000000000..4e2216ce8840
--- /dev/null
+++ b/test/i965_jpegd_config_test.cpp
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2016 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "i965_config_test.h"
+
+namespace JPEG {
+namespace Decode {
+
+VAStatus HasDecodeSupport()
+{
+ I965TestEnvironment *env(I965TestEnvironment::instance());
+ EXPECT_PTR(env);
+
+ struct i965_driver_data *i965(*env);
+ EXPECT_PTR(i965);
+
+ return HAS_JPEG_DECODING(i965) ? VA_STATUS_SUCCESS :
+ VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+}
+
+static const std::vector<ConfigTestInput> inputs = {
+ {VAProfileJPEGBaseline, VAEntrypointVLD, &HasDecodeSupport},
+};
+
+INSTANTIATE_TEST_CASE_P(
+ JPEGDecode, I965ConfigTest, ::testing::ValuesIn(inputs));
+
+} // namespace Decode
+} // namespace JPEG
diff --git a/test/i965_jpege_config_test.cpp b/test/i965_jpege_config_test.cpp
new file mode 100644
index 000000000000..924eccb44cf3
--- /dev/null
+++ b/test/i965_jpege_config_test.cpp
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2016 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "i965_config_test.h"
+
+namespace JPEG {
+namespace Encode {
+
+VAStatus EntrypointNotSupported()
+{
+ return VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+}
+
+VAStatus HasEncodeSupport()
+{
+ I965TestEnvironment *env(I965TestEnvironment::instance());
+ EXPECT_PTR(env);
+
+ struct i965_driver_data *i965(*env);
+ EXPECT_PTR(i965);
+
+ return HAS_JPEG_ENCODING(i965) ? VA_STATUS_SUCCESS :
+ EntrypointNotSupported();
+}
+
+static const std::vector<ConfigTestInput> inputs = {
+ {VAProfileJPEGBaseline, VAEntrypointEncPicture, &HasEncodeSupport},
+ {VAProfileJPEGBaseline, VAEntrypointEncSlice, &EntrypointNotSupported},
+ {VAProfileJPEGBaseline, VAEntrypointEncSliceLP, &EntrypointNotSupported},
+};
+
+INSTANTIATE_TEST_CASE_P(
+ JPEGEncode, I965ConfigTest, ::testing::ValuesIn(inputs));
+
+} // namespace Encode
+} // namespace JPEG
--
2.1.0
U. Artie Eoff
2016-10-05 17:54:24 UTC
Permalink
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 <***@intel.com>
---
test/Makefile.am | 4 +-
test/i965_test_environment.cpp | 86 +++++++++++++++++++++++++++++++++++
test/i965_test_environment.h | 100 +++++++++++++++++++++++++++++++++++++++++
test/i965_test_fixture.cpp | 94 --------------------------------------
test/i965_test_fixture.h | 72 ++++-------------------------
test/test_main.cpp | 4 ++
6 files changed, 202 insertions(+), 158 deletions(-)
create mode 100644 test/i965_test_environment.cpp
create mode 100644 test/i965_test_environment.h

diff --git a/test/Makefile.am b/test/Makefile.am
index 7d1ba43435ec..6448ad5b78b8 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -46,6 +46,7 @@ noinst_PROGRAMS = test_i965_drv_video
noinst_HEADERS = \
i965_internal_decl.h \
i965_jpeg_test_data.h \
+ i965_test_environment.h \
i965_test_fixture.h \
test.h \
test_utils.h \
@@ -55,10 +56,11 @@ test_i965_drv_video_SOURCES = \
i965_chipset_test.cpp \
i965_initialize_test.cpp \
i965_jpeg_test_data.cpp \
- i965_test_fixture.cpp \
i965_jpeg_decode_test.cpp \
i965_jpeg_encode_test.cpp \
i965_surface_test.cpp \
+ i965_test_environment.cpp \
+ i965_test_fixture.cpp \
object_heap_test.cpp \
test_main.cpp \
$(NULL)
diff --git a/test/i965_test_environment.cpp b/test/i965_test_environment.cpp
new file mode 100644
index 000000000000..0049c1435957
--- /dev/null
+++ b/test/i965_test_environment.cpp
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2016 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "i965_test_environment.h"
+
+#include <fcntl.h> // for O_RDWR
+#include <unistd.h> // for close()
+#include <va/va_drm.h>
+
+I965TestEnvironment* I965TestEnvironment::instance()
+{
+ static I965TestEnvironment* e = new I965TestEnvironment;
+ return e;
+}
+
+I965TestEnvironment::I965TestEnvironment()
+ : ::testing::Environment()
+ , m_handle(-1)
+ , m_vaDisplay(NULL)
+{
+ return;
+}
+
+void I965TestEnvironment::SetUp()
+{
+ ASSERT_EQ(-1, m_handle);
+ ASSERT_PTR_NULL(m_vaDisplay);
+
+ m_handle = open("/dev/dri/renderD128", O_RDWR);
+ if (m_handle < 0)
+ m_handle = open("/dev/dri/card0", O_RDWR);
+
+ m_vaDisplay = vaGetDisplayDRM(m_handle);
+
+ ASSERT_PTR(m_vaDisplay);
+
+ setenv("LIBVA_DRIVERS_PATH", TEST_VA_DRIVERS_PATH, 1);
+ setenv("LIBVA_DRIVER_NAME", "i965", 1);
+
+ int major, minor;
+ ASSERT_STATUS(vaInitialize(*this, &major, &minor));
+
+ EXPECT_EQ(VA_MAJOR_VERSION, major);
+ EXPECT_EQ(VA_MINOR_VERSION, minor);
+
+ VADriverContextP context(*this);
+ ASSERT_PTR(context);
+
+ const std::string vendor(context->str_vendor);
+
+ ::testing::Test::RecordProperty("driver_vendor", vendor);
+ ::testing::Test::RecordProperty("vaapi_version", VA_VERSION_S);
+}
+
+void I965TestEnvironment::TearDown()
+{
+ if (m_vaDisplay)
+ EXPECT_STATUS(vaTerminate(m_vaDisplay));
+
+ if (m_handle >= 0)
+ close(m_handle);
+
+ m_handle = -1;
+ m_vaDisplay = NULL;
+}
diff --git a/test/i965_test_environment.h b/test/i965_test_environment.h
new file mode 100644
index 000000000000..b80c360e9de9
--- /dev/null
+++ b/test/i965_test_environment.h
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2016 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef I965_TEST_ENVIRONMENT_H
+#define I965_TEST_ENVIRONMENT_H
+
+#include "test.h"
+#include "i965_internal_decl.h"
+
+/**
+ * This test environment handles initialization and termination of the i965
+ * driver and display. It defines various operators to make it implicitly
+ * convertible to a VADriverContextP, VADisplay, VADisplayContextP, and
+ * i965_driver_data*. Other operators may be defined, too. These operators
+ * allow an instance of the test environment to be passed to various driver
+ * functions that take one of those parameter types.
+ *
+ * See the "Global Set-Up and Tear-Down" section in gtest/docs/AdvancedGuide.md
+ * for more details on how a ::testing::Environment operates.
+ */
+class I965TestEnvironment
+ : public ::testing::Environment
+{
+protected:
+ /**
+ * This is invoked by gtest before any tests are executed. Gtest will not
+ * run any tests if this method generates a fatal test assertion failure.
+ */
+ virtual void SetUp();
+
+ /**
+ * This is invoked by gtest after all the tests are executed. If SetUp()
+ * generates a fatal test assertion, this is also invoked by gtest
+ * afterwards.
+ */
+ virtual void TearDown();
+
+private:
+ I965TestEnvironment();
+
+ int m_handle; /* current native display handle */
+ VADisplay m_vaDisplay; /* current VADisplay handle */
+
+public:
+ static I965TestEnvironment* instance();
+
+ /**
+ * VADisplay implicit and explicit conversion operator.
+ */
+ inline operator VADisplay() { return m_vaDisplay; }
+
+ /**
+ * VADisplayContextP implict and explicit conversion operator.
+ */
+ inline operator VADisplayContextP()
+ {
+ return (VADisplayContextP)((VADisplay)*this);
+ }
+
+ /**
+ * VADriverContextP implict and explicit conversion operator.
+ */
+ inline operator VADriverContextP()
+ {
+ VADisplayContextP dctx(*this);
+ return dctx ? dctx->pDriverContext : NULL;
+ }
+
+ /**
+ * i965_driver_data * implict and explicit conversion operator.
+ */
+ inline operator struct i965_driver_data *()
+ {
+ VADriverContextP ctx(*this);
+ return ctx ? i965_driver_data(ctx) : NULL;
+ }
+};
+
+#endif
diff --git a/test/i965_test_fixture.cpp b/test/i965_test_fixture.cpp
index 073a24e1d142..8fd914209467 100644
--- a/test/i965_test_fixture.cpp
+++ b/test/i965_test_fixture.cpp
@@ -24,27 +24,6 @@

#include "i965_test_fixture.h"

-#include <fcntl.h> // for O_RDWR
-#include <unistd.h> // for close()
-#include <va/va_drm.h>
-
-I965TestFixture::I965TestFixture()
- : ::testing::Test::Test()
- , m_handle(-1)
- , m_vaDisplay(NULL)
-{
- setenv("LIBVA_DRIVERS_PATH", TEST_VA_DRIVERS_PATH, 1);
- setenv("LIBVA_DRIVER_NAME", "i965", 1);
-}
-
-I965TestFixture::~I965TestFixture()
-{
- if (m_handle >= 0)
- close(m_handle);
- m_handle = -1;
- m_vaDisplay = NULL;
-}
-
const std::string I965TestFixture::getFullTestName() const
{
const ::testing::TestInfo * const info =
@@ -54,49 +33,6 @@ const std::string I965TestFixture::getFullTestName() const
+ std::string(info->name());
}

-void I965TestFixture::initialize()
-{
- ASSERT_FALSE(NULL == (VADisplay)*this);
-
- int major, minor;
- ASSERT_STATUS(vaInitialize(*this, &major, &minor));
-
- EXPECT_EQ(VA_MAJOR_VERSION, major);
- EXPECT_EQ(VA_MINOR_VERSION, minor);
-
- VADriverContextP context(*this);
- ASSERT_PTR(context);
-
- const std::string vendor(context->str_vendor);
-
- ::testing::Test::RecordProperty("driver_vendor", vendor);
- ::testing::Test::RecordProperty("vaapi_version", VA_VERSION_S);
-}
-
-void I965TestFixture::terminate()
-{
- if (m_vaDisplay)
- EXPECT_STATUS(vaTerminate(m_vaDisplay));
-}
-
-I965TestFixture::operator VADisplay()
-{
- if (m_vaDisplay)
- return m_vaDisplay;
-
- m_handle = open("/dev/dri/renderD128", O_RDWR);
- if (m_handle < 0)
- m_handle = open("/dev/dri/card0", O_RDWR);
-
- m_vaDisplay = vaGetDisplayDRM(m_handle);
- if (!m_vaDisplay && m_handle >= 0) {
- close(m_handle);
- m_handle = -1;
- }
-
- return m_vaDisplay;
-}
-
Surfaces I965TestFixture::createSurfaces(int w, int h, int format, size_t count,
const SurfaceAttribs& attributes)
{
@@ -217,33 +153,3 @@ void I965TestFixture::syncSurface(VASurfaceID surface)
EXPECT_STATUS(
i965_SyncSurface(*this, surface));
}
-
-class I965TestFixtureTest
- : public I965TestFixture
-{
-protected:
- virtual void SetUp() { } // override I965TestFixture::SetUp
- virtual void TearDown() { } // override I965TestFixture::TearDown
-};
-
-TEST_F(I965TestFixtureTest, Logic)
-{
- VADisplayContextP dispCtx(*this);
- VADriverContextP drvCtx(*this);
- struct i965_driver_data* i965(*this);
- VADisplay display(*this);
-
- EXPECT_PTR(display);
- EXPECT_PTR(dispCtx);
- EXPECT_PTR(drvCtx);
- EXPECT_TRUE(NULL == i965);
- EXPECT_TRUE(NULL == drvCtx->handle);
-
- ASSERT_NO_FATAL_FAILURE(initialize());
-
- i965 = *this;
- EXPECT_PTR(i965);
- EXPECT_PTR(drvCtx->handle);
-
- terminate();
-}
diff --git a/test/i965_test_fixture.h b/test/i965_test_fixture.h
index dc6f6c40bd83..9122d848e129 100644
--- a/test/i965_test_fixture.h
+++ b/test/i965_test_fixture.h
@@ -25,8 +25,7 @@
#ifndef I965_TEST_FIXTURE_H
#define I965_TEST_FIXTURE_H

-#include "test.h"
-#include "i965_internal_decl.h"
+#include "i965_test_environment.h"

#include <string>
#include <vector>
@@ -37,8 +36,7 @@ typedef std::vector<VAConfigAttrib> ConfigAttribs;
typedef std::vector<VABufferID> Buffers;

/**
- * This test fixture handles initialization and termination of the i965 driver
- * and display. It defines various operators to make it implicitly convertible
+ * This test fixture defines various operators to make it implicitly convertible
* to a VADriverContextP, VADisplay, VADisplayContextP, and i965_driver_data*.
* Other operators may be defined, too. These operators allow an instance of
* the test fixture to be passed to various driver functions that take one of
@@ -46,12 +44,7 @@ typedef std::vector<VABufferID> Buffers;
* test fixture to simplify writing test cases.
*
* Test cases that wish to use this fixture should define their own test
- * fixture class that derives from this one. The derived test fixture may
- * override the SetUp() and TearDown() methods. These two methods are invoked
- * by gtest before and after a TEST_F test body is executed, respectively. The
- * derived test fixture should be sure to call the I965TestFixture::SetUp() and
- * I965TestFixture::TearDown() methods when they are overridden to ensure
- * proper initialization and termination of the driver and display.
+ * fixture class that derives from this one.
*
* See the "Test Fixtures" section in gtest/docs/Primer.md for more details
* on how test fixtures are used.
@@ -60,46 +53,10 @@ class I965TestFixture
: public ::testing::Test
{
public:
- I965TestFixture();
- virtual ~I965TestFixture();
-
-protected:
- /**
- * This is invoked by gtest before the test body is executed. Gtest will
- * not run the test body if this method generates a fatal test assertion
- * failure.
- */
- virtual void SetUp()
- {
- ASSERT_NO_FATAL_FAILURE(initialize());
- }
-
- /**
- * This is invoked by gtest after the test body is executed... even if the
- * test body generates a fatal or non-fatal test assertion failure. If
- * SetUp() generates a fatal test assertion, this is also invoked by gtest
- * afterwards.
- */
- virtual void TearDown()
- {
- terminate();
- }
+ virtual ~I965TestFixture() { }

const std::string getFullTestName() const;

-public:
- /**
- * Initializes the i965 driver and display. May generate a fatal or
- * non-fatal test assertion failure.
- */
- void initialize();
-
- /**
- * Terminates the i965 driver and display. May generate a non-fatal
- * test assertion failure.
- */
- void terminate();
-
/**
* Convenience wrapper for i965_CreateSurfaces or i965_CreateSurfaces2.
* If SurfaceAttribs are specified then i965_CreateSurfaces2 is used,
@@ -215,37 +172,26 @@ public:
/**
* VADisplay implicit and explicit conversion operator.
*/
- operator VADisplay();
+ inline operator VADisplay()
+ { return *I965TestEnvironment::instance(); }

/**
* VADisplayContextP implict and explicit conversion operator.
*/
inline operator VADisplayContextP()
- {
- return (VADisplayContextP)((VADisplay)*this);
- }
+ { return *I965TestEnvironment::instance(); }

/**
* VADriverContextP implict and explicit conversion operator.
*/
inline operator VADriverContextP()
- {
- VADisplayContextP dctx(*this);
- return dctx ? dctx->pDriverContext : NULL;
- }
+ { return *I965TestEnvironment::instance(); }

/**
* i965_driver_data * implict and explicit conversion operator.
*/
inline operator struct i965_driver_data *()
- {
- VADriverContextP ctx(*this);
- return ctx ? i965_driver_data(ctx) : NULL;
- }
-
-private:
- int m_handle; /* current native display handle */
- VADisplay m_vaDisplay; /* current VADisplay handle */
+ { return *I965TestEnvironment::instance(); }
};

#endif
diff --git a/test/test_main.cpp b/test/test_main.cpp
index 55a5b091f031..0f8785690475 100644
--- a/test/test_main.cpp
+++ b/test/test_main.cpp
@@ -23,10 +23,14 @@
*/

#include "test.h"
+#include "i965_test_environment.h"

int main(int argc, char **argv)
{
::testing::InitGoogleTest(&argc, argv);

+ /** NOTE: gtest takes ownership of the I965TestEnvironment instance **/
+ ::testing::AddGlobalTestEnvironment(I965TestEnvironment::instance());
+
return RUN_ALL_TESTS();
}
--
2.1.0
Sean V Kelley
2016-10-06 21:01:23 UTC
Permalink
This patch series moves the responsibility of the VADisplay creation
and vaInitialize/vaTerminate sequence to a I965TestEnvironment
singleton class.  This environment is added to the GTest global test
environment so that those aforementioned responsibilities are
handled during the environment SetUp and TearDown (which are executed
by GTest before and after executing the *test suite*).  In essence,
only one VADisplay is created and shared amongst all the test cases
for each run of the test suite.  This also allows tests to obtain
the VADisplay instance outside of the I965TestFixture.  As of which
allows for a simpler, common I965ConfigTest fixture to be defined
(part of this series).
Finally, included in this series are AVC enc/dec CreateConfig test
cases that use the common I965ConfigTest fixture.  Additionally,
the appropriate JPEG enc/dec cases (Entrypoint) now use the common
test fixture.
I'm glad you are doing this now rather than later - after adding more
codecs.

lgtm, applied.

Thanks,

Sean
  test: move vaInitialize/vaTerminate to a global test environment
  test: add ostream operators for VAProfile and VAEntrypoint
  test: add avce/avcd create config tests
  test: use common I965ConfigTest fixture for jpeg enc/dec
 test/Makefile.am                |  10 +++-
 test/i965_avcd_config_test.cpp  |  72 ++++++++++++++++++++++++++
 test/i965_avce_config_test.cpp  | 109
++++++++++++++++++++++++++++++++++++++++
 test/i965_config_test.cpp       |  63 +++++++++++++++++++++++
 test/i965_config_test.h         |  56 +++++++++++++++++++++
 test/i965_jpeg_decode_test.cpp  |  22 --------
 test/i965_jpeg_encode_test.cpp  |  18 -------
 test/i965_jpegd_config_test.cpp |  50 ++++++++++++++++++
 test/i965_jpege_config_test.cpp |  57 +++++++++++++++++++++
 test/i965_streamable.h          |  84
+++++++++++++++++++++++++++++++
 test/i965_test_environment.cpp  |  86
+++++++++++++++++++++++++++++++
 test/i965_test_environment.h    | 100
++++++++++++++++++++++++++++++++++++
 test/i965_test_fixture.cpp      |  94 ------------------------------
----
 test/i965_test_fixture.h        |  72 ++++----------------------
 test/test_main.cpp              |   4 ++
 15 files changed, 699 insertions(+), 198 deletions(-)
 create mode 100644 test/i965_avcd_config_test.cpp
 create mode 100644 test/i965_avce_config_test.cpp
 create mode 100644 test/i965_config_test.cpp
 create mode 100644 test/i965_config_test.h
 create mode 100644 test/i965_jpegd_config_test.cpp
 create mode 100644 test/i965_jpege_config_test.cpp
 create mode 100644 test/i965_test_environment.cpp
 create mode 100644 test/i965_test_environment.h
Loading...