From e68b15308fefa1c46883c1301cda30c245193538 Mon Sep 17 00:00:00 2001 From: lanhaoyu Date: Sat, 19 Jul 2025 10:03:33 +0800 Subject: [PATCH] versionUpdateTest5 Signed-off-by: lanhaoyu --- .../src/verify/verify_manager_client.cpp | 3 ++ .../bms_bundle_installer_test.cpp | 8 ++-- .../versionUpdateTest3/oh-package.json5 | 25 ++++++++++ .../versionUpdateTest5/AppScope/app.json | 17 ------- .../versionUpdateTest5/AppScope/app.json5 | 28 +++++++++++ .../test_bundle/versionUpdateTest5/BUILD.gn | 35 +++++--------- .../versionUpdateTest5/build-profile.json5 | 45 ++++++++++++++++++ .../entry/build-profile.json5 | 43 +++++++++++++++++ .../versionUpdateTest5/entry/hvigorfile.ts | 21 ++++++++ .../entry/obfuscation-rules.txt | 23 +++++++++ .../versionUpdateTest5/entry/oh-package.json5 | 25 ++++++++++ .../src/main/{module.json => module.json5} | 18 ++++++- .../hvigor/hvigor-config.json5 | 37 ++++++++++++++ .../versionUpdateTest5/hvigorfile.ts | 21 ++++++++ .../versionUpdateTest5/oh-package-lock.json5 | 42 ++++++++++++++++ .../versionUpdateTest5/oh-package.json5 | 25 ++++++++++ .../signature/com.example.versiontest.p7b | Bin 0 -> 3571 bytes .../versionUpdateTest6/AppScope/app.json | 17 ------- .../versionUpdateTest6/AppScope/app.json5 | 28 +++++++++++ .../test_bundle/versionUpdateTest6/BUILD.gn | 35 +++++--------- .../versionUpdateTest6/build-profile.json5 | 45 ++++++++++++++++++ .../feature/build-profile.json5 | 43 +++++++++++++++++ .../versionUpdateTest6/feature/hvigorfile.ts | 21 ++++++++ .../feature/obfuscation-rules.txt | 23 +++++++++ .../feature/oh-package.json5 | 25 ++++++++++ .../src/main/{module.json => module.json5} | 19 +++++++- .../hvigor/hvigor-config.json5 | 37 ++++++++++++++ .../versionUpdateTest6/hvigorfile.ts | 21 ++++++++ .../versionUpdateTest6/oh-package-lock.json5 | 42 ++++++++++++++++ .../versionUpdateTest6/oh-package.json5 | 25 ++++++++++ .../signature/com.example.versiontest.p7b | Bin 0 -> 3571 bytes .../versionUpdateTest7/AppScope/app.json | 17 ------- .../versionUpdateTest7/AppScope/app.json5 | 28 +++++++++++ .../test_bundle/versionUpdateTest7/BUILD.gn | 35 +++++--------- .../versionUpdateTest7/build-profile.json5 | 44 +++++++++++++++++ .../feature/build-profile.json5 | 43 +++++++++++++++++ .../versionUpdateTest7/feature/hvigorfile.ts | 21 ++++++++ .../feature/obfuscation-rules.txt | 23 +++++++++ .../feature/oh-package.json5 | 25 ++++++++++ .../src/main/{module.json => module.json5} | 19 +++++++- .../hvigor/hvigor-config.json5 | 37 ++++++++++++++ .../versionUpdateTest7/hvigorfile.ts | 21 ++++++++ .../versionUpdateTest7/oh-package-lock.json5 | 42 ++++++++++++++++ .../versionUpdateTest7/oh-package.json5 | 25 ++++++++++ .../signature/com.example.versiontest.p7b | Bin 0 -> 3571 bytes 45 files changed, 1048 insertions(+), 129 deletions(-) create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest3/oh-package.json5 delete mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest5/AppScope/app.json create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest5/AppScope/app.json5 create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest5/build-profile.json5 create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/build-profile.json5 create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/hvigorfile.ts create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/obfuscation-rules.txt create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/oh-package.json5 rename test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/src/main/{module.json => module.json5} (58%) create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest5/hvigor/hvigor-config.json5 create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest5/hvigorfile.ts create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest5/oh-package-lock.json5 create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest5/oh-package.json5 create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest5/signature/com.example.versiontest.p7b delete mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest6/AppScope/app.json create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest6/AppScope/app.json5 create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest6/build-profile.json5 create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest6/feature/build-profile.json5 create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest6/feature/hvigorfile.ts create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest6/feature/obfuscation-rules.txt create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest6/feature/oh-package.json5 rename test/sceneProject/unittest/test_bundle/versionUpdateTest6/feature/src/main/{module.json => module.json5} (55%) create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest6/hvigor/hvigor-config.json5 create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest6/hvigorfile.ts create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest6/oh-package-lock.json5 create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest6/oh-package.json5 create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest6/signature/com.example.versiontest.p7b delete mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest7/AppScope/app.json create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest7/AppScope/app.json5 create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest7/build-profile.json5 create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest7/feature/build-profile.json5 create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest7/feature/hvigorfile.ts create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest7/feature/obfuscation-rules.txt create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest7/feature/oh-package.json5 rename test/sceneProject/unittest/test_bundle/versionUpdateTest7/feature/src/main/{module.json => module.json5} (55%) create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest7/hvigor/hvigor-config.json5 create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest7/hvigorfile.ts create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest7/oh-package-lock.json5 create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest7/oh-package.json5 create mode 100644 test/sceneProject/unittest/test_bundle/versionUpdateTest7/signature/com.example.versiontest.p7b diff --git a/interfaces/inner_api/appexecfwk_core/src/verify/verify_manager_client.cpp b/interfaces/inner_api/appexecfwk_core/src/verify/verify_manager_client.cpp index 535e69c3b1..5c168c5a5b 100644 --- a/interfaces/inner_api/appexecfwk_core/src/verify/verify_manager_client.cpp +++ b/interfaces/inner_api/appexecfwk_core/src/verify/verify_manager_client.cpp @@ -175,3 +175,6 @@ VerifyManagerClient& VerifyManagerClient::GetInstance() } } // namespace AppExecFwk } // namespace OHOS + + + 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 b2e9835b52..1eead587a6 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 @@ -8067,7 +8067,7 @@ HWTEST_F(BmsBundleInstallerTest, VersionUpdateTest_0010, Function | SmallTest | bool result = dataMgr->GetApplicationInfo(VERSION_UPDATE_BUNDLE_NAME, ApplicationFlag::GET_BASIC_APPLICATION_INFO, USERID, info); EXPECT_TRUE(result); - EXPECT_EQ(info.versionName, "atom_entry_v1"); + EXPECT_EQ(info.versionName, "2.0.0"); bundlePath = RESOURCE_ROOT_PATH + ATOMIC_FEATURE_V2_HAP; installResult = InstallThirdPartyBundle(bundlePath); @@ -8076,7 +8076,7 @@ HWTEST_F(BmsBundleInstallerTest, VersionUpdateTest_0010, Function | SmallTest | result = dataMgr->GetApplicationInfo(VERSION_UPDATE_BUNDLE_NAME, ApplicationFlag::GET_BASIC_APPLICATION_INFO, USERID, info); EXPECT_TRUE(result); - EXPECT_EQ(info.versionName, "atom_feature_v2"); + EXPECT_EQ(info.versionName, "2.1.1"); UnInstallBundle(VERSION_UPDATE_BUNDLE_NAME); } @@ -8102,7 +8102,7 @@ HWTEST_F(BmsBundleInstallerTest, VersionUpdateTest_0020, Function | SmallTest | bool result = dataMgr->GetApplicationInfo(VERSION_UPDATE_BUNDLE_NAME, ApplicationFlag::GET_BASIC_APPLICATION_INFO, USERID, info); EXPECT_TRUE(result); - EXPECT_EQ(info.versionName, "atom_entry_v1"); + EXPECT_EQ(info.versionName, "2.0.0"); bundlePath = RESOURCE_ROOT_PATH + ATOMIC_FEATURE_V2_HAP; installResult = InstallThirdPartyBundle(bundlePath); @@ -8111,7 +8111,7 @@ HWTEST_F(BmsBundleInstallerTest, VersionUpdateTest_0020, Function | SmallTest | result = dataMgr->GetApplicationInfo(VERSION_UPDATE_BUNDLE_NAME, ApplicationFlag::GET_BASIC_APPLICATION_INFO, USERID, info); EXPECT_TRUE(result); - EXPECT_EQ(info.versionName, "atom_feature_v2"); + EXPECT_EQ(info.versionName, "2.1.1"); UnInstallBundle(VERSION_UPDATE_BUNDLE_NAME); } diff --git a/test/sceneProject/unittest/test_bundle/versionUpdateTest3/oh-package.json5 b/test/sceneProject/unittest/test_bundle/versionUpdateTest3/oh-package.json5 new file mode 100644 index 0000000000..d6c6265195 --- /dev/null +++ b/test/sceneProject/unittest/test_bundle/versionUpdateTest3/oh-package.json5 @@ -0,0 +1,25 @@ +/* + * 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", + "@ohos/hamock": "1.0.0" + } +} \ No newline at end of file diff --git a/test/sceneProject/unittest/test_bundle/versionUpdateTest5/AppScope/app.json b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/AppScope/app.json deleted file mode 100644 index f4f7d8a18e..0000000000 --- a/test/sceneProject/unittest/test_bundle/versionUpdateTest5/AppScope/app.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "app": { - "bundleName": "com.example.versiontest", - "bundleType": "atomicService", - "debug": true, - "icon": "$media:app_icon", - "iconId": 16777217, - "label": "$string:app_name", - "labelId": 16777216, - "apiReleaseType": "Release", - "minAPIVersion": 9, - "targetAPIVersion": 9, - "vendor": "example", - "versionCode": 1000000, - "versionName": "atom_entry_v1" - } -} diff --git a/test/sceneProject/unittest/test_bundle/versionUpdateTest5/AppScope/app.json5 b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/AppScope/app.json5 new file mode 100644 index 0000000000..2d61b7dfa2 --- /dev/null +++ b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/AppScope/app.json5 @@ -0,0 +1,28 @@ +/* + * 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.versiontest", + "debug": true, + "icon": "$media:app_icon", + "label": "$string:app_name", + "minAPIVersion": 9, + "targetAPIVersion": 9, + "vendor": "example", + "versionCode": 1000000, + "versionName": "2.0.0" + } +} diff --git a/test/sceneProject/unittest/test_bundle/versionUpdateTest5/BUILD.gn b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/BUILD.gn index a0034e0aff..e359304616 100644 --- a/test/sceneProject/unittest/test_bundle/versionUpdateTest5/BUILD.gn +++ b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2024 Huawei Device Co., Ltd. +# Copyright (c) 2024-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,19 @@ import("//build/ohos.gni") import("../../../../../appexecfwk.gni") -ohos_hap("versionUpdateTest5") { - hap_profile = "entry/src/main/module.json" +ohos_app("versionUpdateTest5") { + certificate_profile = "signature/com.example.versiontest.p7b" hap_name = "versionUpdateTest5" + hap_out_dir = "$root_out_dir/tests/unittest/bundle_framework/bundle_framework/resource/test_bundle/versionUpdateTest" + subsystem_name = "bundlemanager" - final_hap_path = "$root_out_dir/tests/unittest/bundle_framework/bundle_framework/resource/test_bundle/versionUpdateTest/${hap_name}.hap" - testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] - certificate_profile = "${bundle_framework_path}/test/sceneProject/signature/com.example.versiontest.p7b" -} - -ohos_app_scope("bmsstagedemoone_app_profile") { - app_profile = "AppScope/app.json" - sources = [ "AppScope/resources" ] -} + part_name = "bundle_framework" -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "entry/src/main/ets" + js_build_mode = "release" + sdk_home = "//prebuilts/ohos-sdk/linux" + sdk_type_name = [ "sdk.dir" ] + assemble_type = "assembleHap" + build_level = "module" + build_modules = [ "entry" ] } -ohos_resources("hjs_demo_resources") { - sources = [ "entry/src/main/resources" ] - deps = [ ":bmsstagedemoone_app_profile" ] - hap_profile = "entry/src/main/module.json" -} diff --git a/test/sceneProject/unittest/test_bundle/versionUpdateTest5/build-profile.json5 b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/build-profile.json5 new file mode 100644 index 0000000000..af5f81ec1c --- /dev/null +++ b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/build-profile.json5 @@ -0,0 +1,45 @@ +/* + * 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": { + "products": [ + { + "name": "default", + "compileSdkVersion": 20, + "compatibleSdkVersion": 20, + "targetSdkVersion": 20, + "runtimeOS": "OpenHarmony", + "signingConfig": "default" + } + ], + "signingConfigs": [ + ] + }, + "modules": [ + { + "name": "entry", + "srcPath": "./entry", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/build-profile.json5 b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/build-profile.json5 new file mode 100644 index 0000000000..b4d65d490e --- /dev/null +++ b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/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/test_bundle/versionUpdateTest5/entry/hvigorfile.ts b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/hvigorfile.ts new file mode 100644 index 0000000000..e4f43d5466 --- /dev/null +++ b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/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 { hapTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ +} diff --git a/test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/obfuscation-rules.txt b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/obfuscation-rules.txt new file mode 100644 index 0000000000..272efb6ca3 --- /dev/null +++ b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/obfuscation-rules.txt @@ -0,0 +1,23 @@ +# 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/test_bundle/versionUpdateTest5/entry/oh-package.json5 b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/oh-package.json5 new file mode 100644 index 0000000000..4bf3e2a9b1 --- /dev/null +++ b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/oh-package.json5 @@ -0,0 +1,25 @@ +/* + * 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": {} +} + diff --git a/test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/src/main/module.json b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/src/main/module.json5 similarity index 58% rename from test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/src/main/module.json rename to test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/src/main/module.json5 index 821715d33e..5d195cfa34 100644 --- a/test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/src/main/module.json +++ b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/entry/src/main/module.json5 @@ -1,3 +1,18 @@ +/* + * 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": "entry", @@ -31,7 +46,8 @@ "action.system.home" ] } - ] + ], + "srcEntry": "" } ] } diff --git a/test/sceneProject/unittest/test_bundle/versionUpdateTest5/hvigor/hvigor-config.json5 b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/hvigor/hvigor-config.json5 new file mode 100644 index 0000000000..c61d3eed60 --- /dev/null +++ b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/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*/ + } +} diff --git a/test/sceneProject/unittest/test_bundle/versionUpdateTest5/hvigorfile.ts b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/hvigorfile.ts new file mode 100644 index 0000000000..2a5e543f19 --- /dev/null +++ b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/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/test_bundle/versionUpdateTest5/oh-package-lock.json5 b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/oh-package-lock.json5 new file mode 100644 index 0000000000..9db0bd9b4f --- /dev/null +++ b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/oh-package-lock.json5 @@ -0,0 +1,42 @@ +/* + * 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/hamock@1.0.0": "@ohos/hamock@1.0.0", + "@ohos/hypium@1.0.19": "@ohos/hypium@1.0.19" + }, + "packages": { + "@ohos/hamock@1.0.0": { + "name": "@ohos/hamock", + "version": "1.0.0", + "integrity": "sha512-K6lDPYc6VkKe6ZBNQa9aoG+ZZMiwqfcR/7yAVFSUGIuOAhPvCJAo9+t1fZnpe0dBRBPxj2bxPPbKh69VuyAtDg==", + "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hamock/-/hamock-1.0.0.har", + "registryType": "ohpm" + }, + "@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/test_bundle/versionUpdateTest5/oh-package.json5 b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/oh-package.json5 new file mode 100644 index 0000000000..4c8bad9bdb --- /dev/null +++ b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/oh-package.json5 @@ -0,0 +1,25 @@ +/* + * 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", + "@ohos/hamock": "1.0.0" + } +} diff --git a/test/sceneProject/unittest/test_bundle/versionUpdateTest5/signature/com.example.versiontest.p7b b/test/sceneProject/unittest/test_bundle/versionUpdateTest5/signature/com.example.versiontest.p7b new file mode 100644 index 0000000000000000000000000000000000000000..3b2ac44a5ec6272016798022395d9fa9d2fa42c6 GIT binary patch literal 3571 zcmcgvdvp_J7H=Lc76?>ZDIm}ikfM1;Yx`;E$B$?33t4Z6GvSpG?l4&P1(`3>~ z!-5c2RzyJ8U0~&5c@>a?9#Bj5h_1W9;sXxKvL59jvYcI5R&>S3!javXwnEE+KRlj8 z{>Yqrzx&hrBs>?aK4==GT`A#JpBJaqkJ_8xmNx4i0slc$D+__6^GE$+G z%RnaknVW&Kj!gCZ*BahUGN@GR(%sypZ0gGgRocdc*WyKN051xah7h7>y zbw7eQNs~l^6q5y#Oo%2m6cc8pd?B)pq*;!PYkCnmIg+sv@fgdri?M^w5+vh16{dm& zFC9rE{SefOIf_lF$BS7o6YNEMy^RcxVJ19nGQj~d0t*-dM=+Fdn#$5<7)K(J)@Vz! z)8%%XVZjIERy<`&!*(R%s6}AE7jAJl#S9*|fJXf0TDN-^D)6qLwKiE}wX_H7j7idq zHsDCm3PV2Bl)~NKa)b`FM5DnN)D~b`BDL1qXd@HwqRqGo?Tvy{IB{!~yB-k&R=U|= z@8JSkUBnGg!4?fV@McuNo8fj5gBMFVy?Cll^g7HfDZCj^-S9OdEbdMSCU-AJD=OH{ z-e%N?BUm4oJRm_Sb>bEHfPIi^08( zj1Alpg<6E5HO2Y07C?x#z$|t;Af7j<^$B%e*o#Dh{nf<~snU&1U#)Qj5gaBM_6Gb; zliSVJ>BFHGzs;f3w}JX{*hZuvZL4i;=uMLocYAb!;1;#2Wtlx}2#9>krnhlF55 zYjx7dI()Se0*3{w$<%7C!F5J)w;6H6W&(zV1~-<1?K}ZoZY`%XW63fu(a2Qep=y&k z;@10Y5DgHW%Nj*!JQAX`>9B!mF(x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