diff --git a/test/runner/runner_js.py b/test/runner/runner_js.py index 6d18d102fcff18ec9e284f03c32b5759447c1da4..7e890b22813a252e5fd307080f19572c4d367aca 100644 --- a/test/runner/runner_js.py +++ b/test/runner/runner_js.py @@ -49,6 +49,10 @@ class RunnerJS(Runner): for san in ["ASAN_OPTIONS", "TSAN_OPTIONS", "MSAN_OPTIONS", "LSAN_OPTIONS"]: # we don't want to interpret asan failures as SyntaxErrors self.cmd_env[san] = ":exitcode=255" + + if args.generate_profraw: + self.cmd_env['LLVM_PROFILE_FILE'] = ('%s/tmp-%s-coverage/%s-%s.profraw') % ( + self.build_dir, name, name, '%m_pid-%p') self.es2panda = path.join(self.build_dir, "bin", "es2panda") if not path.isfile(self.es2panda): diff --git a/test/runner/starter.py b/test/runner/starter.py index 51d5e642548e60aedd7bb7d0a4d88016d42d5314..f3a3e5127726994aeb9d3574d11728e3faefaf96 100644 --- a/test/runner/starter.py +++ b/test/runner/starter.py @@ -136,5 +136,9 @@ def get_args(): parser.add_argument( '--time-report', action='store_true', dest='time_report', default=False, help='Log execution test time') + + parser.add_argument( + '--generate-profraw-files', action='store_true', dest='generate_profraw', default=False, + help='Generate .profraw files when binaries run') return parser.parse_args()