diff --git a/python/src/main/python/drivers/vkrun.py b/python/src/main/python/drivers/vkrun.py index 7f9765579..dc0ce158e 100755 --- a/python/src/main/python/drivers/vkrun.py +++ b/python/src/main/python/drivers/vkrun.py @@ -26,7 +26,7 @@ LOGFILE = 'vklog.txt' TIMEOUT_RUN = 30 -NUM_RENDER=3 +NUM_RENDER = 3 ################################################################################ # Common @@ -127,17 +127,15 @@ def run_android(vert, frag, json, skip_render): adb('push ' + frag + ' ' + ANDROID_SDCARD + '/test.frag.spv') adb('push ' + json + ' ' + ANDROID_SDCARD + '/test.json') + adb('logcat -c') + cmd = 'shell am start -n ' + ANDROID_APP + '/android.app.NativeActivity' + flags = '--num-render {}'.format(NUM_RENDER) if skip_render: - adb('shell touch ' + ANDROID_SDCARD + '/SKIP_RENDER') - - adb('logcat -c') - cmd = ANDROID_APP + '/android.app.NativeActivity' - # Explicitely set all options, don't rely on defaults - flags = '--num-render {} --png-template image --sanity-before sanity_before.png --sanity-after sanity_after.png'.format(NUM_RENDER) + flags += ' --skip-render' # Pass command line args as Intent extra. Need to nest-quote, hence the "\'blabla\'" - cmd += '-e gfz "\'' + flags + '\'"' - adb('shell am start ' + ANDROID_APP + '/android.app.NativeActivity') + cmd += ' -e gfz "\'' + flags + '\'"' + adb(cmd) # Busy wait deadline = time.time() + TIMEOUT_APP