diff --git a/appexecfwk/bundle_standard/bundlemanager/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/BUILD.gn index 1480b9540b0067c5183a3b672c4e44d04120a8fa..c4bc989004a334c1d09e18a425b85f3535d0bc20 100644 --- a/appexecfwk/bundle_standard/bundlemanager/BUILD.gn +++ b/appexecfwk/bundle_standard/bundlemanager/BUILD.gn @@ -27,7 +27,6 @@ group("bundlemanager") { "actsbundlemanagertest:ActsBundleManagerTest", "actsbundlemanageruninstall:ActsBundleManagerUninstallTest", "actsbundlemgrmultipleinstalltest:ActsBundleMgrMultipleInstallTest", - "actsbundlenativetest:ActsBundleNativeTest", "sceneProject/bmsaccesstokenone:bmsAccessTokenTest1", "sceneProject/bmsaccesstokenthree:bmsAccessTokenTest3", "sceneProject/bmsaccesstokentwo:bmsAccessTokenTest2", diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlenativetest/ActsBundleNativeTest.cpp b/appexecfwk/bundle_standard/bundlemanager/actsbundlenativetest/ActsBundleNativeTest.cpp deleted file mode 100644 index 92f26161cca8c39ca6039bdb1b4ecaaa3411a97a..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlenativetest/ActsBundleNativeTest.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Copyright (c) 2020-2021 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 -#include -#include - -#include "native_interface_bundle.h" - -using namespace testing::ext; -class ActsBundleNativeTest : public testing::Test { -protected: - ActsBundleNativeTest(); - ~ActsBundleNativeTest(); - static void SetUpTestCase(); - static void TearDownTestCase(); -}; - -ActsBundleNativeTest::ActsBundleNativeTest() -{} - -ActsBundleNativeTest::~ActsBundleNativeTest() -{} - -void ActsBundleNativeTest::SetUpTestCase() -{} - -void ActsBundleNativeTest::TearDownTestCase() -{} - -/** - * @tc.number : ActsBundleNativeTest_0100 - * @tc.name : Test GetAppIdByBundleName test, right bundleName - * @tc.desc : [C- SOFTWARE -0200] - */ -HWTEST_F(ActsBundleNativeTest, ActsBundleNativeTest_0100, Function | MediumTest | Level2) -{ - char* appId = OH_NativeBundle_GetAppIdByBundleName("com.ohos.photos"); - printf("AppID: %s\n", appId); - ASSERT_TRUE(appId != nullptr); - free(appId); -} - -/** - * @tc.number : ActsBundleNativeTest_0200 - * @tc.name : Test GetAppIdByBundleName test, wrong bundleName - * @tc.desc : [C- SOFTWARE -0200] - */ -HWTEST_F(ActsBundleNativeTest, ActsBundleNativeTest_0200, Function | MediumTest | Level2) -{ - char* appId = OH_NativeBundle_GetAppIdByBundleName("wrong name"); - ASSERT_TRUE(appId == nullptr); -} - -/** - * @tc.number : ActsBundleNativeTest_0300 - * @tc.name : Test GetAppIdByBundleName test, bundleName is empty - * @tc.desc : [C- SOFTWARE -0200] - */ -HWTEST_F(ActsBundleNativeTest, ActsBundleNativeTest_0300, Function | MediumTest | Level2) -{ - char* appId = OH_NativeBundle_GetAppIdByBundleName(""); - ASSERT_TRUE(appId == nullptr); -} - -/** - * @tc.number : ActsBundleNativeTest_0400 - * @tc.name : Test GetAppIdByBundleName test, bundleName is nullptr - * @tc.desc : [C- SOFTWARE -0200] - */ -HWTEST_F(ActsBundleNativeTest, ActsBundleNativeTest_0400, Function | MediumTest | Level2) -{ - char* appId = OH_NativeBundle_GetAppIdByBundleName(nullptr); - ASSERT_TRUE(appId == nullptr); -} diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlenativetest/BUILD.gn b/appexecfwk/bundle_standard/bundlemanager/actsbundlenativetest/BUILD.gn deleted file mode 100644 index 79769e3d47e8df0d307b994cb5929fdd50858428..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlenativetest/BUILD.gn +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2020-2021 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. - -import("//test/xts/tools/build/suite.gni") -module_output_path = "hits/ActsBundleNativeTest" - -ohos_moduletest_suite("ActsBundleNativeTest") { - module_out_path = module_output_path - include_dirs = - [ "//foundation/appexecfwk/standard/kits/appkit/native/bundle/include" ] - sources = [ "ActsBundleNativeTest.cpp" ] - deps = [ - "//foundation/appexecfwk/standard/kits/appkit/native/bundle:bundle_ndk", - ] -} diff --git a/appexecfwk/bundle_standard/bundlemanager/actsbundlenativetest/Test.json b/appexecfwk/bundle_standard/bundlemanager/actsbundlenativetest/Test.json deleted file mode 100644 index 6d2c5fe52623b6f8d9effe551839a7cc9403fec3..0000000000000000000000000000000000000000 --- a/appexecfwk/bundle_standard/bundlemanager/actsbundlenativetest/Test.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "description": "Config for bundlenative test cases", - "driver": { - "module-name": "ActsBundleNativeTest", - "native-test-timeout": "120000", - "native-test-device-path": "/data/local/tmp", - "runtime-hint": "1s", - "type": "CppTest" - }, - "kits": [ - { - "post-push" : [ - "chmod -R 777 /data/local/tmp/*" - ], - "push": [ - "ActsBundleNativeTest->/data/local/tmp/ActsBundleNativeTest" - ], - "type": "PushKit" - }, - { - "type": "ShellKit", - "run-command": [ - "remount", - "mkdir /data/test" - ] - } - ] -} \ No newline at end of file