speed up tests by caching checked paths in set_tmpdir + less test cases for test_compiler_dependent_optarch#3802
Merged
boegel merged 3 commits intoeasybuilders:developfrom Aug 19, 2021
Conversation
`run_cmd` is one of the slowest things we can do as it forks the whole process. In the check when setting a temp dir we run a dummy file to see if the folder is actually executable. This means running this check at least twice per test case and another time for each init_config call in the test amounting to e.g. 263 calls in a single test (test_compiler_dependent_optarch) So cache the results and don't repeat the run_cmd if it already succeeded for a parent folder. Likely no change at all in regular mode but really helps for the tests
The full product of options is not required to cover all cases. Instead run only with varying options per active toolchain and a single case (actually 2) for PGI This cuts down the combinations from 216 to 20 and runtime from ~1m to ~7s
6db2cf9 to
8e60b75
Compare
…ths in set_tmpdir
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Noticed that one test was particularly slow in #3797 so I dug a bit and came up with these issues:
See the commits for details