Skip to content

Make external compiler discovery lazy in the test suite. - #8661

Merged
sklam merged 3 commits into
numba:mainfrom
stuartarchibald:wip/lazy_aot_compiler_check
Jan 11, 2023
Merged

sklam merged 3 commits into
numba:mainfrom
stuartarchibald:wip/lazy_aot_compiler_check

Conversation

@stuartarchibald

Copy link
Copy Markdown
Contributor

This aims to make it so that external compilers are only probed when absolutely necessary and that the result of the probe is cached. This should speed up initialisation of the testing framework and consequently speed up tests running in subprocesses.

This aims to make it so that external compilers are only probed
when absolutely necessary and that the result of the probe is
cached. This should speed up initialisation of the testing
framework and consequently speed up tests running in subprocesses.
Comment thread numba/tests/test_pycc.py

def setUp(self):
super().setUp()
self.skip_if_no_external_compiler() # external compiler needed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I just checked whether it's OK to call skipTest() in a setUp() method, and it is: https://docs.python.org/3/library/unittest.html#skipping-tests-and-expected-failures

@sklam sklam left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Manually verified that the external_compiler_works is now lazy.
There's just one nitpick regarding an empty line added.

Comment thread numba/tests/test_pycc.py Outdated
@needs_external_compilers
class TestDistutilsSupport(TestCase):


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change

empty line

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, fixed in 8e43a67.

@sklam sklam added 4 - Waiting on author Waiting for author to respond to review and removed 3 - Ready for Review labels Jan 9, 2023
@stuartarchibald stuartarchibald added 4 - Waiting on reviewer Waiting for reviewer to respond to author and removed 4 - Waiting on author Waiting for author to respond to review labels Jan 10, 2023
@stuartarchibald stuartarchibald added this to the Numba 0.57 RC milestone Jan 10, 2023
@sklam sklam added 5 - Ready to merge Review and testing done, is ready to merge and removed 4 - Waiting on reviewer Waiting for reviewer to respond to author labels Jan 10, 2023
@sklam
sklam merged commit 9dd5062 into numba:main Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 - Ready to merge Review and testing done, is ready to merge Effort - short Short size effort needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants