diff options
author | Karlson2k (Evgeny Grin) <k2k@narod.ru> | 2021-01-08 16:04:50 +0300 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-01-11 20:13:24 +0000 |
commit | fb33477161d568cc01a892ef5e5a1925903cf50e (patch) | |
tree | 12811e814fb856c25570ead5d0a6c1f9169748cb /x11-libs | |
parent | x11-libs/libva-intel-media-driver: "custom-cflags" USE flag (diff) | |
download | gentoo-fb33477161d568cc01a892ef5e5a1925903cf50e.tar.gz gentoo-fb33477161d568cc01a892ef5e5a1925903cf50e.tar.bz2 gentoo-fb33477161d568cc01a892ef5e5a1925903cf50e.zip |
x11-libs/libva-intel-media-driver: fixed tests
Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru>
Closes: https://github.com/gentoo/gentoo/pull/18955
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'x11-libs')
3 files changed, 56 insertions, 4 deletions
diff --git a/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-20.4.5_tesing_in_src_test.patch b/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-20.4.5_tesing_in_src_test.patch new file mode 100644 index 000000000000..5c40f59fc4df --- /dev/null +++ b/x11-libs/libva-intel-media-driver/files/libva-intel-media-driver-20.4.5_tesing_in_src_test.patch @@ -0,0 +1,46 @@ +Run tests in src_test() instead of src_compile() and src_install() + +---- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -37,6 +37,8 @@ if("${os_name}" STREQUAL "clear-linux-os") + set(CMAKE_INSTALL_SYSCONFDIR "usr/share/defaults/etc") + endif() + ++include(CTest) ++ + include(CMakeDependentOption) + + option (ENABLE_KERNELS "Build driver with shaders (kernels) support" ON) +--- a/media_driver/linux/ult/CMakeLists.txt ++++ b/media_driver/linux/ult/CMakeLists.txt +@@ -52,9 +52,3 @@ endif () + add_subdirectory(libdrm_mock) + add_subdirectory(ult_app) + +-enable_testing() +-add_test(NAME test_devult COMMAND devult ${UMD_PATH}) +-set_tests_properties(test_devult +- PROPERTIES PASS_REGULAR_EXPRESSION "PASS") +-set_tests_properties(test_devult +- PROPERTIES FAIL_REGULAR_EXPRESSION "FAIL") +--- a/media_driver/linux/ult/ult_app/CMakeLists.txt ++++ b/media_driver/linux/ult/ult_app/CMakeLists.txt +@@ -68,13 +68,11 @@ if (DEFINED BYPASS_MEDIA_ULT AND "${BYPASS_MEDIA_ULT}" STREQUAL "yes") + message("-- media -- BYPASS_MEDIA_ULT = ${BYPASS_MEDIA_ULT}") + else () + if (ENABLE_NONFREE_KERNELS) +- add_custom_target(RunULT ALL DEPENDS ${LIB_NAME} devult) + +- add_custom_command( +- TARGET RunULT +- POST_BUILD +- COMMAND LD_PRELOAD=../libdrm_mock/libdrm_mock.so ./devult ../../../${LIB_NAME}.so ++ add_test( ++ NAME RunULT ++ COMMAND "${CMAKE_COMMAND}" -E env "LD_PRELOAD=${CMAKE_CURRENT_BINARY_DIR}/../libdrm_mock/libdrm_mock.so" "${CMAKE_CURRENT_BINARY_DIR}/devult" "${CMAKE_CURRENT_BINARY_DIR}/../../../${LIB_NAME}.so" + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +- COMMENT "Running devult...") ++ ) + endif () + endif () + diff --git a/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.4.5.ebuild b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.4.5.ebuild index 6952394b5ebf..c43c51fa3c72 100644 --- a/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.4.5.ebuild +++ b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-20.4.5.ebuild @@ -22,11 +22,14 @@ HOMEPAGE="https://github.com/intel/media-driver" LICENSE="MIT BSD" SLOT="0" -IUSE="+custom-cflags set-as-default X" +IUSE="+custom-cflags set-as-default test X" + +RESTRICT="!test? ( test )" PATCHES=( "${FILESDIR}"/${PN}-20.2.0_x11_optional.patch "${FILESDIR}"/${PN}-20.4.5_custom_cflags.patch + "${FILESDIR}"/${PN}-20.4.5_tesing_in_src_test.patch ) DEPEND=">=media-libs/gmmlib-20.4.1 @@ -38,7 +41,7 @@ RDEPEND="${DEPEND}" src_configure() { local mycmakeargs=( -DMEDIA_BUILD_FATAL_WARNINGS=OFF - -DMEDIA_RUN_TEST_SUITE=OFF + -DMEDIA_RUN_TEST_SUITE=$(usex test) -DBUILD_TYPE=Release -DPLATFORM=linux -DUSE_X11=$(usex X) diff --git a/x11-libs/libva-intel-media-driver/libva-intel-media-driver-9999.ebuild b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-9999.ebuild index 6952394b5ebf..c43c51fa3c72 100644 --- a/x11-libs/libva-intel-media-driver/libva-intel-media-driver-9999.ebuild +++ b/x11-libs/libva-intel-media-driver/libva-intel-media-driver-9999.ebuild @@ -22,11 +22,14 @@ HOMEPAGE="https://github.com/intel/media-driver" LICENSE="MIT BSD" SLOT="0" -IUSE="+custom-cflags set-as-default X" +IUSE="+custom-cflags set-as-default test X" + +RESTRICT="!test? ( test )" PATCHES=( "${FILESDIR}"/${PN}-20.2.0_x11_optional.patch "${FILESDIR}"/${PN}-20.4.5_custom_cflags.patch + "${FILESDIR}"/${PN}-20.4.5_tesing_in_src_test.patch ) DEPEND=">=media-libs/gmmlib-20.4.1 @@ -38,7 +41,7 @@ RDEPEND="${DEPEND}" src_configure() { local mycmakeargs=( -DMEDIA_BUILD_FATAL_WARNINGS=OFF - -DMEDIA_RUN_TEST_SUITE=OFF + -DMEDIA_RUN_TEST_SUITE=$(usex test) -DBUILD_TYPE=Release -DPLATFORM=linux -DUSE_X11=$(usex X) |