1# Copyright (c) 2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http:\www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14# Description: configs for test suite 15 16# environment settings 17deveco_path: D:\Software\Deveco-0602\DevEco Studio 18deveco_harmonyos_sdk_path: D:\SDK\HarmonyOS_SDK 19deveco_openharmony_sdk_path: D:\SDK\openHarmony_SDK 20node_js_path: D:\Software\nodejs # The nodejs which is used in Deveco 21# the mapping between API and file name 22api_version_file_name_map: 23 '4.0.0(10)': "HarmonyOS-NEXT-DP0" 24 '4.1.0(11)': "HarmonyOS-NEXT-DP1" 25 '5.0.0(12)': "HarmonyOS-NEXT-DB0" 26 27# output settings 28output_html_file: ./sdk_test_report.html 29log_file: ./sdk_test_log.txt 30pictures_dic: ./pictures 31 32# descriptions about test haps list 33# each hap have the following attributes: 34# -name: name of the hap 35# -path: path of the hap project 36# -type: type of the hap. Available values are: [stage, fa, js, compatible8] 37# besides, you can also append attributes in [widget, ohosTest, error, exceed_length_error] 38# -widget: indicates this hap has widget, which has widgets.abc in stage mode 39# -error: indicates this hap need to test whether compile error is correctly generated as well 40# -exceed_length_error: indicates this hap need to test whether compile error is correctly generated when path exceed the limit 41# -ohosTest: indicates this hap needed to compile ohosTest as well 42# -hap_module: specify hap module to build in the test. 43# -hap_module_path: specify hap module path to build in the test,in form of list 44# -har_module: specify har module to build in the test. 45# -har_module_path: specify har module path to build in the test,in form of list 46# -hsp_module: specify hsp module to build in the test. 47# -hsp_module_path: specify hsp module path to build in the test,in form of list 48# -cpp_module: specify cpp module to build in the test. 49# -cpp_module_path: specify cpp module path to build in the test,in form of list 50# -build_path: path to build path, in form of list 51# -preview_path: path to preview build path, in form of list 52# -bundle_name: the bundle name of the project. 53# -ability_name: the ability name of the project 54# -cache_path: path to cache path, in form of list 55# -hap_output_path: path of output hap(unsigned), in form of list 56# -hap_output_signed: path of output hap(signed), in form of list 57# -har_output_path: path of output har(har package), in form of list 58# -hap_output_path: path of output hsp(unsigned), in form of list 59# -hap_output_signed: path of output hsp(signed), in form of list 60# -har_output_path: path of output hsp(har package), in form of list 61# -main_pages_json_path: information of page configuration(when you add a new page) 62# -inc_modify_file: path of modified file in incremental build, in form of list 63# -har_modify_mode_file: path of modified file in har module, in form of list 64# -hsp_modify_mode_file: path of modified file in hsp module, in form of list 65# -cpp_modify_file: path of modified file in cpp module, in form of list 66# -description: description about the hap, this attribute is not used yet. 67haps: 68 # complex haps 69 - calendar: 70 name: Calendar 71 path: D:\haps\calendar 72 type: [stage] 73 hap_module: entry 74 build_path: 75 cache_path: 76 output_hap_path: 77 output_app_path: 78 inc_modify_file: 79 description: 80 # widget haps 81 - widgetdemo: 82 name: WidgetDemo 83 path: D:\haps\WidgetDemo 84 type: [stage, widget] 85 hap_module: entry 86 build_path: 87 cache_path: 88 output_hap_path: 89 output_app_path: 90 inc_modify_file: 91 description: 92 # IDE demo haps 93 - idedemo_00: 94 name: IdeStageDemoEmptyAbility 95 path: D:\sdk-test\DemoApplication_EmptyAbility 96 type: [stage, ohosTest, exceed_length_error, error] 97 hap_module: entry 98 hap_module_path: [ entry ] 99 har_module: har 100 har_module_path: [ har ] 101 hsp_module: hsp 102 hsp_module_path: [ hsp ] 103 cpp_module: cpp 104 cpp_module_path: [ cpp ] 105 build_path: [ build, default ] 106 preview_path: [.preview, default] 107 bundle_name: com.example.stagedemoemptyability 108 ability_name: EntryAbility 109 cache_path: [ cache, default, default@CompileArkTS, esmodule ] 110 preview_cache_path: [ cache, default, default@PreviewArkTS, esmodule ] 111 hap_output_path: [ outputs, default, entry-default-unsigned.hap ] 112 hap_output_path_signed: [ outputs, default, entry-default-signed.hap ] 113 har_output_path: [outputs, default, har.har] 114 hsp_output_path: [ outputs, default, hsp-default-unsigned.hsp] 115 hsp_output_path_signed: [outputs, default, hsp-default-signed.hsp] 116 main_pages_json_path: [ entry, src, main, resources, base, profile, main_pages.json ] 117 inc_modify_file: [ entry, src, main, ets, pages, Index.ets ] 118 har_modify_file: [ har, Index.ets ] 119 hsp_modify_file: [ hsp, Index.ets ] 120 cpp_modify_file: [ cpp, src, main, cpp, types, libcpp, Index.d.ts ] 121 description: 122 - idedemo_01: 123 name: IdeFaDemoEmptyAbility 124 path: D:\sdk-test\DemoApplication_EmptyAbility_fa 125 type: [fa, ohosTest, exceed_length_error, error] 126 hap_module: entry 127 hap_module_path: [ entry ] 128 har_module: har 129 har_module_path: [ har ] 130 hsp_module: hsp 131 hsp_module_path: [ hsp ] 132 cpp_module: cpp 133 cpp_module_path: [ cpp ] 134 build_path: [ build, default ] 135 preview_path: [.preview, default] 136 bundle_name: com.example.idefademoemptyability 137 ability_name: com.example.idefademoemptyability.MainAbility 138 cache_path: [ cache, default, default@LegacyCompileArkTS, jsbundle ] 139 preview_cache_path: [ cache, default, default@PreviewArkTS, esmodule ] 140 hap_output_path: [ outputs, default, entry-default-unsigned.hap ] 141 hap_output_path_signed: [ outputs, default, entry-default-signed.hap ] 142 har_output_path: [outputs, default, har.har] 143 hsp_output_path: [ outputs, default, hsp-default-unsigned.hsp] 144 hsp_output_path_signed: [outputs, default, hsp-default-signed.hsp] 145 main_pages_json_path: [ entry, src, main, resources, base, profile, main_pages.json ] 146 inc_modify_file: [ entry, src, main, ets, pages, Index.ets ] 147 har_modify_file: [ har, Index.ets ] 148 hsp_modify_file: [ hsp, Index.ets ] 149 cpp_modify_file: [ cpp, src, main, cpp, types, libcpp, Index.d.ts ] 150 description: 151 - idedemo_02: 152 name: IdeCompatible8DemoEmptyAbility 153 path: D:\sdk-test\DemoApplication_EmptyAbility_compatible8 154 type: [compatible8, ohosTest, exceed_length_error, error] 155 hap_module: entry 156 hap_module_path: [ entry ] 157 har_module: har 158 har_module_path: [ har ] 159 hsp_module: hsp 160 hsp_module_path: [ hsp ] 161 cpp_module: cpp 162 cpp_module_path: [ cpp ] 163 build_path: [ build, default ] 164 preview_path: [.preview, default] 165 bundle_name: com.example.idecompatible8demoemptyability 166 ability_name: com.example.idecompatible8demoemptyability.MainAbility 167 cache_path: [ cache, default, default@LegacyCompileArkTS, jsbundle ] 168 preview_cache_path: [ cache, default, default@PreviewArkTS, esmodule ] 169 hap_output_path: [ outputs, default, entry-default-unsigned.hap ] 170 hap_output_path_signed: [ outputs, default, entry-default-signed.hap ] 171 har_output_path: [outputs, default, har.har] 172 hsp_output_path: [ outputs, default, hsp-default-unsigned.hsp] 173 hsp_output_path_signed: [outputs, default, hsp-default-signed.hsp] 174 main_pages_json_path: [ entry, src, main, resources, base, profile, main_pages.json ] 175 inc_modify_file: [ entry, src, main, ets, pages, Index.ets ] 176 har_modify_file: [ har, Index.ets ] 177 hsp_modify_file: [ hsp, Index.ets ] 178 cpp_modify_file: [ cpp, src, main, cpp, types, libcpp, Index.d.ts ] 179 description: 180 - idedemo_03: 181 name: IdeJsDemoEmptyAbility 182 path: D:\sdk-test\DemoApplication_EmptyAbility_js 183 type: [js, ohosTest, exceed_length_error, error] 184 hap_module: entry 185 hap_module_path: [ entry ] 186 har_module: har 187 har_module_path: [ har ] 188 hsp_module: hsp 189 hsp_module_path: [ hsp ] 190 cpp_module: cpp 191 cpp_module_path: [ cpp ] 192 build_path: [ build, default ] 193 preview_path: [.preview, default] 194 bundle_name: com.example.idejsdemoemptyability 195 ability_name: com.example.idejsdemoemptyability.MainAbility 196 cache_path: [ cache, default, default@LegacyCompileJS, jsbundle ] 197 preview_cache_path: [ cache, default, default@PreviewArkTS, esmodule ] 198 hap_output_path: [ outputs, default, entry-default-unsigned.hap ] 199 hap_output_path_signed: [ outputs, default, entry-default-signed.hap ] 200 har_output_path: [outputs, default, har.har] 201 hsp_output_path: [ outputs, default, hsp-default-unsigned.hsp] 202 hsp_output_path_signed: [outputs, default, hsp-default-signed.hsp] 203 main_pages_json_path: [ entry, src, main, resources, base, profile, main_pages.json ] 204 inc_modify_file: [ entry, src, main, ets, pages, Index.ets ] 205 har_modify_file: [ har, Index.ets ] 206 hsp_modify_file: [ hsp, Index.ets ] 207 cpp_modify_file: [ cpp, src, main, cpp, types, libcpp, Index.d.ts ] 208 description: 209# external_haps: descriptions about external haps list 210external_haps: 211 - external_demo_00: 212 name: Out 213 path: D:\sdk-test\Out 214 type: [stage, ohosTest, exceed_length_error, error] 215 hap_module: entry 216 hap_module_path: [ entry ] 217 har_module: outHar 218 har_module_path: [ outHar ] 219 hsp_module: outHsp 220 hsp_module_path: [ outHsp ] 221 cpp_module: outCpp 222 cpp_module_path: [ outCpp ] 223 build_path: [ build, default ] 224 preview_path: [ .preview, default ] 225 bundle_name: com.example.out 226 ability_name: EntryAbility 227 cache_path: [ cache, default, default@CompileArkTS, esmodule ] 228 preview_cache_path: [ cache, default, default@PreviewArkTS, esmodule ] 229 hap_output_path: [ outputs, default, entry-default-unsigned.hap ] 230 hap_output_path_signed: [ outputs, default, entry-default-signed.hap ] 231 har_output_path_har: [ outputs, default, outHar.har ] 232 hsp_output_path: [ outputs, default, outHsp-default-unsigned.hsp ] 233 hsp_output_path_signed: [ outputs, default, outHsp-default-signed.hsp ] 234 hsp_output_path_har: [ outputs, default, outHsp.har ] 235 cpp_output_path: [ outputs, default, outCpp-default-unsigned.hap ] 236 cpp_output_path_signed: [ outputs, default, outCpp-default-signed.hap ] 237 main_pages_json_path: [ entry, src, main, resources, base, profile, main_pages.json ] 238 inc_modify_file: [ entry, src, main, ets, pages, Index.ets ] 239 har_modify_file: [ outHar, Index.ets ] 240 hsp_modify_file: [ outHsp, Index.ets ] 241 cpp_modify_file: [ outCpp, src, main, cpp, types, libcpp, Index.d.ts ] 242 description: 243 244# modifications for incremental compilation and other tests 245patch_content: 246 patch_new_file_ets: 247 # This new file will be added to the same directory as 'inc_modify_file' specified in haps 248 name: test.ets 249 path: pages/Test 250 content: "export function a() {return 'a'}\n" 251 component: "@Entry\n@Component\nstruct NewPage {\n@State message: string = 'Hello World';\nbuild() {\n}\n}\n" 252 patch_new_file_js: 253 name: test.js 254 content: "export function a() {return 'a'}\n" 255 patch_new_file_ts: 256 name: test.ts 257 new_name: TEST.ts 258 content: "export function a() {return 'a'}\n" 259 patch_new_file_cpp: 260 name: test.js 261 content: "export function a() {return 'a'}\n" 262 patch_lines_1: 263 js: 264 head: "import {a} from './test'\n" 265 tail: "\nconsole.log(a().toString());\n" 266 ts: 267 head: "import {a} from './test'\n" 268 tail: "\nconsole.log(a().toString());\n" 269 har: 270 head: "import {a} from 'staticlibrary';\n" 271 tail: "\nconsole.log(a().toString());\n" 272 hsp: 273 head: "import {a} from 'sharelibrary';\n" 274 tail: "\nconsole.log(a().toString());\n" 275 cpp: 276 head: "import {a} from 'libcpp.so';\n" 277 tail: "\nconsole.log(a().toString());\n" 278 externalhar: 279 head: "import {a} from 'outHar';\n" 280 tail: "\nconsole.log(a().toString());\n" 281 externalhsp: 282 head: "import {a} from 'outHsp';\n" 283 tail: "\nconsole.log(a().toString());\n" 284 externalcpp: 285 head: "import {a} from 'outCpp';\n" 286 tail: "\nconsole.log(a().toString());\n" 287 patch_lines_2: 288 tail: "\n console.log('This is a new line');\n" 289 patch_lines_error: 290 content: "let a_duplicated_value_for_test_suite = 1; function a_duplicated_value_for_test_suite() {};\n" 291 expected_error: [Duplicate identifier 'a_duplicated_value_for_test_suite', 292 Function implementation is missing or not immediately following the declaration, 293 Identifier 'a_duplicated_value_for_test_suite' has already been declared] 294 patch_file_error: 295 expected_error: [Cannot find module './test' or its corresponding type declarations] 296 # Please make sure the module inc modify path is in the dependency path 297 arkui_patch: 298 content: "@Entry\n@Component\nstruct HelloWorld {\n@State message: string = 'Hello World';\nbuild() {\n}\n}\n" 299 component: "Row() {\nColumn() {\nText(this.message)\n.fontSize(50)\n.fontWeight(FontWeight.Bold)\n}\n 300 .width('100%')\n}\n.height('100%')\n" 301 origin_text: "'Hello World';" 302 error_text: "'Hello World'123;" 303 error_component: "Texat('this is a wrong component')\n" 304 expected_errors: [Cannot find name 'Texat'. Did you mean 'Text', 305 Objects with property names that are not identifiers are not supported, "';' expected"] 306 ohpm_package_patch: 307 ordinary_package: 308 name: dayjs 309 head: "import dayjs from 'dayjs'\n" 310 tail: "\nconsole.log(dayjs().toString());" 311 # The oh-package.json does not contain the fields module/main/borrower 312 special_package: 313 name: bignumber.js 314 head: "import { BigNumber } from 'bignumber.js';\n" 315 tail: "\nBigNumber(123.4567);"