Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit 6faf146

Browse files
obastemurchakrabot
authored andcommitted
deps: update ChakraCore to chakra-core/ChakraCore@db6afe6a8f
[1.8>1.9] [MERGE #4671 @obastemur] lldb-out: improve testing with lldb debugger attached Merge pull request #4671 from obastemur:easier_flaky_detect Trying to get the stack trace for a flaky test. Having the output corrupted for each test run is making things a lot complicated Reviewed-By: chakrabot <[email protected]>
1 parent 3996e8e commit 6faf146

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

Diff for: deps/chakrashim/core/test/runtests.py

+14-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
parser.add_argument('--swb', action='store_true',
7272
help='use binary from VcBuild.SWB to run the test')
7373
parser.add_argument('--lldb', default=None,
74-
help='run a single test in lldb batch mode to get call stack and crash logs', action='store_true')
74+
help='run test suit with lldb batch mode to get call stack for crashing processes (ignores baseline matching)', action='store_true')
7575
parser.add_argument('-l', '--logfile', metavar='logfile',
7676
help='file to log results to', default=None)
7777
parser.add_argument('--x86', action='store_true',
@@ -469,17 +469,28 @@ def timeout_func(timeout_data):
469469
timeout_data[1] = True
470470
timeout = test.get('timeout', args.timeout) # test override or default
471471
timer = Timer(timeout, timeout_func, [timeout_data])
472+
skip_baseline_match = False
472473
try:
473474
timer.start()
474475
js_output = normalize_new_line(proc.communicate()[0])
475476
exit_code = proc.wait()
477+
# if -lldb was set; check if test was crashed before corrupting the output
478+
search_for = " exited with status = 0 (0x00000000)"
479+
if args.lldb != None and exit_code == 0 and js_output.index(search_for) > 0:
480+
js_output = js_output[0:js_output.index(search_for)]
481+
exit_pos = js_output.rfind('\nProcess ')
482+
if exit_pos > len(js_output) - 20: # if [Process ????? <seach for>]
483+
if 'baseline' not in test:
484+
js_output = "pass"
485+
else:
486+
skip_baseline_match = True
476487
finally:
477488
timer.cancel()
478489
test.done()
479490

480491
# shared _show_failed args
481492
fail_args = { 'test': test, 'flags': flags,
482-
'exit_code': exit_code, 'output': js_output };
493+
'exit_code': exit_code, 'output': js_output }
483494

484495
# check timed out
485496
if (timeout_data[1]):
@@ -498,7 +509,7 @@ def timeout_func(timeout_data):
498509
return self._show_failed(**fail_args)
499510
else:
500511
baseline = test.get('baseline')
501-
if baseline:
512+
if not skip_baseline_match and baseline:
502513
# perform baseline comparison
503514
baseline = self._check_file(folder, baseline)
504515
with open(baseline, 'rb') as bs_file:

0 commit comments

Comments
 (0)