Don't test internal header files including mimalloc on macOS since
mimalloc emits compiler warnings:
In file included from extension.cpp:21:
In file included from Include/internal/pycore_backoff.h:15:
In file included from Include/internal/pycore_interp_structs.h:15:
In file included from Include/internal/pycore_tstate.h:14:
In file included from Include/internal/pycore_mimalloc.h:43:
Include/internal/mimalloc/mimalloc.h:464:85: error: defaulted
function definitions are a C++11 extension
[-Werror,-Wc++11-extensions]
mi_stl_allocator() mi_attr_noexcept = default;
^
Include/internal/mimalloc/mimalloc.h:465:85: error: defaulted
function definitions are a C++11 extension
[-Werror,-Wc++11-extensions]
mi_stl_allocator(const mi_stl_allocator&) mi_attr_noexcept = default;
Log also CXX and CXXFLAGS env vars in test_cppext. Log also CPPFLAGS
in test_cext.
Disable pedantic check for c++03 (unlimited API)
Also add a check for c++03 *limited* API, which passes in pedantic mode
after removing a comma in the `PySendResult` declaration, and allowing
`long long`.
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.
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.
* Move test_cppext to its own directory
* Rename setup_testcppext.py to setup.py
* Rename _testcppext.cpp to extension.cpp
* The source (extension.cpp) is now also copied by the test.
2023-08-22 18:30:18 +00:00
Renamed from Lib/test/setup_testcppext.py (Browse further)