Fixes to test runner code

Change-Id: Ida457d90dcc0d796e403830c4151c726b2a1f28a