Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 835695 - "ebuild ... test" creates .tested file even on failure, and wrongly returns success return code on repeat test runs
Summary: "ebuild ... test" creates .tested file even on failure, and wrongly returns s...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-20 21:57 UTC by Robin Johnson
Modified: 2022-03-21 13:45 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2022-03-20 21:57:37 UTC
"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.