lang_tester
lang_tester copied to clipboard
run() exits
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?
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?
How about Result<(), std::process::ExitStatus>?
Hmm, interesting. Let me chew on it for a bit.