-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Selftests user's default results directory cleanup #5557
Selftests user's default results directory cleanup #5557
Conversation
ef3688c
to
343cc0b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @richtja,
This is an effective fix, but it has one drawback: it makes the example jobs (which are intended to be consumed by inexperienced users) much more complex than needed.
The only solution, without such a drawback, that I can think of, is to add support for the datadir.paths.logs_dir
(aka --job-results-dir
) to also consider an environment variable as its default value. This is not something we do to a lot of (or any) options in Avocado, but it's pretty standard in Linux/UNIX applications.
If we add a lookup to an AVOCADO_JOB_RESULTS_DIR
environment variable, then we can add that only once to selftests/check.py
and not have to tweak (and "pollute") any of the examples.
What do you think?
Hi @clebergnu, I can see your point and agree that for an inexperienced user the examples might be confusing. But I don't like the idea that we will create an exception for |
343cc0b
to
c5975e2
Compare
OK, I agree. Let's then:
|
c5975e2
to
d7da5ab
Compare
So I separated examples from tests with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the preferable use of self.workdir
for avocado.Test
, this LGTM.
d7da5ab
to
97f0d8e
Compare
This will update selftests to not store temporary results in user's default results directory. Reference: avocado-framework#5554 Signed-off-by: Jan Richter <[email protected]>
Let's ensure that the selftests/check.py doesn't leave test results behind in user's default results directory. Reference: avocado-framework#5554 Signed-off-by: Jan Richter <[email protected]>
97f0d8e
to
3eb2673
Compare
I did the fix with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
This will update selftests to not store temporary results in user's
default results directory.
Reference: #5554
Signed-off-by: Jan Richter [email protected]