From 5ecd0f81366d1c51c40e1f23062cf84db29ba058 Mon Sep 17 00:00:00 2001 From: lanhaoyu Date: Fri, 25 Jul 2025 14:22:38 +0800 Subject: [PATCH] libA_without_provision_hap Signed-off-by: lanhaoyu --- .../bms_bundle_installer_test.cpp | 42 ++++++------- .../AppScope/{app.json => app.json5} | 20 ++++-- .../libA_without_provision/BUILD.gn | 33 +++------- .../build-profile.json5 | 58 ++++++++++++++++++ .../entry/build-profile.json5 | 43 +++++++++++++ .../entry/hvigorfile.ts | 21 +++++++ .../entry/obfuscation-rules.txt | 36 +++++++++++ .../entry/oh-package.json5 | 24 ++++++++ .../entry/src/main/module.json | 38 ------------ .../entry/src/main/module.json5 | 30 +++++++++ .../hvigor/hvigor-config.json5 | 37 +++++++++++ .../libA_without_provision/hvigorfile.ts | 21 +++++++ .../oh-package-lock.json5 | 34 ++++++++++ .../libA_without_provision/oh-package.json5 | 24 ++++++++ .../signature/com.example.liba_normal.p7b | Bin 0 -> 3417 bytes 15 files changed, 375 insertions(+), 86 deletions(-) rename test/sceneProject/unittest/bundle_share_library/libA_without_provision/AppScope/{app.json => app.json5} (31%) create mode 100644 test/sceneProject/unittest/bundle_share_library/libA_without_provision/build-profile.json5 create mode 100644 test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/build-profile.json5 create mode 100644 test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/hvigorfile.ts create mode 100644 test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/obfuscation-rules.txt create mode 100644 test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/oh-package.json5 delete mode 100644 test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/src/main/module.json create mode 100644 test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/src/main/module.json5 create mode 100644 test/sceneProject/unittest/bundle_share_library/libA_without_provision/hvigor/hvigor-config.json5 create mode 100644 test/sceneProject/unittest/bundle_share_library/libA_without_provision/hvigorfile.ts create mode 100644 test/sceneProject/unittest/bundle_share_library/libA_without_provision/oh-package-lock.json5 create mode 100644 test/sceneProject/unittest/bundle_share_library/libA_without_provision/oh-package.json5 create mode 100644 test/sceneProject/unittest/bundle_share_library/libA_without_provision/signature/com.example.liba_normal.p7b diff --git a/services/bundlemgr/test/unittest/bms_bundle_installer_test/bms_bundle_installer_test.cpp b/services/bundlemgr/test/unittest/bms_bundle_installer_test/bms_bundle_installer_test.cpp index 99342e8862..b2e9835b52 100644 --- a/services/bundlemgr/test/unittest/bms_bundle_installer_test/bms_bundle_installer_test.cpp +++ b/services/bundlemgr/test/unittest/bms_bundle_installer_test/bms_bundle_installer_test.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -661,7 +661,7 @@ void BmsBundleInstallerTest::GetExistedEntries(const std::string &filename, if (endPos == std::string::npos) { endPos = line.length(); } - + std::string bundleName = line.substr(0, endPos); if (!bundleName.empty()) { existingEntries.insert(bundleName); @@ -9260,7 +9260,7 @@ HWTEST_F(BmsBundleInstallerTest, UninstallPlugin_0100, Function | SmallTest | Le */ HWTEST_F(BmsBundleInstallerTest, BaseBundleInstaller_7200, Function | SmallTest | Level0) { - + std::string bundleFile = RESOURCE_ROOT_PATH + SYSTEMFIEID_BUNDLE; ErrCode installResult = InstallThirdPartyBundle(bundleFile); EXPECT_EQ(installResult, ERR_OK); @@ -9586,7 +9586,7 @@ HWTEST_F(BmsBundleInstallerTest, BaseBundleInstaller_7500, Function | SmallTest baseBundleInstaller.sysEventInfo_.callingUid = ServiceConstants::SHELL_UID; auto ret = baseBundleInstaller.CheckShellInstall(hapVerifyRes); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(ret, ERR_OK); + EXPECT_EQ(res, ERR_OK); #else EXPECT_EQ(ret, ERR_APPEXECFWK_INSTALL_RELEASE_BUNDLE_NOT_ALLOWED_FOR_SHELL); #endif @@ -12004,7 +12004,7 @@ HWTEST_F(BmsBundleInstallerTest, GetConfirmUserId_0002, Function | SmallTest | L auto res = installer.GetConfirmUserId(TEST_U100, infos); EXPECT_EQ(res, TEST_U1); } - + /** * @tc.number: CleanArkStartupCache_0010 * @tc.name: test CleanArkStartupCache @@ -12019,7 +12019,7 @@ HWTEST_F(BmsBundleInstallerTest, CleanArkStartupCache_0010, Function | SmallTest ErrCode ret = installer.CleanArkStartupCache(cacheDir, bundleName, 100); EXPECT_EQ(ret, ERR_OK); } - + /** * @tc.number: DeleteArkStartupCache_0010 * @tc.name: test DeleteArkStartupCache @@ -12034,7 +12034,7 @@ HWTEST_F(BmsBundleInstallerTest, DeleteArkStartupCache_0010, Function | SmallTes ErrCode ret = installer.DeleteArkStartupCache(cacheDir, bundleName, 100); EXPECT_EQ(ret, ERR_OK); } - + /** * @tc.number: CreateArkStartupCache_0010 * @tc.name: test CreateArkStartupCache @@ -12054,7 +12054,7 @@ HWTEST_F(BmsBundleInstallerTest, CreateArkStartupCache_0010, Function | SmallTes ErrCode ret = installer1.CreateArkStartupCache(ceateArk); EXPECT_EQ(ret, ERR_APPEXECFWK_ARK_STARTUP_CACHE_ONLY_ALLOW_CREATE_APP_OR_ATOMIC); } - + /** * @tc.number: CreateArkStartupCache_0020 * @tc.name: test CreateArkStartupCache @@ -12069,17 +12069,17 @@ HWTEST_F(BmsBundleInstallerTest, CreateArkStartupCache_0020, Function | SmallTes ceateArk.mode = ServiceConstants::SYSTEM_OPTIMIZE_MODE; ceateArk.uid = 0; ceateArk.gid = 0; - + // test bundlename is not in white list, bundleType is APP or ATOMIC BaseBundleInstaller installer2; ErrCode ret = installer2.CreateArkStartupCache(ceateArk); EXPECT_EQ(ret, ERR_APPEXECFWK_ARK_STARTUP_CACHE_ONLY_ALLOW_CREATE_IN_WHITE_LIST); - + ceateArk.bundleType = BundleType::ATOMIC_SERVICE; ret = installer2.CreateArkStartupCache(ceateArk); EXPECT_EQ(ret, ERR_APPEXECFWK_ARK_STARTUP_CACHE_ONLY_ALLOW_CREATE_IN_WHITE_LIST); } - + /** * @tc.number: CreateArkStartupCache_0030 * @tc.name: test CreateArkStartupCache @@ -12095,20 +12095,20 @@ HWTEST_F(BmsBundleInstallerTest, CreateArkStartupCache_0030, Function | SmallTes ceateArk.uid = 0; ceateArk.gid = 0; WriteToConfigFile("com.test2"); - + // test bundlename in white list BaseBundleInstaller installer3; ErrCode ret = installer3.CreateArkStartupCache(ceateArk); EXPECT_EQ(ret, ERR_OK); - + ret = installer3.CleanArkStartupCache(ServiceConstants::SYSTEM_OPTIMIZE_PATH, "com.test2", 100); EXPECT_EQ(ret, ERR_OK); - + ret = installer3.DeleteArkStartupCache(ServiceConstants::SYSTEM_OPTIMIZE_PATH, "com.test2", 101); EXPECT_EQ(ret, ERR_OK); setuid(Constants::ROOT_UID); } - + /** * @tc.number: CreateArkStartupCacheDir_0100 * @tc.name: test CreateArkStartupCacheDir @@ -12120,7 +12120,7 @@ HWTEST_F(BmsBundleInstallerTest, CreateArkStartupCacheDir_0100, Function | Mediu ErrCode ret = host.CreateArkStartupCacheDir(103); EXPECT_EQ(ret, ERR_OK); } - + /** * @tc.number: RemoveSystemOptimizeDir_0100 * @tc.name: test RemoveSystemOptimizeDir @@ -12132,7 +12132,7 @@ HWTEST_F(BmsBundleInstallerTest, RemoveSystemOptimizeDir_0100, Function | Medium ErrCode ret = host.RemoveSystemOptimizeDir(103); EXPECT_EQ(ret, ERR_OK); } - + /** * @tc.number: SetArkStartupCacheApl_0100 * @tc.name: test SetArkStartupCacheApl @@ -12143,7 +12143,7 @@ HWTEST_F(BmsBundleInstallerTest, SetArkStartupCacheApl_0100, Function | SmallTes InstalldHostImpl impl; auto ret = impl.SetArkStartupCacheApl(""); EXPECT_EQ(ret, ERR_APPEXECFWK_INSTALLD_PARAM_ERROR); - + ret = impl.SetArkStartupCacheApl(BUNDLE_DATA_DIR); EXPECT_EQ(ret, ERR_APPEXECFWK_INSTALLD_SET_SELINUX_LABEL_FAILED); } @@ -12280,15 +12280,15 @@ HWTEST_F(BmsBundleInstallerTest, ProcessArkStartupCache_0010, Function | SmallTe ceateArk.uid = 0; ceateArk.gid = 0; WriteToConfigFile(testBudnleName); - + // test bundlename in white list BaseBundleInstaller installer3; ErrCode ret = installer3.ProcessArkStartupCache(ceateArk, 1, 100); EXPECT_EQ(ret, ERR_OK); - + ret = installer3.CleanArkStartupCache(ServiceConstants::SYSTEM_OPTIMIZE_PATH, testBudnleName, 100); EXPECT_EQ(ret, ERR_OK); - + ret = installer3.DeleteArkStartupCache(ServiceConstants::SYSTEM_OPTIMIZE_PATH, testBudnleName, 101); EXPECT_EQ(ret, ERR_OK); diff --git a/test/sceneProject/unittest/bundle_share_library/libA_without_provision/AppScope/app.json b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/AppScope/app.json5 similarity index 31% rename from test/sceneProject/unittest/bundle_share_library/libA_without_provision/AppScope/app.json rename to test/sceneProject/unittest/bundle_share_library/libA_without_provision/AppScope/app.json5 index df9e3d7a20..4ddc3ec130 100644 --- a/test/sceneProject/unittest/bundle_share_library/libA_without_provision/AppScope/app.json +++ b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/AppScope/app.json5 @@ -1,12 +1,24 @@ +/* + * Copyright (c) 2025 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. + */ + { "app": { "bundleName": "com.example.liba", "debug": true, "icon": "$media:app_icon", - "iconId": 16777217, "label": "$string:app_name", - "labelId": 16777216, - "apiReleaseType": "Release", "minAPIVersion": 9, "targetAPIVersion": 9, "vendor": "example", @@ -14,4 +26,4 @@ "versionName": "1.0.0", "bundleType": "shared" } -} +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_share_library/libA_without_provision/BUILD.gn b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/BUILD.gn index 5c130edc03..8b4feb0c66 100644 --- a/test/sceneProject/unittest/bundle_share_library/libA_without_provision/BUILD.gn +++ b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023-2025 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 @@ -14,30 +14,17 @@ import("//build/ohos.gni") import("../../../../../appexecfwk.gni") -ohos_hap("libA_without_provision") { - hap_profile = "entry/src/main/module.json" +ohos_app("libA_without_provision") { + certificate_profile = "signature/com.example.liba_normal.p7b" hap_name = "libA_without_provision" - subsystem_name = "bundlemanager" - final_hap_path = "$root_out_dir/tests/unittest/bundle_framework/bundle_framework/resource/bundle_share_library/${hap_name}.hsp" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "${bundle_framework_path}/test/sceneProject/signature/com.example.liba_normal.p7b" -} -ohos_app_scope("bmsstagedemoone_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} + hap_out_dir = "$root_out_dir/tests/unittest/bundle_framework/bundle_framework/resource/bundle_share_library" -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "entry/src/main/ets" -} + subsystem_name = "bundlemanager" -ohos_resources("hjs_demo_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":bmsstagedemoone_app_profile" ] - hap_profile = "entry/src/main/module.json" + js_build_mode = "release" + sdk_home = "//prebuilts/ohos-sdk/linux" + sdk_type_name = [ "sdk.dir" ] + assemble_type = "assembleHsp" + build_level = "module" } diff --git a/test/sceneProject/unittest/bundle_share_library/libA_without_provision/build-profile.json5 b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/build-profile.json5 new file mode 100644 index 0000000000..ee6cd78d2f --- /dev/null +++ b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/build-profile.json5 @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "app": { + "signingConfigs": [], + "products": [ + { + "name": "default", + "signingConfig": "default", + "compileSdkVersion": 20, + "compatibleSdkVersion": 20, + "targetSdkVersion": 20, + "runtimeOS": "OpenHarmony", + "buildOption": { + "strictMode": { + "caseSensitiveCheck": true, + "useNormalizedOHMUrl": true + } + } + } + ], + "buildModeSet": [ + { + "name": "debug", + }, + { + "name": "release" + } + ] + }, + "modules": [ + { + "name": "liba", + "srcPath": "./entry", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/build-profile.json5 b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/build-profile.json5 new file mode 100644 index 0000000000..f618d79883 --- /dev/null +++ b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/build-profile.json5 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": false, + "files": [ + "./obfuscation-rules.txt" + ] + } + } + } + }, + ], + "targets": [ + { + "name": "default" + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/hvigorfile.ts b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/hvigorfile.ts new file mode 100644 index 0000000000..3da030b9ab --- /dev/null +++ b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/hvigorfile.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 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 { hspTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: hspTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/obfuscation-rules.txt b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/obfuscation-rules.txt new file mode 100644 index 0000000000..c1d419bdc6 --- /dev/null +++ b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/obfuscation-rules.txt @@ -0,0 +1,36 @@ +# Copyright (c) 2025 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. + +# Define project specific obfuscation rules here. +# You can include the obfuscation configuration files in the current module's build-profile.json5. +# +# For more details, see +# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 + +# Obfuscation options: +# -disable-obfuscation: disable all obfuscations +# -enable-property-obfuscation: obfuscate the property names +# -enable-toplevel-obfuscation: obfuscate the names in the global scope +# -compact: remove unnecessary blank spaces and all line feeds +# -remove-log: remove all console.* statements +# -print-namecache: print the name cache that contains the mapping from the old names to new names +# -apply-namecache: reuse the given cache file + +# Keep options: +# -keep-property-name: specifies property names that you want to keep +# -keep-global-name: specifies names that you want to keep in the global scope + +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/oh-package.json5 b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/oh-package.json5 new file mode 100644 index 0000000000..4cca352ea8 --- /dev/null +++ b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/oh-package.json5 @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "name": "entry", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", + "dependencies": {} +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/src/main/module.json b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/src/main/module.json deleted file mode 100644 index edd258a3d9..0000000000 --- a/test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/src/main/module.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "module": { - "name": "liba", - "type": "shared", - "description": "$string:module_desc", - "mainElement": "EntryAbility", - "deviceTypes": [ - "2in1", - "default", - "tablet" - ], - "deliveryWithInstall": true, - "installationFree": false, - "pages": "$profile:main_pages", - "abilities": [ - { - "name": "EntryAbility", - "srcEntrance": "./ets/entryability/EntryAbility.ts", - "description": "$string:EntryAbility_desc", - "icon": "$media:icon", - "label": "$string:EntryAbility_label", - "startWindowIcon": "$media:icon", - "startWindowBackground": "$color:start_window_background", - "visible": true, - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ] - } - ] - } -} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/src/main/module.json5 b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/src/main/module.json5 new file mode 100644 index 0000000000..31733f35b9 --- /dev/null +++ b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/entry/src/main/module.json5 @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "module": { + "name": "liba", + "type": "shared", + "description": "$string:module_desc", + "deviceTypes": [ + "2in1", + "default", + "tablet" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + } +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_share_library/libA_without_provision/hvigor/hvigor-config.json5 b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/hvigor/hvigor-config.json5 new file mode 100644 index 0000000000..8a9aebbcd2 --- /dev/null +++ b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/hvigor/hvigor-config.json5 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "modelVersion": "5.0.0", + "dependencies": { + }, + "execution": { + // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | false ]. Default: "normal" */ + // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */ + // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */ + // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */ + // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */ + }, + "logging": { + // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ + }, + "debugging": { + // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */ + }, + "nodeOptions": { + // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/ + // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/ + } +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_share_library/libA_without_provision/hvigorfile.ts b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/hvigorfile.ts new file mode 100644 index 0000000000..2a5e543f19 --- /dev/null +++ b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/hvigorfile.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 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 { appTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ +} diff --git a/test/sceneProject/unittest/bundle_share_library/libA_without_provision/oh-package-lock.json5 b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/oh-package-lock.json5 new file mode 100644 index 0000000000..96e00422a2 --- /dev/null +++ b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/oh-package-lock.json5 @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "meta": { + "stableOrder": true + }, + "lockfileVersion": 3, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "@ohos/hypium@1.0.19": "@ohos/hypium@1.0.19" + }, + "packages": { + "@ohos/hypium@1.0.19": { + "name": "@ohos/hypium", + "version": "1.0.19", + "integrity": "sha512-cEjDgLFCm3cWZDeRXk7agBUkPqjWxUo6AQeiu0gEkb3J8ESqlduQLSIXeo3cCsm8U/asL7iKjF85ZyOuufAGSQ==", + "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.19.har", + "registryType": "ohpm" + } + } +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_share_library/libA_without_provision/oh-package.json5 b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/oh-package.json5 new file mode 100644 index 0000000000..a99e76cceb --- /dev/null +++ b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/oh-package.json5 @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2025 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. + */ + +{ + "modelVersion": "5.0.0", + "description": "Please describe the basic information.", + "dependencies": { + }, + "devDependencies": { + "@ohos/hypium": "1.0.19" + } +} \ No newline at end of file diff --git a/test/sceneProject/unittest/bundle_share_library/libA_without_provision/signature/com.example.liba_normal.p7b b/test/sceneProject/unittest/bundle_share_library/libA_without_provision/signature/com.example.liba_normal.p7b new file mode 100644 index 0000000000000000000000000000000000000000..c18660231d1685fc0c13fc2e3fce39234b748eba GIT binary patch literal 3417 zcmcgveNf%;qO+E>>RfH-=jwF3H&BHh{bQ%+m~)bQ ze$V@R-#qX8dw$P*E{OBYDQUCYG;McytWQj^ARb6hNn6~eVc{Gun+4+B zJC71s9dYiL+&K4(CHx2;Z1w~QA%XdEei>g>1d0HE&O_K9aL}-54j&^)p~KT03VLke z5HleZBbf<-<^~TD!d*d(LFt*{u*X5;5+EwE$z-@t;-r7XQi($-lYmkoCc^<#EOt6^ zsFe91%;#}QxbzkTwwmBZy@6iAh*CjTW-48`H4qjW7wKyy&&fWc&z)G%mE0*yYzyhw%4Xr`1@f}=tKN69+1 z#YuldHb~~SYv5=-p)kRfL;GqrAu3B4t3{(K6Kop70w#r07ONAfXqr=~?7ouCduD7_qpt0m0_O|wW*Su8@s=E@SiX0F)Q7&e-k z>Ir+5))^&Kz-n_>OCpe=(Q2@H{brd%R_XVfV}_W%xCNuCYJ9~pX|2gdxO{UPWpzN{ zD3)pikd~?^%nI1SFxH@ArOJhxApvR^5Do#3`^8=;s!(|-PpwUyHo9d_EisH>9FQhG=%i&T(JGGjPsGE~^?1|0TVD$R;0 zWU59LQ2}Iek(xk=u8Q1Qg~~&9Hlm&=(U+QZf)ZF&trgT038^dfipR+RQI`!HhCSdf z!lRg<^x;K5j}4;}Fw#eN5fKRbF<&Aig-#p`g_*wQyJ^E18fu^|g-^FJX7@ES?TYz) z0Sb2rhvJ2N{vvvi?q0vAnQ^E@P7r4t$R488MvW|Fa_PJfjH~k4i1~eW^+q+`Hz9IDbLWxdHO{zhm)KH>`*#LOW~NgDcNkf9vTmxWr8u; z=_70dngntfG(9_O1e$NcF+WrQrZYpF?8zgCV3PDPwnFpIm&0IM4o?ID5fDKl`YEZ) z;fZCCs2Ca!0r>+-08lhUqVP#1s)7Nh$A{+|hfEV#L3T=N;uzSh;q&0IQaMNxx8@A{ zAAQ~XKZl!+O*r}US#RuBl`QAA=dr%rJNx&qT{wSfnr?T=EzT$394FWU)BL=5|ImSM zNSpY<>*CWKV$Jc~H+Imi0`h1&QwzAcU}Ed|zqa-AC;mBodqwZSb4&WZNnYA1RD%pA zA(O@WFPF<)PB;aI2Nj>ZK zrNwQreVQ5LkZV7~``jt}pWT{8sb0E&t+T!Nb7Z~ayz|zjT{kbSO_45s@YYs(N=KWw z<>G^}W$?8biz<_+ul`+ks{x!>{B8Bj0psNNSn}OhW*pcd$%^iI(7bH$i_8PGeiXER zP7doQ^HS-W(OiK02bOLYm^oCsyeE~;7zl*ECn87;m5vZmB7BNWA|UILc#;J_;U@7p zwj{1jIuP5?$XmYUI|3y7+$E&;xM|O7JYnX6vX5O0MK>qVn(Ppc5SxKt;>m3MK z05Tb&WHZ7^1|0e^T1l*w5lYG_%i8|-q#q9^8G6pP7w&JbqcT1oT|JH~2{_n*s-p^_ zkMB^sU)r>_zxLqzeTCg))}9%Aq^xh+tF5yoE%iIMPZ4fA_hEor;IS5lHnYKuw`cq` zu&AdX)i}Ou?ahwYK>7Tb;@@HAAlVh!y5%O=)MVHY>)(}gPSAZ?o!gd7>jh;I={VvOBs6{7S0}c<;W6>=|6e)Gns zq2=;@yHjrOyF`M1S_>rOqtFpvHW0RqG^oul8T(uJ%s&15j8D10@`8SCaBv-VnY4!1x=xATeBrYqD9&0y zi)PopYp)1cmD@kqfK`J literal 0 HcmV?d00001 -- Gitee