Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TST: Refactor to consistently use CompilerChecker #27051

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 7 commits into from
Jul 26, 2024

Conversation

HaoZeke
Copy link
Member

@HaoZeke HaoZeke commented Jul 26, 2024

Closes #27045, by using the CompilerChecker object to make sure tests which would need a compiler are skipped correctly.

TODO

  • Documentation addition detailing the no-compiler and CompilerChecker bits in f2py-testing.rst.

Implementation note

  • CompilerChecker basically runs meson, so if there are environments where the tests may be run without meson being installed at all then this needs to be reworked.
    • Like all the failing Windows builds In these scenarios the compiled tests can be skipped anyway.
  • Soft reverts 17f529a

@HaoZeke
Copy link
Member Author

HaoZeke commented Jul 26, 2024

The remaining test failures on Windows are real errors, not related to the compiler presence, which were previously being suppressed. (though I might still end up skipping them for now since they seem to be linking errors, i.e. system configuration related issues). These will be handled eventually with #25134 anyway.

2024-07-26T14:35:17.6418897Z FAILED: test_array_from_pyobj_ext.cp310-win32.pyd 
2024-07-26T14:35:17.6419172Z 
2024-07-26T14:35:17.6423831Z "link"  /MACHINE:x86 /OUT:test_array_from_pyobj_ext.cp310-win32.pyd test_array_from_pyobj_ext.cp310-win32.pyd.p/112443d308cc40139cb5e53d97c4d31678bcb07b_f2py_tests_src_array_from_pyobj_wrapmodule.c.obj test_array_from_pyobj_ext.cp310-win32.pyd.p/26ebc5753ea73c490d2b7fd0b1c7c485b8e26306_.._.._f2py_src_fortranobject.c.obj "/LIBPATH:C:/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0" "/LIBPATH:C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0" "/LIBPATH:C:/mingw64/lib/gcc" "/LIBPATH:C:/mingw64/bin/../lib/gcc" "/LIBPATH:C:/mingw64/x86_64-w64-mingw32/lib" "/LIBPATH:C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib" "/LIBPATH:C:/mingw64/lib" "/LIBPATH:C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib" "/LIBPATH:C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib" "/LIBPATH:C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../.." "/release" "/nologo" "/OPT:REF" "/DLL" "/IMPLIB:test_array_from_pyobj_ext.cp310-win32.lib" "C:\hostedtoolcache\windows\Python\3.10.11\x86\libs\python310.lib" "quadmath.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "comdlg32.lib" "advapi32.lib" "gfortran.lib"
2024-07-26T14:35:17.6428982Z 
2024-07-26T14:35:17.6429200Z LINK : fatal error LNK1181: cannot open input file 'quadmath.lib'

@HaoZeke HaoZeke force-pushed the fixCompilerAvail branch 2 times, most recently from 25ae7a5 to 6e08788 Compare July 26, 2024 15:00
@mattip
Copy link
Member

mattip commented Jul 26, 2024

Is skipping windows f2py CI critical enough that this should wait for #25134?

As per the existing NumPy situation..
@HaoZeke HaoZeke force-pushed the fixCompilerAvail branch from 6e08788 to 115c8c6 Compare July 26, 2024 15:04
@HaoZeke
Copy link
Member Author

HaoZeke commented Jul 26, 2024

Is skipping windows f2py CI critical enough that this should wait for #25134?

I think skipping here is OK since this PR is mostly a regression fix to unblock conda-forge, reported in #27045.

However, I'll try to get #25134 ready ASAP, just need to find some time to test on a clean Windows machine.

@HaoZeke
Copy link
Member Author

HaoZeke commented Jul 26, 2024

Should be good to go for now.

@HaoZeke HaoZeke requested review from rgommers and mattip July 26, 2024 16:36
@rgommers
Copy link
Member

Thanks @HaoZeke! Changes LGTM; I'm testing this the lazy way to be sure: pushed a commit to trigger wheel builds.

@rgommers
Copy link
Member

CompilerChecker basically runs meson, so if there are environments where the tests may be run without meson being installed at all then this needs to be reworked.

It's a required test dependency also outside of f2py, so should be fine. Only ninja may be missing in a Pyodide environment, but CI wasn't complaining.

Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

All happy, so let's give it a go - thanks Rohit!

@rgommers rgommers added this to the 2.1.0 release milestone Jul 26, 2024
@rgommers rgommers merged commit d5f3776 into numpy:main Jul 26, 2024
106 checks passed
@HaoZeke HaoZeke deleted the fixCompilerAvail branch July 26, 2024 21:22
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Jul 27, 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.

BUG: tests depend on availability of fortran compiler
4 participants