test: fix tap output check

Only report as an error when status != 0.

Stops the platform_output test from being reported as having failed
on Jenkins.

This is a back-port of commit 1821bba from the master branch.
test: fix tap output even when ok but have output

This is a back-port of commit 49d2ae3 from the master branch.