Commit Graph

12 Commits

Author SHA1 Message Date
Victor Stinner 43709d5d54
Check for compiler warnings in test_cext on Windows (#121088)
On Windows, test_cext and test_cppext now pass /WX flag to the MSC
compiler to treat all compiler warnings as errors. In verbose mode,
these tests now log the compiler commands to help debugging.

Change Py_BUILD_ASSERT_EXPR implementation on Windows to avoid a
compiler warning about an unnamed structure.
2024-06-28 14:41:37 +02:00
Victor Stinner b7a95dfee3
gh-120593: Check -Wcast-qual flag in test_cext (#121081)
Check the usage of the 'const' qualifier in the Python C API in
test_cext.
2024-06-27 10:22:48 +00:00
Victor Stinner 587388ff22
gh-118124: Use static_assert() in Py_BUILD_ASSERT() on C11 (#118398)
Use static_assert() in Py_BUILD_ASSERT() and Py_BUILD_ASSERT_EXPR()
on C11 and newer and C++11 and newer.

Add tests to test_cext and test_cppext.
2024-04-30 22:29:48 +02:00
Sam Gross 42205143f8
gh-117478: Add `@support.requires_gil_enabled` decorator (#117479)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-04-04 14:10:46 -04:00
Victor Stinner f4cc77d494
gh-116869: Enable -Werror in test_cext for Free Threading (#117106)
Check for warnings, but don't enable the compiler flag
-Werror=declaration-after-statement.
2024-03-21 00:06:24 +01:00
Victor Stinner d5ebf8b71f
gh-116869: Fix test_cext for Free Threading (#117043)
Don't check for warnings on Free Threading.
2024-03-19 23:23:17 +01:00
Victor Stinner 438de10c16
gh-116869: Fix test_cext on RHEL7 (#117010)
Remove -std option from CC command line.

Skip C++14 test for now on non-Windows platforms (like RHEL7).
2024-03-19 22:58:13 +01:00
Victor Stinner a114d08a89
gh-92906: Enable test_cext and test_cppext on Windows (#117000)
On Windows in release mode, the test_cext and test_cppext can now
build C and C++ extensions.

* test_cext now also builds the C extension without options.
* test_cppext now also builds the C++ extension without options.
* Add C++14 test to test_cppext; C++11 is not supported by MSVC.
* Make setup_venv_with_pip_setuptools_wheel() quiet when
  support.verbose is false. Only show stdout and stderr on failure.
2024-03-19 14:03:27 +00:00
Victor Stinner 1312094b39
gh-116869: Test the limited C API in test_cext (#116995) 2024-03-19 12:19:45 +00:00
Victor Stinner 5405e9e5b5
gh-116869: Build test_cext with -Werror=declaration-after-statement (#116990)
Make sure that the C API does not emit compiler warnings when built
with -Werror=declaration-after-statement.
2024-03-19 12:05:22 +01:00
Victor Stinner 1d82a41235
gh-116869: Enable test_cext and test_cppext on Free Threading build (#116973)
Remove the "if Py_GIL_DISABLED" skip and move all "skip" decorators
to the class. Use support.check_sanitizer()
2024-03-18 23:14:29 +00:00
Victor Stinner 590a26010d
gh-116869: Add test_cext test: build a C extension (#116954) 2024-03-18 20:15:20 +01:00