Lines Matching refs:args

67 def run_micropython(pyb, args, test_file, is_special=False):  argument
82 args = [MICROPYTHON]
87 args += [str(c, 'utf-8') for c in line[10:].strip().split()]
117 p = subprocess.Popen(args, stdin=slave, stdout=slave,
135 … output_mupy = subprocess.check_output(args + [test_file], stderr=subprocess.STDOUT)
143 cmdlist = [MICROPYTHON, '-X', 'emit=' + args.emit]
144 if args.heapsize is not None:
145 cmdlist.extend(['-X', 'heapsize=' + args.heapsize])
148 if args.via_mpy:
149 …subprocess.check_output([MPYCROSS] + args.mpy_cross_flags.split() + ['-o', 'mpytest.mpy', '-X', 'e…
162 if args.via_mpy:
167 if (args.target == 'haas100'):
173 if not is_special and e.args[0] == 'exception':
174 output_mupy = e.args[1] + e.args[2] + b'CRASH'
183 if not is_special and e.args[0] == 'exception':
184 output_mupy = e.args[1] + e.args[2] + b'CRASH'
237 def run_feature_check(pyb, args, base_path, test_file): argument
241 return run_micropython(pyb, args, base_path("feature_check", test_file), is_special=True)
244 def run_tests(pyb, tests, args, result_dir): argument
269 if not (args.list_tests or args.write_exp):
275 output = run_feature_check(pyb, args, base_path, 'native_check.py')
280 output = run_feature_check(pyb, args, base_path, 'int_big.py')
285 output = run_feature_check(pyb, args, base_path, 'bytearray.py')
290 output = run_feature_check(pyb, args, base_path, 'set_check.py')
295 output = run_feature_check(pyb, args, base_path, 'slice.py')
300 output = run_feature_check(pyb, args, base_path, 'async_check.py')
305 output = run_feature_check(pyb, args, base_path, 'const.py')
310 output = run_feature_check(pyb, args, base_path, 'reverse_ops.py')
315 output = run_feature_check(pyb, args, base_path, 'uio_module.py')
320 t = run_feature_check(pyb, args, base_path, 'repl_emacs_check.py')
325 t = run_feature_check(pyb, args, base_path, 'repl_words_move_check.py')
329 upy_byteorder = run_feature_check(pyb, args, base_path, 'byteorder.py')
330 upy_float_precision = run_feature_check(pyb, args, base_path, 'float.py')
335 has_complex = run_feature_check(pyb, args, base_path, 'complex.py') == b'complex\n'
336 has_coverage = run_feature_check(pyb, args, base_path, 'coverage.py') == b'coverage\n'
390 if args.target == 'unix':
397 if args.target != 'unix':
402 if args.target == 'wipy':
409 elif args.target == 'esp8266':
411 elif args.target == 'minimal':
416 elif args.target == 'nrf':
424 elif args.target == 'qemu-arm':
437 if args.emit == 'native':
463 if args.filters:
465 verdict = "include" if args.filters[0][0] == "exclude" else "exclude"
466 for action, pat in args.filters:
474 …is_native = test_name.startswith("native_") or test_name.startswith("viper_") or args.emit == "nat…
496 if args.list_tests:
516 if args.write_exp:
525 if args.write_exp:
529 output_mupy = run_micropython(pyb, args, test_file)
556 if args.list_tests:
577 def __call__(self, parser, args, value, option): argument
578 if not hasattr(args, self.dest):
579 args.filters = []
584 args.filters.append((option, re.compile(value)))
629 args = cmd_parser.parse_args()
631 if args.print_failures:
632 for exp in glob(os.path.join(args.result_dir, "*.exp")):
640 if args.clean_failures:
641 …for f in glob(os.path.join(args.result_dir, "*.exp")) + glob(os.path.join(args.result_dir, "*.out"…
648 if args.target in LOCAL_TARGETS or args.list_tests:
650 elif args.target in EXTERNAL_TARGETS:
651 if (args.target == 'haas100'):
655 pyb = haasboard.HaaSboard(args.device, args.baudrate, args.user, args.password)
661 pyb = pyboard.Pyboard(args.device, args.baudrate, args.user, args.password)
666 if len(args.files) == 0:
667 if args.test_dirs is None:
669 if args.target == 'pyboard':
672 elif args.target in ('esp8266', 'esp32', 'minimal', 'nrf'):
674 elif args.target == 'wipy':
677 elif args.target == 'unix':
680 elif args.target == 'qemu-arm':
681 if not args.write_exp:
688 test_dirs = args.test_dirs
692 tests = args.files
694 if not args.keep_path:
699 os.makedirs(args.result_dir, exist_ok=True)
700 res = run_tests(pyb, tests, args, args.result_dir)