• Home
  • Raw
  • Download

Lines Matching full:f

56         help=f'aot compile with pgo, default threshold is {DEFAULT_PGO_THRESHOLD}')
58 help=f'pgo hotness threshold, default is {DEFAULT_PGO_THRESHOLD}')
60 help=f'specify seconds of test timeout, default is {DEFAULT_TIMEOUT}')
77 return (1, '', f'exec command timeout {timeout}s')
94 print(f'pls place this script at: {self.place_dir}')
97 self.ohdir = os.path.abspath(f'{self.self_dir}/../../../..')
101 … self.builtin = f'{self.ohdir}/arkcompiler/ets_runtime/ecmascript/ts_types/lib_ark_builtins.d'
129 product_dir = f'{self.ohdir}/out/{self.product}'
130 libs_dir_x64_release = (f'{self.ohdir}/prebuilts/clang/ohos/linux-x86_64/llvm/lib:'
131 f'{product_dir}/clang_x64/arkcompiler/ets_runtime:'
132 f'{product_dir}/clang_x64/thirdparty/icu')
133 libs_dir_x64_debug = (f'{self.ohdir}/prebuilts/clang/ohos/linux-x86_64/llvm/lib:'
134f'{product_dir}/clang_x64/exe.unstripped/clang_x64/arkcompiler/ets_runtime:'
135f'{product_dir}/clang_x64/lib.unstripped/clang_x64/arkcompiler/ets_runtime:'
136 f'{product_dir}/clang_x64/lib.unstripped/clang_x64/test/test:'
137 f'{product_dir}/clang_x64/lib.unstripped/clang_x64/thirdparty/icu')
138 …libs_dir_arm64_release = (f'{self.ohdir}/prebuilts/clang/ohos/linux-x86_64/llvm/lib/aarch64-linux-…
139 f'{product_dir}/arkcompiler/ets_runtime/:'
140 f'{product_dir}/utils/utils_base/:'
141 f'{product_dir}/thirdparty/icu:'
142 f'{product_dir}/common/dsoftbus/:'
143 f'{product_dir}/commonlibrary/c_utils:'
144 f'{product_dir}/systemabilitymgr/samgr:'
145 f'{product_dir}/hiviewdfx/hisysevent_native:'
146 f'{product_dir}/common/common:'
147 f'{product_dir}/securec/thirdparty_bounds_checking_function:'
148 f'{product_dir}/hiviewdfx/faultloggerd:'
149 f'{product_dir}/thirdparty/bounds_checking_function:'
150 f'{product_dir}/hiviewdfx/hilog_native:'
151 f'{product_dir}/startup/init:'
152 f'{product_dir}/thirdparty/cjson:'
153 f'{product_dir}/lib.unstripped/common/dsoftbus:'
154 f'{product_dir}/security/selinux:'
155 f'{product_dir}/hiviewdfx/hitrace_native/:'
156 f'{product_dir}/communication/ipc/:'
157 f'{product_dir}/distributedschedule/samgr_standard:'
158 f'{product_dir}/security/access_token:'
159 f'{product_dir}/communication/dsoftbus:'
160 f'{product_dir}/startup/startup_l2/:'
161 f'{product_dir}/security/huks/:'
162 f'{product_dir}/clang_x64/thirdparty/icu/:'
163 f'{product_dir}/clang_x64/arkcompiler/ets_runtime')
164 …libs_dir_arm64_debug = (f'{self.ohdir}/prebuilts/clang/ohos/linux-x86_64/llvm/lib/aarch64-linux-oh…
165 f'{product_dir}/lib.unstripped/arkcompiler/ets_runtime/:'
166 f'{product_dir}/utils/utils_base/:'
167 f'{product_dir}/thirdparty/icu:'
168 f'{product_dir}/common/dsoftbus/:'
169 f'{product_dir}/commonlibrary/c_utils:'
170 f'{product_dir}/systemabilitymgr/samgr:'
171 f'{product_dir}/hiviewdfx/hisysevent_native:'
172 f'{product_dir}/common/common:'
173 f'{product_dir}/securec/thirdparty_bounds_checking_function:'
174 f'{product_dir}/hiviewdfx/faultloggerd:'
175 f'{product_dir}/thirdparty/bounds_checking_function:'
176 f'{product_dir}/hiviewdfx/hilog_native:'
177 f'{product_dir}/startup/init:'
178 f'{product_dir}/thirdparty/cjson:'
179 f'{product_dir}/security/selinux:'
180 f'{product_dir}/hiviewdfx/hitrace_native/:'
181 f'{product_dir}/communication/ipc/:'
182 f'{product_dir}/distributedschedule/samgr_standard:'
183 f'{product_dir}/security/access_token:'
184 f'{product_dir}/communication/dsoftbus:'
185 f'{product_dir}/startup/startup_l2/:'
186 f'{product_dir}/security/huks/:'
187 f'{product_dir}/clang_x64/thirdparty/icu/:'
188 f'{product_dir}/clang_x64/arkcompiler/ets_runtime')
192 icu_arg = f'--icu-data-path={self.ohdir}/third_party/icu/ohos_icu4j/data'
194 self.compiler = f'{product_dir}/{bins_dir[0][args.debug]}/ets_runtime/ark_aot_compiler'
195 self.jsvm = f'{product_dir}/{bins_dir[self.arm64][args.debug]}/ets_runtime/ark_js_vm'
196 self.ts2abc = f'{product_dir}/clang_x64/arkcompiler/ets_frontend/build/src/index.js'
201 self.aot_args = f'{self.aot_args} --builtins-dts={self.builtin}.abc'
205 …self.aot_args = (f'{self.aot_args} --enable-pgo-profiler=true --pgo-hotness-threshold={args.pgo_th…
206 f' --pgo-profiler-path=pgo_file_name.ap')
208 self.aot_args = f'{self.aot_args} {args.aot_args}'
210 self.jsvm_args = f'{self.jsvm_args} {args.jsvm_args}'
212 self.aot_args = f'{self.aot_args} --log-level=info'
213 self.jsvm_args = f'{self.jsvm_args} --log-level=info'
220 self.aot_args = f'{self.aot_args} --target-triple=aarch64-unknown-linux-gnu'
225 print(f'export LD_LIBRARY_PATH={self.libs_dir}')
229 os.system(f'cd {index_dir}/.. && npm install')
241 with open(f'{hap_dir}/module.json') as f:
242 data = json.load(f)
250 basename = os.path.basename(f'{file}')
254 out_case_dir = f'{dir}'
259 hap_dir = os.path.abspath(f'{out_case_dir}/..')
262 abc_file = f'{os.path.splitext(file)[0]}.abc'
264 pgo_file = f'{hap_dir}/ap/{module_name}'
267 'abc': f'node --expose-gc {self.ts2abc} {file} --merge-abc',
268 'pack': [f'mkdir -p {out_case_dir}/../an/arm64-v8a',
269 f'mv {out_case_dir}/{name}.an {hap_dir}/an/arm64-v8a/{module_name}.an',
270 f'mv {out_case_dir}/{name}.ai {hap_dir}/an/arm64-v8a/{module_name}.ai',
271f'cd {out_case_dir}/.. && rm -f ../{hap_name}.hap && zip -r -q ../{hap_name}.hap *',
272 f'mv {hap_dir}/an/arm64-v8a/{module_name}.an {out_case_dir}/{name}.an',
273 f'mv {hap_dir}/an/arm64-v8a/{module_name}.ai {out_case_dir}/{name}.ai',
274 f'rm -rf {hap_dir}/an'],
275 'aot': f'{self.compiler} {self.aot_args} --aot-file={out_case_dir}/{name} {abc_file}',
276 …'aotd': f'{self.runnerd} {self.compiler} {self.aot_args} --aot-file={out_case_dir}/{name} {abc_fil…
277 …'run': f'{self.runner} {self.jsvm} {self.jsvm_args} --aot-file={out_case_dir}/{name} --entry-point…
278 …'rund': f'{self.runnerd} {self.jsvm} {self.jsvm_args} --aot-file={out_case_dir}/{name} --entry-poi…
279 'asmint': f'{self.runner} {self.jsvm} {self.jsvm_args} --entry-point={name} {abc_file}',
280 … 'asmintd': f'{self.runnerd} {self.jsvm} {self.jsvm_args} --entry-point={name} {abc_file}',
281 …'int': f'{self.runner} {self.jsvm} {self.jsvm_args} --asm-interpreter=0 --entry-point={name} {abc_…
282 …'intd': f'{self.runnerd} {self.jsvm} {self.jsvm_args} --asm-interpreter=0 --entry-point={name} {ab…
283 … 'clean': f'rm -f {out_case_dir}/{name}.abc {out_case_dir}/{name}.an {out_case_dir}/{name}.ai',
284 'cleanhap': f'rm -rf {hap_dir}/an {out_case_dir}/{name}.an {out_case_dir}/{name}.ai'}
286 cmd = f'node --expose-gc {self.ts2abc} {self.builtin}.ts -m --merge-abc -q -b'
297 an_size = os.path.getsize(f'{out_case_dir}/{name}.an') / 1024
298 print(f'test: {file} abc_size: {abc_size: .1f}KB an_size: {an_size:.1f}KB '
299 f'expand: {an_size / abc_size: .1f} time: {perf_end - perf_start: .1f}s')
305 print(f'packed hap: {hap_name}.hap')
308 if os.path.isfile(f'{hap_dir}/{self.hap_abc}'):
315 print(f'gdb-client start: gdb-multiarch {self.jsvm}')
316 print(f'gdb-server connect: target remote:123456')
336 print_fail(f'FAIL: {file}')
338 expect_file = f'{os.path.dirname(file)}/{self.expect}'
344 print(f'expect: [{expect}]\nbut got: [{out[1]}]')
345 print_fail(f'FAIL: {file}')
347 print_pass(f'PASS: {file}')
349 print_pass(f'PASS: {file}')
354 print(f'Ran tests: {self.test_count}')
355 print(f'Ran failed: {fail_count}')
390 hap_dir = f'{os.path.splitext(file)[0]}.aot'
391 os.system(f'mkdir -p {hap_dir} && unzip -o -q {file} -d {hap_dir}')
392 file = f'{hap_dir}/{self.hap_abc}'
401 print(f'not supported step: {self.step}')
408 print(f'input path no test case: {self.args.name}')
414 print(f'input path not exists or is file: {self.args.name}')
428 print(f'input path no test case: {self.args.name}')
436 print(f'\033[32;2m{str}\033[0m')
440 print(f'\033[31;2m{str}\033[0m')