From 9e0935e1a71d64e27a382429f06b2d0059dcffd8 Mon Sep 17 00:00:00 2001 From: jaychao Date: Tue, 19 Dec 2023 18:02:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E4=BB=BD=E6=81=A2=E5=A4=8DTDD?= =?UTF-8?q?=E6=8F=90=E4=BA=A4-=E6=A0=BC=E5=BC=8F=E5=8A=A0=E5=BC=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: jaychao --- tests/moduletests/backup_kit_inner/BUILD.gn | 6 ++++++ .../moduletests/backup_kit_inner/b_session_restore_test.cpp | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/moduletests/backup_kit_inner/BUILD.gn b/tests/moduletests/backup_kit_inner/BUILD.gn index 961434ce1..71baea891 100644 --- a/tests/moduletests/backup_kit_inner/BUILD.gn +++ b/tests/moduletests/backup_kit_inner/BUILD.gn @@ -41,6 +41,12 @@ ohos_unittest("b_session_test") { "${path_backup}/utils:backup_utils", ] + cflags = [ "--coverage" ] + + ldflags = [ "--coverage" ] + + cflags_cc = [ "--coverage" ] + external_deps = [ "c_utils:utils", "hilog:libhilog", diff --git a/tests/moduletests/backup_kit_inner/b_session_restore_test.cpp b/tests/moduletests/backup_kit_inner/b_session_restore_test.cpp index 5a2ff9101..77bded075 100644 --- a/tests/moduletests/backup_kit_inner/b_session_restore_test.cpp +++ b/tests/moduletests/backup_kit_inner/b_session_restore_test.cpp @@ -255,9 +255,7 @@ HWTEST_F(BSessionRestoreTest, SUB_backup_b_session_restore_0600, testing::ext::T const string fileName = "1.tar"; TestManager tm("SUB_backup_b_session_restore_0600"); string filePath = tm.GetRootDirCurTest().append(fileName); - UniqueFd remoteCap( - open(filePath.data(), O_RDONLY | O_CREAT, - S_IRUSR | S_IWUSR)); + UniqueFd remoteCap(open(filePath.data(), O_RDONLY | O_CREAT, S_IRUSR | S_IWUSR)); string bundleName = ""; vector bundlesToRestore; bundlesToRestore.emplace_back(bundleName); -- Gitee