lang_tester icon indicating copy to clipboard operation
lang_tester copied to clipboard

run() exits

Open vext01 opened this issue 4 years ago • 3 comments

I have a branch on yk where the test harness runs the same tests with different flags. Each configuration sets up and tears down a dedicated lang_tester session.

I was surprised that testing ended after the first lang_tester session with errors was encountered. This is because run() exits.

I wonder, should we return a status to the caller, who can then decide what to do with failures?

vext01 avatar May 26 '21 13:05 vext01

Good question. lang_tester is slightly odd in that there are various places where it will simply exit when it finds a problem -- but most of those are of the form "the test input is ill-formed". The problem here is that I'm not sure what the right return type might be. Result<(), ()> feels a bit lame, but maybe it would be the least worst choice?

ltratt avatar Jun 21 '21 10:06 ltratt

How about Result<(), std::process::ExitStatus>?

vext01 avatar Jun 21 '21 10:06 vext01

Hmm, interesting. Let me chew on it for a bit.

ltratt avatar Jun 21 '21 10:06 ltratt