diff --git a/tests/moduletests/BUILD.gn b/tests/moduletests/BUILD.gn index 5de2e6da91503300bc3d1a1fa6741d008043437e..2a137ec4c922649334aafe0b9a80dce0124e6c09 100644 --- a/tests/moduletests/BUILD.gn +++ b/tests/moduletests/BUILD.gn @@ -17,8 +17,5 @@ import("//foundation/filemanagement/app_file_service/backup.gni") group("moduletests") { testonly = true - deps = [ - "backup_kit_inner:session_test", - "backup_tool:tools_test", - ] + deps = [ "backup_kit_inner:session_test" ] } diff --git a/tests/moduletests/backup_tool/tool_help_test.cpp b/tests/moduletests/backup_tool/tool_help_test.cpp deleted file mode 100644 index 26ad00ab11702163d59a7e05842e9a0e494a6a7a..0000000000000000000000000000000000000000 --- a/tests/moduletests/backup_tool/tool_help_test.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2022-2023 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 "b_process/b_process.h" -#include "test_manager.h" -#include "gtest/gtest.h" - -namespace OHOS::FileManagement::Backup { -class ToolsTest : public testing::Test { -public: - static void SetUpTestCase(void) {}; - static void TearDownTestCase() {}; - void SetUp() {}; - void TearDown() {}; -}; - -/** - * @tc.number: SUB_backup_tool_help_0100 - * @tc.name: tool_help_0100 - * @tc.desc: 测试help命令常规用法 - * @tc.size: MEDIUM - * @tc.type: FUNC - * @tc.level Level 0 - * @tc.require: I6F3GV - */ -HWTEST_F(ToolsTest, tool_help_0100, testing::ext::TestSize.Level0) -{ - GTEST_LOG_(INFO) << "ToolsTest-begin tool_help_0100"; - try { - auto [bFatalError, ret] = BProcess::ExecuteCmd({ - "/system/bin/backup_tool", - "help", - }); - EXPECT_EQ(ret, 0); - } catch (...) { - EXPECT_TRUE(false); - GTEST_LOG_(INFO) << "ToolsTest-an exception occurred."; - } - GTEST_LOG_(INFO) << "ToolsTest-end tool_help_0100"; -} - -/** - * @tc.number: SUB_backup_tool_help_0200 - * @tc.name: tool_help_0200 - * @tc.desc: 测试help命令错误使用 - * @tc.size: MEDIUM - * @tc.type: FUNC - * @tc.level Level 0 - * @tc.require: I6F3GV - */ -HWTEST_F(ToolsTest, tool_help_0200, testing::ext::TestSize.Level0) -{ - GTEST_LOG_(INFO) << "ToolsTest-begin tool_help_0200"; - try { - auto [bFatalError, ret] = BProcess::ExecuteCmd({ - "/system/bin/backup_tool", - "xxxx", - }); - EXPECT_NE(ret, 0); - } catch (...) { - EXPECT_TRUE(false); - GTEST_LOG_(INFO) << "ToolsTest-an exception occurred."; - } - GTEST_LOG_(INFO) << "ToolsTest-end tool_help_0200"; -} -} // namespace OHOS::FileManagement::Backup \ No newline at end of file