Skip to content

Commit

Permalink
Do not assume all images are actually produced/retrieved (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
hevrard authored Nov 29, 2018
1 parent 1e794e1 commit 622e908
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/src/main/python/drivers/vkrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@ def run_android(vert, frag, json, skip_render):
# different, or missing
for i in range(1, NUM_RENDER):
next_image = resdir + '/image_{}.png'.format(i)
if not filecmp.cmp(ref_image, next_image, shallow=False):
if not os.path.exists(next_image):
status = 'UNEXPECTED_ERROR'
with open(LOGFILE, 'a') as f:
f.write('\n Not all images are produce? Missing image: {}\n'.format(i))
elif not filecmp.cmp(ref_image, next_image, shallow=False):
status = 'NONDET'
shutil.copy(ref_image, 'nondet0.png')
shutil.copy(next_image, 'nondet1.png')
Expand Down

0 comments on commit 622e908

Please sign in to comment.