Lines Matching refs:file
7 you may not use this file except in compliance with the License.
42 parser.add_argument('--file', metavar='FILE', help="File to test")
64 f'This file is outside the scope of validation : {filepath}\n')
70 print(f'Error : {filepath}.The file is empty')
73 def run_test(file, tool, flag=False):
74 path_list = file.split(os.sep)
76 file = "." + os.sep + file
77 out_file_path = file.replace(TEST_PATH, OUT_PATH).replace(TS_EXT, TXT_EXT)
78 temp_out_file_path = file.replace(TS_EXT, TXT_EXT)
79 temp_abc_file_path = file.replace(TS_EXT, ABC_EXT)
89 if file in IMPORT_TEST['import'] + IMPORT_TEST['m_parameter']:
90 command_os(['node', '--expose-gc', tool, '-m', file, '--output-type'])
92 command_os(['node', '--expose-gc', tool, file, '--output-type'])
118 if args.file:
119 if skip(args.file, True):
120 if args.file in IMPORT_TEST['import']:
121 run_test(args.file, ark_frontend_tool, True)
122 result = compare(args.file, True)
125 run_test(args.file, ark_frontend_tool)
126 result = compare(args.file)
131 for file in files:
132 test_path = f'{root}/{file}'
143 elif args.file is None and args.dir is None:
145 for file in files:
146 test_path = f'{root}/{file}'
193 def compare(file, flag=False):
195 path_list = file.split(os.sep)
197 file = "." + os.sep + file
198 out_path = file.replace(TEST_PATH, OUT_PATH).replace(TS_EXT, TXT_EXT)
199 expect_path = file.replace(TEST_PATH, EXPECT_PATH).replace(TS_EXT, TXT_EXT)
213 print("There are no expected files or validation file generation: %s", file)
214 result = f'FAIL {file}\n'
223 result = f'PASS {file}\n'
225 result = f'FAIL {file}\n'
284 # output path for abc file generation
295 for file in files:
296 abc_file = os.path.abspath(os.path.join(outpath, '%s.abc' % os.path.splitext(os.path.basename(file))[0]))
297 cmd = ['node', '--expose-gc', ark_frontend_tool, os.path.abspath(file),
304 fail_list.append(file)
309 expected_file = "%s-expected.txt" % (os.path.splitext(file)[0])
318 fail_list.append(file)