Skip to content

gh-109276: regrtest: shorter list of resources #110326

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

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Oct 4, 2023

@vstinner vstinner force-pushed the regrtest_resources branch from 73ad79e to 68f2ade Compare October 4, 2023 06:54
@vstinner
Copy link
Member Author

vstinner commented Oct 4, 2023

Examples:

$ ./python -m test -u network
== resources (1): network

$ ./python -m test --slow-ci
== resources: all

$ ./python -m test --fast-ci
== resources: all, -cpu


$ ./python -m test -u all,tzdata
== resources: all, +tzdata

$ ./python -m test 
== resources: all test resources are disabled, use -u option to unskip tests

@vstinner
Copy link
Member Author

vstinner commented Oct 4, 2023

@serhiy-storchaka: Does it look better like that?

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not have problems with the older output, but if you want to change it, the new one looks better.

Did you consider the idea of making it compatible with the input to the -u option? I.e. remove space after comma and remove plus sign. Alternatively you can make -u accepting input with spaces and pluses (although copying text with spaces is less convenient). Not that I personally need this feature, but it might come in handy one day.

@vstinner
Copy link
Member Author

vstinner commented Oct 4, 2023

Did you consider the idea of making it compatible with the input to the -u option? I.e. remove space after comma and remove plus sign.

Done.

Use sorted() for deterministic result.

Done.

@vstinner vstinner enabled auto-merge (squash) October 4, 2023 09:07
for name in sorted(all_resources - use_resources):
relative_all.append(f'-{name}')
for name in sorted(use_resources - all_resources):
relative_all.append(f'{name}')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
relative_all.append(f'{name}')
relative_all.append(name)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right. Sadly, I saw your comment after the change was merged. I make try to include it in my next regrtest change ;-)

@vstinner vstinner merged commit efd8c7a into python:main Oct 4, 2023
@vstinner vstinner deleted the regrtest_resources branch October 4, 2023 09:39
@vstinner
Copy link
Member Author

vstinner commented Oct 4, 2023

I did not have problems with the older output

For me, it's not easy to know if it's default --slow-ci option, default --fast-ci option, or if -u options were modified on a buildbot. With the new output relative to -u all, it should be easier to guess the test config.

Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants