"ebuild ... test" will create $WORKDIR/../.tested EVEN if the src_test fails On the *first* time it fails, the return code shows error if an error happened. But running "ebuild ... test" again, when the .tested file exists, makes it NOT run the tests again, and it returns success. I think this behavior should change: 1. If src_test failed, the next run should do it again (just like a failed configure/compile/install). 2. Alternatively, the return code from the prior run should be the same. 3. As a bonus, being able to query the previous result without rebuilding would enable some scripting improvements. 4. related idea: maybe convert the existing files of ".{pretend,setup,unpack,prepare,configure,compile,install}ed" instead to: 4.1. .${PHASE}.started 4.2. .${PHASE}.completed 4.3. .${PHASE}.failed or some other way to let a developer see that the phase started AND failed before.