diff --git a/commonlibrary/BUILD.gn b/commonlibrary/BUILD.gn index 2109ccf676814193c77c735674722971d8999950..ff1e721a0a0d56226c176503bc4bc644bbb38981 100644 --- a/commonlibrary/BUILD.gn +++ b/commonlibrary/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (C) 2022 Huawei Device Co., Ltd. +# Copyright (C) 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 diff --git a/commonlibrary/crossplatform/BUILD.gn b/commonlibrary/crossplatform/BUILD.gn index fc4b351c8f8a2f25e75b18d1dcaecdb818e1d90d..492d23109a30d7a3c1f07b4d7103f020be780a0b 100644 --- a/commonlibrary/crossplatform/BUILD.gn +++ b/commonlibrary/crossplatform/BUILD.gn @@ -15,8 +15,6 @@ import("//test/xts/tools/build/suite.gni") group("crossplatform") { testonly = true if (is_standard_system) { - deps = [ - "commonlibraryTreeMapetstest:TreeMap_ets_test", - ] + deps = [ "commonlibraryTreeMapetstest:TreeMap_ets_test" ] } } diff --git a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/BUILD.gn b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/BUILD.gn index d54ce111110152afefa4a27c84dab72492a1e654..26668df1b7275fe71e10afea8bd775a508537864 100644 --- a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/BUILD.gn +++ b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/BUILD.gn @@ -1,3 +1,15 @@ +# Copyright (C) 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. import("//test/xts/tools/build/suite.gni") ohos_js_hap_suite("TreeMap_ets_test") { @@ -8,6 +20,7 @@ ohos_js_hap_suite("TreeMap_ets_test") { ] ets2abc = true certificate_profile = "./signature/openharmony_sx.p7b" + # hap_name: HAP的名字,可选,默认为目标名 hap_name = "TreeMap_ets_test" subsystem_name = "commonlibrary" @@ -16,6 +29,7 @@ ohos_js_hap_suite("TreeMap_ets_test") { ohos_app_scope("windowStage_app_profile") { # app_profile: HAP的AppScope中的app.json,只在Stage模型下使用 app_profile = "AppScope/app.json" + # sources: 资源文件路径 sources = [ "AppScope/resources" ] } @@ -26,8 +40,10 @@ ohos_js_assets("windowStage_js_assets") { ohos_resources("windowStage_resources") { # sources: 资源文件路径 sources = [ "src/main/resources" ] + # deps: 当前目标的依赖 deps = [ ":windowStage_app_profile" ] + # hap_profile: HAP的config.json,Stage模型对应module.json hap_profile = "src/main/module.json" -} \ No newline at end of file +} diff --git a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/Test.json b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/Test.json index 561a43d42ee1a69da2755be5c7acbe1a43ec53d7..879a5e5db3366a7028e4f608d8c9672dd6439ad2 100644 --- a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/Test.json +++ b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/Test.json @@ -1,20 +1,13 @@ { "description": "Configuration for hjunit demo Tests", - // 指定设备执行的驱动 "driver": { "type": "OHJSUnitTest", - //test-timeout: 测试hap 整体执行用例的执行时长 "test-timeout": "60000", - //shell-timeout: aa test 拉起命令执行时长 "shell-timeout": "60000", - //bundle-name: 与HAP的app.json 中 bundleName 保持一致 "bundle-name": "ohos.acts.commonlibrary.crossplatform.TreeMap.normal", - //module-name: 与HAP的module.json 中"module"字段的 name 保持一致 "module-name": "entry_test" - //testcase-timeout: 测试hap 单条用例的执行时长 - //"testcase-timeout": 5000 }, - // kit的作用主要是为了支撑测试执行活动,在测试前执行预制操作(Setup),在测试后执行清理操作(Teardown) + "kits": [ { "test-file-name": [ diff --git a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestAbility/TestAbility.ets b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestAbility/TestAbility.ets index 2d889f4fdf763010c29f1767b033420a5c7b8671..368aef9190e386ca17d015688d69169e208f6924 100644 --- a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestAbility/TestAbility.ets +++ b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestAbility/TestAbility.ets @@ -1,3 +1,17 @@ +/* + * Copyright (C) 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. + */ import UIAbility from '@ohos.app.ability.UIAbility'; import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; import hilog from '@ohos.hilog'; diff --git a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestAbility/pages/Index.ets b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestAbility/pages/Index.ets index 166366593a7e55ef17e6619f68a4c46214814858..e9564089921924d8b378cf1df07861df17457c90 100644 --- a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestAbility/pages/Index.ets +++ b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/TestAbility/pages/Index.ets @@ -1,3 +1,17 @@ +/* + * Copyright (C) 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. + */ import hilog from '@ohos.hilog'; @Entry diff --git a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/test/List.test.ets b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/test/List.test.ets index 1b02130a31019bd9774bbe6d1e743960fa429a15..5a775217306daf6984f1dfa49c7303066eb7564c 100644 --- a/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/test/List.test.ets +++ b/commonlibrary/crossplatform/commonlibraryTreeMapetstest/src/main/ets/test/List.test.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 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. + */ import TreeMapTest from './TreeMap.test' export default function testsuite() {