Instead of setting 'passed' to 'y' on test success, use a 'leave_data' flag that is set to 'y' on test failure.

This ensures tests which make multiple calls to "debug" or "check" leave data
behind if any of those calls fail.
Merge pull request #1147 from rocallahan/pass-flag

Instead of setting 'passed' to 'y' on test success, use a 'leave_data' f...