mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-23 07:02:25 +00:00
fix UT vk crash bug
Signed-off-by: xiaojianfeng <xiaojianfeng3@huawei.com> Change-Id: Ib2f4173260f340e932047ff8a2d31de2ff2a44e2
This commit is contained in:
parent
175fd58cf1
commit
766fe115bc
@ -20,6 +20,7 @@ ohos_unittest("2d_graphics_image_test") {
|
||||
module_out_path = module_output_path
|
||||
|
||||
sources = [
|
||||
"$graphic_2d_root/rosen/test/unittest_main/test_main.cpp",
|
||||
"image_test.cpp",
|
||||
"picture_test.cpp",
|
||||
]
|
||||
|
@ -60,6 +60,7 @@ group("unittest") {
|
||||
":RSFilterSubThreadTest",
|
||||
":RSRenderTaskTest",
|
||||
":RSSubThreadManagerTest",
|
||||
":RSSubThreadTest",
|
||||
":RSUIFirstRenderListenerTest",
|
||||
]
|
||||
}
|
||||
@ -181,7 +182,11 @@ ohos_unittest("RSUniRenderProcessorTest") {
|
||||
## Build RSUniRenderThreadTest
|
||||
ohos_unittest("RSUniRenderThreadTest") {
|
||||
module_out_path = module_output_path
|
||||
sources = [ "rs_uni_render_thread_test.cpp" ]
|
||||
sources = [
|
||||
"$graphic_2d_root/rosen/test/unittest_main/test_main.cpp",
|
||||
"rs_uni_render_thread_test.cpp",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":rs_test_common",
|
||||
"../../../../../modules/render_service_base/src/platform:platform",
|
||||
@ -321,7 +326,10 @@ ohos_unittest("RSProcessorFactoryTest") {
|
||||
## Build RSPhysicalScreenProcessorTest
|
||||
ohos_unittest("RSPhysicalScreenProcessorTest") {
|
||||
module_out_path = module_output_path
|
||||
sources = [ "rs_physical_screen_processor_test.cpp" ]
|
||||
sources = [
|
||||
"$graphic_2d_root/rosen/test/unittest_main/test_main.cpp",
|
||||
"rs_physical_screen_processor_test.cpp",
|
||||
]
|
||||
deps = [ ":rs_test_common" ]
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
@ -401,6 +409,7 @@ ohos_unittest("RSSurfaceCaptureTaskTest") {
|
||||
module_out_path = module_output_path
|
||||
sources = [
|
||||
"$graphic_2d_root/rosen/modules/render_service_base/src/pipeline/rs_canvas_render_node.cpp",
|
||||
"$graphic_2d_root/rosen/test/unittest_main/test_main.cpp",
|
||||
"rs_surface_capture_task_parallel_test.cpp",
|
||||
"rs_surface_capture_task_test.cpp",
|
||||
"rs_ui_capture_task_parallel_test.cpp",
|
||||
@ -639,7 +648,10 @@ ohos_unittest("RSMainThreadTest") {
|
||||
## Build RSEglImageManagerTest
|
||||
ohos_unittest("RSEglImageManagerTest") {
|
||||
module_out_path = module_output_path
|
||||
sources = [ "rs_egl_image_manager_test.cpp" ]
|
||||
sources = [
|
||||
"$graphic_2d_root/rosen/test/unittest_main/test_main.cpp",
|
||||
"rs_egl_image_manager_test.cpp",
|
||||
]
|
||||
deps = [ ":rs_test_common" ]
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
@ -743,7 +755,10 @@ ohos_unittest("RSSubThreadManagerTest") {
|
||||
## Build RSSubThreadTest
|
||||
ohos_unittest("RSSubThreadTest") {
|
||||
module_out_path = module_output_path
|
||||
sources = [ "parallel_render/rs_sub_thread_test.cpp" ]
|
||||
sources = [
|
||||
"$graphic_2d_root/rosen/test/unittest_main/test_main.cpp",
|
||||
"parallel_render/rs_sub_thread_test.cpp",
|
||||
]
|
||||
deps = [ ":rs_test_common" ]
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
@ -821,7 +836,10 @@ ohos_unittest("RSUniRenderVirtualProcessorTest") {
|
||||
## Build RSBaseRenderEngineUnitTest
|
||||
ohos_unittest("RSBaseRenderEngineUnitTest") {
|
||||
module_out_path = module_output_path
|
||||
sources = [ "rs_base_render_engine_test.cpp" ]
|
||||
sources = [
|
||||
"$graphic_2d_root/rosen/test/unittest_main/test_main.cpp",
|
||||
"rs_base_render_engine_test.cpp",
|
||||
]
|
||||
deps = [ ":rs_test_common" ]
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
@ -907,7 +925,10 @@ ohos_unittest("RSRealtimeRefreshRateManagerTest") {
|
||||
## Build RSRenderEngineTest
|
||||
ohos_unittest("RSRenderEngineTest") {
|
||||
module_out_path = module_output_path
|
||||
sources = [ "rs_render_engine_test.cpp" ]
|
||||
sources = [
|
||||
"$graphic_2d_root/rosen/test/unittest_main/test_main.cpp",
|
||||
"rs_render_engine_test.cpp",
|
||||
]
|
||||
deps = [ ":rs_test_common" ]
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
@ -959,7 +980,10 @@ ohos_unittest("RSDividedRenderUtilTest") {
|
||||
## Build RSUniRenderEngineTest
|
||||
ohos_unittest("RSUniRenderEngineTest") {
|
||||
module_out_path = module_output_path
|
||||
sources = [ "rs_uni_render_engine_test.cpp" ]
|
||||
sources = [
|
||||
"$graphic_2d_root/rosen/test/unittest_main/test_main.cpp",
|
||||
"rs_uni_render_engine_test.cpp",
|
||||
]
|
||||
deps = [ ":rs_test_common" ]
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
|
@ -22,6 +22,7 @@ ohos_unittest("RSRenderServiceBaseRenderTest") {
|
||||
module_out_path = module_output_path
|
||||
|
||||
sources = [
|
||||
"$graphic_2d_root/rosen/test/unittest_main/test_main.cpp",
|
||||
"rs_aibar_shader_filter_test.cpp",
|
||||
"rs_attraction_effect_filter_test.cpp",
|
||||
"rs_blur_filter_test.cpp",
|
||||
|
@ -21,6 +21,7 @@ ohos_unittest("RSRenderServiceClientUITest") {
|
||||
module_out_path = module_output_path
|
||||
|
||||
sources = [
|
||||
"$graphic_2d_root/rosen/test/unittest_main/test_main.cpp",
|
||||
"rs_canvas_drawing_node_test.cpp",
|
||||
"rs_canvas_node_test.cpp",
|
||||
"rs_display_node_test.cpp",
|
||||
|
28
rosen/test/unittest_main/test_main.cpp
Normal file
28
rosen/test/unittest_main/test_main.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2024 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
GTEST_API_ int main(int argc, char **argv)
|
||||
{
|
||||
printf("Running main() from %s\n", __FILE__);
|
||||
testing::GTEST_FLAG(output) = "xml:./";
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
int res = RUN_ALL_TESTS();
|
||||
std::quick_exit(EXIT_SUCCESS);
|
||||
return res;
|
||||
}
|
Loading…
Reference in New Issue
Block a user