diff --git a/test/unittest/hcodec_test/unittest/BUILD.gn b/test/unittest/hcodec_test/unittest/BUILD.gn index 2121b420116491e9cb448338b48daa102661b5fb..8a2eb127a99892aa4e24582810f0eb66d251a9f2 100644 --- a/test/unittest/hcodec_test/unittest/BUILD.gn +++ b/test/unittest/hcodec_test/unittest/BUILD.gn @@ -26,9 +26,10 @@ config("hcodec_unittest_cfg") { } ohos_unittest("hdecoder_unit_test") { + defines = [] if (defined(av_codec_support_video_processing_engine) && av_codec_support_video_processing_engine) { - defines = [ "USE_VIDEO_PROCESSING_ENGINE" ] + defines += [ "USE_VIDEO_PROCESSING_ENGINE" ] } sanitize = av_codec_test_sanitize testonly = true @@ -51,6 +52,9 @@ ohos_unittest("hdecoder_unit_test") { "media_foundation:native_media_core", "openmax:libopenmax_static", ] + if (target_cpu == "arm64") { + defines += [ "HMOS_TEST" ] + } } ohos_unittest("hencoder_unit_test") { diff --git a/test/unittest/hcodec_test/unittest/hdecoder_unit_test.cpp b/test/unittest/hcodec_test/unittest/hdecoder_unit_test.cpp index c467138de927e8f9e4018397e73ca69f5f793f43..3648e151ecfb07e811bb04e6d2602e793f4f67d9 100644 --- a/test/unittest/hcodec_test/unittest/hdecoder_unit_test.cpp +++ b/test/unittest/hcodec_test/unittest/hdecoder_unit_test.cpp @@ -1276,7 +1276,7 @@ HWTEST_F(HDecoderUserCallingUnitTest, set_freeze_when_codec_is_running_valid_002 ret = testObj->Release(); EXPECT_EQ(AVCS_ERR_OK, ret); } - +#ifdef HMOS_TEST HWTEST_F(HDecoderUserCallingUnitTest, set_suspend_when_codec_is_configured_invalid_001, TestSize.Level1) { std::shared_ptr testObj = HCodec::Create(GetCodecName(false, "video/hevc")); @@ -1490,5 +1490,5 @@ HWTEST_F(HDecoderUserCallingUnitTest, set_resume_when_codec_is_frozen_valid_001, ret = testObj->Release(); EXPECT_EQ(AVCS_ERR_OK, ret); } - +#endif } \ No newline at end of file