Commit 022401f9 by Gert Wollny Committed by Commit Bot

Capture/Replay: Print context diff also with frame gaps

The capture/replay context differences may not be in each frame, so if the test signals that comparisons fail, don't bail if the context JSON files are not found for one frame, but continue the search until all possibly captured frames have been checked Bug: angleproject:5953 Change-Id: I8af34cc0fe4de5615fc43ef6c45915055546f507 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2891772 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com>
parent 31cd0e98
...@@ -487,6 +487,8 @@ class Test(): ...@@ -487,6 +487,8 @@ class Test():
class TestBatch(): class TestBatch():
CAPTURE_FRAME_END = 100
def __init__(self, use_goma, batch_count, keep_temp_files, goma_dir, verbose): def __init__(self, use_goma, batch_count, keep_temp_files, goma_dir, verbose):
self.use_goma = use_goma self.use_goma = use_goma
self.tests = [] self.tests = []
...@@ -505,7 +507,7 @@ class TestBatch(): ...@@ -505,7 +507,7 @@ class TestBatch():
# set the static environment variables that do not change throughout the script run # set the static environment variables that do not change throughout the script run
env = os.environ.copy() env = os.environ.copy()
env['ANGLE_CAPTURE_FRAME_END'] = '100' env['ANGLE_CAPTURE_FRAME_END'] = '{}'.format(self.CAPTURE_FRAME_END)
env['ANGLE_CAPTURE_SERIALIZE_STATE'] = '1' env['ANGLE_CAPTURE_SERIALIZE_STATE'] = '1'
env['ANGLE_CAPTURE_ENABLED'] = '1' env['ANGLE_CAPTURE_ENABLED'] = '1'
...@@ -636,9 +638,10 @@ class TestBatch(): ...@@ -636,9 +638,10 @@ class TestBatch():
captured_context, replayed_context, fromfile=capture_file, captured_context, replayed_context, fromfile=capture_file,
tofile=replay_file): tofile=replay_file):
print(line, end="") print(line, end="")
frame = frame + 1
else: else:
break if frame > self.CAPTURE_FRAME_END:
break
frame = frame + 1
def FindTestByLabel(self, label): def FindTestByLabel(self, label):
for test in self.tests: for test in self.tests:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment