Merge "Trim output before testing" into oc-dev am: d3caca2e25 am: 5bc93dd953
am: 63a83204b4

Change-Id: I7ee77c0ec2eba3080d4295957577c31f4771adbf