diff --git a/stl/inc/algorithm b/stl/inc/algorithm index fc67058e8c8..c856f33f372 100644 --- a/stl/inc/algorithm +++ b/stl/inc/algorithm @@ -46,7 +46,7 @@ struct _Optimistic_temporary_buffer { // temporary storage with _alloca-like att } const pair<_Ty*, ptrdiff_t> _Raw = _Get_temporary_buffer<_Ty>(_Attempt); - if (_Raw.second > _Optimistic_count) { // engage heap space + if (static_cast(_Raw.second) > _Optimistic_count) { // engage heap space _Data = _Raw.first; _Capacity = _Raw.second; return; @@ -62,7 +62,7 @@ struct _Optimistic_temporary_buffer { // temporary storage with _alloca-like att _Optimistic_temporary_buffer& operator=(const _Optimistic_temporary_buffer&) = delete; ~_Optimistic_temporary_buffer() noexcept { - if (_Capacity > _Optimistic_count) { + if (static_cast(_Capacity) > _Optimistic_count) { _Return_temporary_buffer(_Data); } } diff --git a/stl/inc/cvt/one_one b/stl/inc/cvt/one_one index 52d7e72c0c6..de4c7e09e8f 100644 --- a/stl/inc/cvt/one_one +++ b/stl/inc/cvt/one_one @@ -58,7 +58,8 @@ namespace stdext { _Mid1 = _First1; _Mid2 = _First2; - while (_Bytes_per_word <= _Last1 - _Mid1 && _Mid2 != _Last2) { // convert a multibyte sequence + while (_Bytes_per_word <= static_cast(_Last1 - _Mid1) && _Mid2 != _Last2) { + // convert a multibyte sequence const auto _Ptr = reinterpret_cast(_Mid1); unsigned long _Ch = 0; @@ -147,7 +148,8 @@ namespace stdext { } } - while (_Mid1 != _Last1 && _Bytes_per_word <= _Last2 - _Mid2) { // convert and put a wide char + while (_Mid1 != _Last1 && _Bytes_per_word <= static_cast(_Last2 - _Mid2)) { + // convert and put a wide char unsigned long _Ch = static_cast(*_Mid1++); if (_Maxcode < _Ch) { diff --git a/stl/inc/cvt/sjis_0208 b/stl/inc/cvt/sjis_0208 index df52f0ab242..d2b2d89ac07 100644 --- a/stl/inc/cvt/sjis_0208 +++ b/stl/inc/cvt/sjis_0208 @@ -57,7 +57,7 @@ namespace stdext { // convert 2-byte code unsigned char _By2 = static_cast(*++_Mid1); - if ((_By2 < 0x40 || 0x7e < _By2) && (_By2 < 0x80 && 0xfc < _By2)) { // TRANSITION, VSO-609129 + if (_By2 < 0x40 || _By2 == 0x7f || _By2 > 0xfc) { return _Mybase::error; // bad second byte } diff --git a/stl/inc/exception b/stl/inc/exception index 95a16c6e8da..42539ed38d0 100644 --- a/stl/inc/exception +++ b/stl/inc/exception @@ -104,7 +104,7 @@ public: return _Ptr ? _Ptr : "unknown exception"; } - void __CLR_OR_THIS_CALL _Raise() const { // raise the exception + [[noreturn]] void __CLR_OR_THIS_CALL _Raise() const { // raise the exception if (_STD _Raise_handler) { (*_STD _Raise_handler)(*this); // call raise handler if present } @@ -171,7 +171,8 @@ inline terminate_handler __CRTDECL set_terminate(terminate_handler) noexcept { / return nullptr; } -inline void __CRTDECL terminate() noexcept { // handle exception termination +[[noreturn]] inline void __CRTDECL terminate() noexcept { // handle exception termination + _CSTD abort(); } _NODISCARD inline terminate_handler __CRTDECL get_terminate() noexcept { // get current terminate handler diff --git a/stl/inc/execution b/stl/inc/execution index 4fa6bdfa22e..edc68279a98 100644 --- a/stl/inc/execution +++ b/stl/inc/execution @@ -773,8 +773,8 @@ struct _Static_partition_team { // common data for all static partitioned ops _Diff _Unchunked_items; _Static_partition_team(const _Diff _Count_, const size_t _Chunks_) - : _Consumed_chunks{0}, _Chunks{_Chunks_}, _Count{_Count_}, _Chunk_size{_Count_ / static_cast<_Diff>(_Chunks_)}, - _Unchunked_items{_Count_ % static_cast<_Diff>(_Chunks_)} { + : _Consumed_chunks{0}, _Chunks{_Chunks_}, _Count{_Count_}, _Chunk_size{static_cast<_Diff>(_Count_ / static_cast<_Diff>(_Chunks_))}, + _Unchunked_items{static_cast<_Diff>(_Count_ % static_cast<_Diff>(_Chunks_))} { // Calculate common data for statically partitioning iterator ranges. // pre: _Count_ >= _Chunks_ && _Chunks_ >= 1 } diff --git a/stl/inc/random b/stl/inc/random index 941ab41595a..d80c8bee302 100644 --- a/stl/inc/random +++ b/stl/inc/random @@ -591,7 +591,7 @@ private: // CLASS TEMPLATE _Circ_buf FOR subtract_with_carry, subtract_with_carry_01, AND mersenne_twister template struct _Circ_buf { // holds historical values for generators - _Ty _At(int _Ix) const { + _Ty _At(size_t _Ix) const { return _Ax[_Base(_Ix)]; } @@ -637,7 +637,7 @@ struct _Circ_buf { // holds historical values for generators return true; } - unsigned int _Base(int _Ix = 0) const { + size_t _Base(size_t _Ix = 0) const { return (_Ix += _Idx) < _Nw ? (_Ix + _Nw) : (_Ix - _Nw); } @@ -736,7 +736,7 @@ protected: this->_Idx = _Rx; } - void _Setx(unsigned int _Ix, _Ty _Xis, _Ty _Xir) { // update _Ax[_Ix] and _Carry + void _Setx(size_t _Ix, _Ty _Xis, _Ty _Xir) { // update _Ax[_Ix] and _Carry bool _Underflowed = false; _Ty _Newx = _Xis; if (_Newx < _Xir) { @@ -827,7 +827,7 @@ struct _Swc_traits { // traits for subtract_with_carry generator // otherwise compute from last value int _Kx = _Get_wc(); - for (int _Ix = 0; _Ix < _Nw; ++_Ix) { // pack _Kx words + for (size_t _Ix = 0; _Ix < _Nw; ++_Ix) { // pack _Kx words _Ax[_Ix] = _Gx(); for (int _Jx = 1; _Jx < _Kx; ++_Jx) { _Ax[_Ix] |= static_cast<_Ty>(_Gx()) << (32 * _Jx); @@ -846,7 +846,7 @@ struct _Swc_traits { // traits for subtract_with_carry generator #pragma warning(disable : 4724) // potential mod by 0 static _Cy_t _Reduce(_Ty* _Ax) { // reduce values to allowed range if _CONSTEXPR_IF (_Mx != 0) { - for (int _Ix = 0; _Ix < _Nw; ++_Ix) { + for (size_t _Ix = 0; _Ix < _Nw; ++_Ix) { _Ax[_Ix] = _Ax[_Ix] % _Mx; } } @@ -860,7 +860,7 @@ struct _Swc_traits { // traits for subtract_with_carry generator basic_ostream<_Elem, _Traits>& _Ostr, const _Circ_buf<_Ty, _Nw>& _Buf, _Cy_t _Cy) { // write state to _Ostr int _Kx = _Get_wc(); - for (int _Ix = 0; _Ix < _Nw; ++_Ix) { + for (size_t _Ix = 0; _Ix < _Nw; ++_Ix) { for (int _Jx = 1; _Jx <= _Kx; ++_Jx) { // unpack into _Kx words unsigned int _Word = static_cast(_Buf._At(_Ix) >> ((_Kx - _Jx) * 32)); _Ostr << _Word << ' '; @@ -931,8 +931,8 @@ public: unsigned long _Arr[_Kx * _Rx]; _Seq.generate(&_Arr[0], &_Arr[_Kx * _Rx]); - int _Idx0 = 0; - for (int _Ix = 0; _Ix < _Rx; ++_Ix, _Idx0 += _Kx) { // pack _Kx words + size_t _Idx0 = 0; + for (size_t _Ix = 0; _Ix < _Rx; ++_Ix, _Idx0 += _Kx) { // pack _Kx words this->_Ax[_Ix] = _Arr[_Idx0]; for (int _Jx = 1; _Jx < _Kx; ++_Jx) { this->_Ax[_Ix] |= static_cast<_Ty>(_Arr[_Idx0 + _Jx]) << (32 * _Jx); @@ -975,7 +975,7 @@ struct _Swc_01_traits { // traits for subtract_with_carry_01 generator static _Cy_t _Reset(_Gen& _Gx, _Ty* _Ax, bool _Readcy) { // set initial values of _Ax from generator _Gx // return value of _Cy from range if _Readcy is true, // otherwise from last value - for (int _Ix = 0; _Ix < _Rx; ++_Ix) { // read values + for (size_t _Ix = 0; _Ix < _Rx; ++_Ix) { // read values _Ty _Factor = 1; _Ty _Val = 0; for (int _Jx = 0; _Jx < _Nwords - 1; ++_Jx) { // read components of value @@ -996,7 +996,7 @@ struct _Swc_01_traits { // traits for subtract_with_carry_01 generator template static void _Write( basic_ostream<_Elem, _Traits>& _Ostr, const _Circ_buf<_Ty, _Rx>& _Buf, _Cy_t _Cy) { // write state to _Ostr - for (int _Ix = 0; _Ix < _Rx; ++_Ix) { // write values + for (size_t _Ix = 0; _Ix < _Rx; ++_Ix) { // write values _Ty _Val = _Buf._At(_Ix); unsigned long _Temp; for (int _Jx = 0; _Jx < _Nwords - 1; ++_Jx) { // write components of value @@ -1090,7 +1090,7 @@ public: void seed(_Ty _X0 = default_seed, _Ty _Fx = static_cast<_Ty>(1812433253)) { // set initial values from specified value _Ty _Prev = this->_Ax[0] = _X0 & _WMSK; - for (int _Ix = 1; _Ix < _Nx; ++_Ix) { + for (size_t _Ix = 1; _Ix < _Nx; ++_Ix) { _Prev = this->_Ax[_Ix] = (_Ix + _Fx * (_Prev ^ (_Prev >> (_Wx - 2)))) & _WMSK; } @@ -1099,7 +1099,7 @@ public: template = 0> void seed(_Gen& _Gx, bool = false) { // set initial values from range - for (int _Ix = 0; _Ix < _Nx; ++_Ix) { + for (size_t _Ix = 0; _Ix < _Nx; ++_Ix) { this->_Ax[_Ix] = _Gx() & _WMSK; } @@ -1108,7 +1108,7 @@ public: template basic_ostream<_Elem, _S_Traits>& _Write(basic_ostream<_Elem, _S_Traits>& _Ostr) const { // write state to _Ostr - for (int _Ix = 0; _Ix < _Nx; ++_Ix) { + for (size_t _Ix = 0; _Ix < _Nx; ++_Ix) { _Ostr << this->_At(_Ix) << ' '; } @@ -1148,7 +1148,7 @@ protected: _Post_satisfies_(this->_Idx == 0) void _Refill_lower() { // compute values for the lower half of the history array - int _Ix; + size_t _Ix; for (_Ix = 0; _Ix < _Nx - _Mx; ++_Ix) { // fill in lower region _Ty _Tmp = (this->_Ax[_Ix + _Nx] & _HMSK) | (this->_Ax[_Ix + _Nx + 1] & _LMSK); this->_Ax[_Ix] = (_Tmp >> 1) ^ (_Tmp & 1 ? _Px : 0) ^ this->_Ax[_Ix + _Nx + _Mx]; @@ -1165,7 +1165,7 @@ protected: } void _Refill_upper() { // compute values for the upper half of the history array - int _Ix; + size_t _Ix; for (_Ix = _Nx; _Ix < 2 * _Nx; ++_Ix) { // fill in values _Ty _Tmp = (this->_Ax[_Ix - _Nx] & _HMSK) | (this->_Ax[_Ix - _Nx + 1] & _LMSK); this->_Ax[_Ix] = (_Tmp >> 1) ^ (_Tmp & 1 ? _Px : 0) ^ this->_Ax[_Ix - _Nx + _Mx]; diff --git a/stl/inc/tuple b/stl/inc/tuple index e907f02ffd3..a860730e621 100644 --- a/stl/inc/tuple +++ b/stl/inc/tuple @@ -208,6 +208,8 @@ public: constexpr tuple(const tuple&) noexcept /* strengthened */ {} // TRANSITION, ABI: should be defaulted + constexpr tuple& operator=(const tuple&) = default; + template tuple(allocator_arg_t, const _Alloc&) noexcept /* strengthened */ {} diff --git a/stl/inc/type_traits b/stl/inc/type_traits index d2c65b34ebe..723cb498562 100644 --- a/stl/inc/type_traits +++ b/stl/inc/type_traits @@ -823,6 +823,12 @@ struct is_trivially_destructible : bool_constant<__is_trivially_destructible(_Ty template _INLINE_VAR constexpr bool is_trivially_destructible_v = __is_trivially_destructible(_Ty); + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-volatile" +#endif + // NOTHROW TRAITS // STRUCT TEMPLATE is_nothrow_constructible template @@ -1665,6 +1671,12 @@ struct _Invoker_ret<_Unforced, false> { // selected for _Rx being _Unforced #pragma warning(disable : 4244) // 'argument': conversion from '_From' to '_To', possible loss of data #pragma warning(disable : 4365) // 'argument': conversion from '_From' to '_To', signed/unsigned mismatch (/Wall) #pragma warning(disable : 5215) // '%s' a function parameter with a volatile qualified type is deprecated in C++20 + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-volatile" +#endif + template void _Implicitly_convert_to(_To) noexcept; // not defined @@ -2360,5 +2372,10 @@ _STD_END _STL_RESTORE_CLANG_WARNINGS #pragma warning(pop) #pragma pack(pop) + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + #endif // _STL_COMPILER_PREPROCESSOR #endif // _TYPE_TRAITS_ diff --git a/stl/inc/vector b/stl/inc/vector index 8b6f54bca9a..34f5ef91a24 100644 --- a/stl/inc/vector +++ b/stl/inc/vector @@ -1846,6 +1846,8 @@ class _Vb_reference : public _Vb_iter_base<_Alvbase_wrapped> { _Vb_reference() = default; public: + _Vb_reference(const _Vb_reference&) = default; + _Vb_reference(const _Mybase& _Right) noexcept : _Mybase(_Right._Myptr, _Right._Myoff, _Right._Getcont()) {} _Vb_reference& operator=(const _Vb_reference& _Right) noexcept { diff --git a/stl/inc/xutility b/stl/inc/xutility index 83693c452fe..5ae7c01a9a7 100644 --- a/stl/inc/xutility +++ b/stl/inc/xutility @@ -4941,7 +4941,8 @@ _NODISCARD _CONSTEXPR20 _InIt _Find_unchecked1(_InIt _First, const _InIt _Last, #ifdef __cpp_lib_is_constant_evaluated if (_STD is_constant_evaluated()) { - return _Find_unchecked1(_First, _Last, _Val, false_type{}); + using _Elem = remove_pointer_t<_InIt>; + return _Find_unchecked1(_First, _Last, static_cast<_Elem>(_Val), false_type{}); } #endif // __cpp_lib_is_constant_evaluated _First = diff --git a/stl/inc/yvals.h b/stl/inc/yvals.h index 4c4394d642c..a9e456e6e7b 100644 --- a/stl/inc/yvals.h +++ b/stl/inc/yvals.h @@ -184,6 +184,20 @@ _STL_DISABLE_CLANG_WARNINGS _CRT_SECURE_INVALID_PARAMETER(mesg); \ } while (false) +#ifdef __clang__ +#define _STL_VERIFY(cond, mesg) \ +_Pragma("clang diagnostic push") \ +_Pragma("clang diagnostic ignored \"-Wassume\"") \ + do { \ + if (cond) { /* contextually convertible to bool paranoia */ \ + } else { \ + _STL_REPORT_ERROR(mesg); \ + } \ + \ + _Analysis_assume_(cond); \ + } while (false) \ +_Pragma("clang diagnostic pop") +#else // ^^^ clang // msvc vvv #define _STL_VERIFY(cond, mesg) \ do { \ if (cond) { /* contextually convertible to bool paranoia */ \ @@ -193,6 +207,7 @@ _STL_DISABLE_CLANG_WARNINGS \ _Analysis_assume_(cond); \ } while (false) +#endif // msvc #ifdef _DEBUG #define _STL_ASSERT(cond, mesg) _STL_VERIFY(cond, mesg) diff --git a/stl/inc/yvals_core.h b/stl/inc/yvals_core.h index 4740700c227..d31dc1fb03c 100644 --- a/stl/inc/yvals_core.h +++ b/stl/inc/yvals_core.h @@ -439,7 +439,8 @@ _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ _Pragma("clang diagnostic ignored \"-Wignored-attributes\"") \ _Pragma("clang diagnostic ignored \"-Wuser-defined-literals\"") \ - _Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"") + _Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"") \ + _Pragma("clang diagnostic ignored \"-Wc++20-extensions\"") // clang-format on #else // __clang__ #define _STL_DISABLE_CLANG_WARNINGS diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 93bae8bf95e..770895a4553 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -14,15 +14,36 @@ set(LIBCXX_SOURCE_DIR "${LLVM_PROJECT_SOURCE_DIR}/libcxx" CACHE PATH set(LLVM_SOURCE_DIR "${LLVM_PROJECT_SOURCE_DIR}/llvm" CACHE PATH "Location of the llvm source tree") -set(STL_LIT ${CMAKE_CURRENT_BINARY_DIR}/utils/stl-lit/stl-lit.py) - -set(Python_FIND_STRATEGY VERSION) -find_package(Python3) - add_subdirectory(libcxx) add_subdirectory(std) add_subdirectory(tr1) +set(STL_LIT ${CMAKE_CURRENT_BINARY_DIR}/utils/stl-lit/stl-lit.py) # Add the stl-lit subdirectory last so all the test directories have had a # chance to add to the config map. add_subdirectory(utils/stl-lit) + +set(Python_FIND_STRATEGY VERSION) +find_package(Python3) + +execute_process( + COMMAND ${Python3_EXECUTABLE} + ${STL_LIT} + "${LIBCXX_SOURCE_DIR}/test/std" + "${CMAKE_CURRENT_SOURCE_DIR}/std" + "${CMAKE_CURRENT_SOURCE_DIR}/tr1") + +include("${CMAKE_CURRENT_BINARY_DIR}/libcxx/tests.cmake") +include("${CMAKE_CURRENT_BINARY_DIR}/std/tests.cmake") +include("${CMAKE_CURRENT_BINARY_DIR}/tr1/tests.cmake") + +get_property(STL_LIT_GENERATED_FILES GLOBAL PROPERTY STL_LIT_GENERATED_FILES) + +#add_custom_target( +# generate_test_files +# ${Python3_EXECUTABLE} +# ${STL_LIT} +# #"${LIBCXX_SOURCE_DIR}/test/std" +# #"${CMAKE_CURRENT_SOURCE_DIR}/std" +# "${CMAKE_CURRENT_SOURCE_DIR}/tr1" +# BYPRODUCTS ${STL_LIT_GENERATED_FILES}) diff --git a/tests/libcxx/CMakeLists.txt b/tests/libcxx/CMakeLists.txt index a792903757c..762debdc4ee 100644 --- a/tests/libcxx/CMakeLists.txt +++ b/tests/libcxx/CMakeLists.txt @@ -2,8 +2,8 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception set(LIBCXX_ENVLST "${CMAKE_CURRENT_SOURCE_DIR}/usual_matrix.lst") -set(LIBCXX_EXPECTED_RESULTS "${CMAKE_CURRENT_SOURCE_DIR}/expected_results.txt") set(LIBCXX_TEST_OUTPUT_DIR "${STL_TEST_OUTPUT_DIR}/libcxx") +set(LIBCXX_TEST_TYPE_OVERRIDES "${CMAKE_CURRENT_SOURCE_DIR}/test_type_overrides.txt") configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in @@ -12,15 +12,3 @@ configure_file( get_property(STL_LIT_CONFIG_MAP GLOBAL PROPERTY STL_LIT_CONFIG_MAP) string(APPEND STL_LIT_CONFIG_MAP "map_config(\"${LIBCXX_SOURCE_DIR}/test/lit.cfg\", \"${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg\")\n") set_property(GLOBAL PROPERTY STL_LIT_CONFIG_MAP ${STL_LIT_CONFIG_MAP}) - -if(ENABLE_XUNIT_OUTPUT) - list(APPEND LIBCXX_ADDITIONAL_LIT_FLAGS "--xunit-xml-output" "${CMAKE_CURRENT_BINARY_DIR}/libcxx.test.xml") -endif() - -list(APPEND LIBCXX_STL_LIT_COMMAND "${STL_LIT}" - "${ADDITIONAL_LIT_FLAGS}" - "${LIBCXX_ADDITIONAL_LIT_FLAGS}" - "${LIBCXX_SOURCE_DIR}/test") - -add_test(NAME libcxx COMMAND ${Python3_EXECUTABLE} ${LIBCXX_STL_LIT_COMMAND} COMMAND_EXPAND_LISTS) -set_tests_properties(libcxx PROPERTIES RUN_SERIAL TRUE) diff --git a/tests/libcxx/lit.site.cfg.in b/tests/libcxx/lit.site.cfg.in index 473dace7e7c..473379b9b91 100644 --- a/tests/libcxx/lit.site.cfg.in +++ b/tests/libcxx/lit.site.cfg.in @@ -4,25 +4,25 @@ import site site.addsitedir("@STL_TEST_UTILS_DIR@") -config.configuration_variant = "stl" -config.cxx_archive_root = "@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@" -config.cxx_headers = "@STL_TESTED_HEADERS_DIR@" -config.cxx_library_root = "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@" -config.cxx_runtime_root = "@CMAKE_RUNTIME_OUTPUT_DIRECTORY@" -config.envlst_path = "@LIBCXX_ENVLST@" -config.expected_results_list_path = "@LIBCXX_EXPECTED_RESULTS@" -config.format_name = "LibcxxTestFormat" -config.include_dirs = ["@LIBCXX_SOURCE_DIR@/test/support"] -config.libcxx_obj_root = "@LIBCXX_TEST_OUTPUT_DIR@" -config.msvc_toolset_libs_root = "@TOOLSET_LIB@" -config.stl_build_root = "@STL_BUILD_ROOT@" -config.stl_src_root = "@STL_SOURCE_DIR@" -config.target_arch = "@VCLIBS_TARGET_ARCHITECTURE@" -config.test_subdirs = ["@LIBCXX_SOURCE_DIR@/test/std"] +config.configuration_variant = "stl" +config.cxx_archive_root = "@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@" +config.cxx_headers = "@STL_TESTED_HEADERS_DIR@" +config.cxx_library_root = "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@" +config.cxx_runtime_root = "@CMAKE_RUNTIME_OUTPUT_DIRECTORY@" +config.envlst_path = "@LIBCXX_ENVLST@" +config.test_type_overrides_path = "@LIBCXX_TEST_TYPE_OVERRIDES@" +config.format_name = "LibcxxTestFormat" +config.include_dirs = ["@LIBCXX_SOURCE_DIR@/test/support"] +config.libcxx_obj_root = "@LIBCXX_TEST_OUTPUT_DIR@" +config.msvc_toolset_libs_root = "@TOOLSET_LIB@" +config.stl_build_root = "@STL_BUILD_ROOT@" +config.stl_src_root = "@STL_SOURCE_DIR@" +config.target_arch = "@VCLIBS_TARGET_ARCHITECTURE@" +config.test_subdirs = ["@LIBCXX_SOURCE_DIR@/test/std"] lit_config.params['use_old_format'] = True config.loaded_site_config = True lit_config.load_config(config, "@LIBCXX_SOURCE_DIR@/test/lit.cfg") -config.suffixes = [".pass.cpp", ".fail.cpp"] -config.test_exec_root = "@LIBCXX_TEST_OUTPUT_DIR@" +config.suffixes = [".pass.cpp", ".fail.cpp"] +config.test_exec_root = "@LIBCXX_TEST_OUTPUT_DIR@" diff --git a/tests/libcxx/expected_results.txt b/tests/libcxx/test_type_overrides.txt similarity index 85% rename from tests/libcxx/expected_results.txt rename to tests/libcxx/test_type_overrides.txt index a91dbd2300e..494be05aefe 100644 --- a/tests/libcxx/expected_results.txt +++ b/tests/libcxx/test_type_overrides.txt @@ -545,98 +545,98 @@ std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp # *** STL BUGS *** # STL bug: VSO-121977 ": the enum value of std::money_base is not correct[libcxx]" -std/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp FAIL +std/localization/locale.categories/category.monetary/locale.moneypunct/money_base.pass.cpp COMPILE_FAIL # STL Bug: VSO-595631 basic_filebuf doesn't comply with setbuf(0,0) requirement in the standard -std/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp FAIL -std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp FAIL +std/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp RUN_FAIL +std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp RUN_FAIL # STL bug: We don't have tgmath.h. std/depr/depr.c.headers/tgmath_h.pass.cpp SKIPPED # STL bug: Our inheritance implementation is allowing this to compile when it shouldn't. -std/numerics/complex.number/complex.special/double_long_double_implicit.fail.cpp FAIL -std/numerics/complex.number/complex.special/float_double_implicit.fail.cpp FAIL -std/numerics/complex.number/complex.special/float_long_double_implicit.fail.cpp FAIL +std/numerics/complex.number/complex.special/double_long_double_implicit.fail.cpp COMPILE_FAIL +std/numerics/complex.number/complex.special/float_double_implicit.fail.cpp COMPILE_FAIL +std/numerics/complex.number/complex.special/float_long_double_implicit.fail.cpp COMPILE_FAIL # STL bug: regex_traits::transform() isn't following the Standard. -std/re/re.traits/transform.pass.cpp FAIL +std/re/re.traits/transform.pass.cpp COMPILE_FAIL # STL bug: Incorrect return types. -std/numerics/complex.number/cmplx.over/conj.pass.cpp FAIL -std/numerics/complex.number/cmplx.over/pow.pass.cpp FAIL -std/numerics/complex.number/cmplx.over/proj.pass.cpp FAIL +std/numerics/complex.number/cmplx.over/conj.pass.cpp COMPILE_FAIL +std/numerics/complex.number/cmplx.over/pow.pass.cpp COMPILE_FAIL +std/numerics/complex.number/cmplx.over/proj.pass.cpp COMPILE_FAIL # STL bug: Missing assignment operators. -std/numerics/numarray/template.mask.array/mask.array.assign/mask_array.pass.cpp FAIL -std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp FAIL +std/numerics/numarray/template.mask.array/mask.array.assign/mask_array.pass.cpp COMPILE_FAIL +std/numerics/numarray/template.slice.array/slice.arr.assign/slice_array.pass.cpp COMPILE_FAIL # STL bug: We allow fill() and swap() for array. -std/containers/sequences/array/array.fill/fill.fail.cpp FAIL -std/containers/sequences/array/array.swap/swap.fail.cpp FAIL +std/containers/sequences/array/array.fill/fill.fail.cpp RUN_FAIL +std/containers/sequences/array/array.swap/swap.fail.cpp RUN_FAIL # STL bug: VSO-207715 We reject array. -std/containers/sequences/array/array.cons/default.pass.cpp FAIL -std/containers/sequences/array/array.cons/implicit_copy.pass.cpp FAIL -std/containers/sequences/array/array.data/data_const.pass.cpp FAIL -std/containers/sequences/array/array.data/data.pass.cpp FAIL -std/containers/sequences/array/begin.pass.cpp FAIL +std/containers/sequences/array/array.cons/default.pass.cpp COMPILE_FAIL +std/containers/sequences/array/array.cons/implicit_copy.pass.cpp COMPILE_FAIL +std/containers/sequences/array/array.data/data_const.pass.cpp COMPILE_FAIL +std/containers/sequences/array/array.data/data.pass.cpp COMPILE_FAIL +std/containers/sequences/array/begin.pass.cpp COMPILE_FAIL # STL bug: string_view doesn't enforce "non-array trivial standard-layout", related to LWG-3034. -std/strings/string.view/char.bad.fail.cpp:0 FAIL +std/strings/string.view/char.bad.fail.cpp:0 COMPILE_FAIL # Predicate count assertions - IDL2 is slightly bending the Standard's rules here. -std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp FAIL -std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp FAIL -std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp FAIL +std/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp RUN_FAIL +std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp COMPILE_FAIL +std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp RUN_FAIL # STL bug: We don't match strtod / strtof when doing field extraction for hexfloats, or special cases like inf -std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp FAIL -std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp FAIL -std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp FAIL +std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp COMPILE_FAIL # STL bug: We don't match numpunct groups correctly in do_get -std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp FAIL +std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp COMPILE_FAIL # STL test bug: We don't have the locale names libcxx wants specialized in platform_support.hpp # More bugs may be uncovered when the locale names are present. -std/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp FAIL -std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp FAIL -std/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp FAIL -std/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp FAIL -std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp FAIL -std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp FAIL -std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp FAIL -std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp FAIL -std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp FAIL -std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp FAIL -std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp FAIL -std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp FAIL -std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp FAIL -std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp FAIL -std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp FAIL -std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp FAIL -std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp FAIL -std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp FAIL -std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp FAIL -std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp FAIL -std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp FAIL +std/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp COMPILE_FAIL +std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp COMPILE_FAIL +std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp COMPILE_FAIL # STL Bug? Our wbuffer_convert does not implement seek. [depr.conversions.buffer] is completely underspecified. -std/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.pass.cpp FAIL +std/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.pass.cpp COMPILE_FAIL # STL Bug: error_category's default ctor isn't constexpr. (Should be fixed in vNext.) -std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/default_ctor.pass.cpp:1 FAIL +std/diagnostics/syserr/syserr.errcat/syserr.errcat.nonvirtuals/default_ctor.pass.cpp:1 COMPILE_FAIL # STL Bug: future incorrectly uses copy assignment instead of copy construction in set_value. (Should be fixed in vNext.) -std/thread/futures/futures.promise/set_value_const.pass.cpp FAIL +std/thread/futures/futures.promise/set_value_const.pass.cpp COMPILE_FAIL # *** CRT BUGS *** @@ -811,228 +811,228 @@ std/iterators/predef.iterators/insert.iterators/insert.iterator/types.pass.cpp S # *** LIKELY STL BUGS *** # Not yet analyzed, likely STL bugs. Assertions and other runtime failures. -std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval_param.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval_param.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval_param.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/max.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/min.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/max.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/min.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/max.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval_param.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/max.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/min.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/max.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/min.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval_param.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/max.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/min.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/max.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval_param.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/max.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/min.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eq.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval_param.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/max.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/min.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval_param.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/max.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_iterator.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_iterator.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_default.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_func.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_iterator.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_param.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_default.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_func.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_iterator.pass.cpp FAIL -std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_ctor.pass.cpp FAIL +std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval_param.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval_param.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval_param.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/max.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/min.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/max.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/min.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/max.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval_param.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/max.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/min.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/max.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/min.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval_param.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/max.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/min.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/max.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval_param.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/max.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/min.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eq.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval_param.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/max.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/min.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval_param.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.poisson/eval.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/max.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_iterator.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_init_func.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/param_ctor_iterator.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_default.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_func.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_iterator.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_param.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_default.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_func.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_init_func.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/param_ctor_iterator.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.dis/rand.dist.uni/rand.dist.uni.real/param_ctor.pass.cpp COMPILE_FAIL # Not yet analyzed, likely STL bugs. Various assertions. -std/re/re.alg/re.alg.match/awk.pass.cpp FAIL -std/re/re.alg/re.alg.match/basic.pass.cpp FAIL -std/re/re.alg/re.alg.match/ecma.pass.cpp FAIL -std/re/re.alg/re.alg.match/extended.pass.cpp FAIL -std/re/re.alg/re.alg.search/awk.pass.cpp FAIL -std/re/re.alg/re.alg.search/basic.pass.cpp FAIL -std/re/re.alg/re.alg.search/ecma.pass.cpp FAIL -std/re/re.alg/re.alg.search/extended.pass.cpp FAIL -std/re/re.alg/re.alg.search/no_update_pos.pass.cpp FAIL -std/re/re.badexp/regex_error.pass.cpp FAIL -std/re/re.const/re.synopt/syntax_option_type.pass.cpp FAIL -std/re/re.grammar/excessive_brace_count.pass.cpp FAIL -std/re/re.regex/re.regex.construct/bad_backref.pass.cpp FAIL -std/re/re.regex/re.regex.construct/bad_escape.pass.cpp FAIL -std/re/re.regex/re.regex.construct/bad_range.pass.cpp FAIL -std/re/re.regex/re.regex.construct/default.pass.cpp FAIL -std/re/re.regex/re.regex.nonmemb/re.regex.nmswap/swap.pass.cpp FAIL -std/re/re.regex/re.regex.swap/swap.pass.cpp FAIL -std/re/re.traits/lookup_collatename.pass.cpp FAIL -std/re/re.traits/transform_primary.pass.cpp FAIL +std/re/re.alg/re.alg.match/awk.pass.cpp COMPILE_FAIL +std/re/re.alg/re.alg.match/basic.pass.cpp COMPILE_FAIL +std/re/re.alg/re.alg.match/ecma.pass.cpp COMPILE_FAIL +std/re/re.alg/re.alg.match/extended.pass.cpp COMPILE_FAIL +std/re/re.alg/re.alg.search/awk.pass.cpp COMPILE_FAIL +std/re/re.alg/re.alg.search/basic.pass.cpp COMPILE_FAIL +std/re/re.alg/re.alg.search/ecma.pass.cpp COMPILE_FAIL +std/re/re.alg/re.alg.search/extended.pass.cpp COMPILE_FAIL +std/re/re.alg/re.alg.search/no_update_pos.pass.cpp COMPILE_FAIL +std/re/re.badexp/regex_error.pass.cpp COMPILE_FAIL +std/re/re.const/re.synopt/syntax_option_type.pass.cpp COMPILE_FAIL +std/re/re.grammar/excessive_brace_count.pass.cpp COMPILE_FAIL +std/re/re.regex/re.regex.construct/bad_backref.pass.cpp COMPILE_FAIL +std/re/re.regex/re.regex.construct/bad_escape.pass.cpp COMPILE_FAIL +std/re/re.regex/re.regex.construct/bad_range.pass.cpp COMPILE_FAIL +std/re/re.regex/re.regex.construct/default.pass.cpp COMPILE_FAIL +std/re/re.regex/re.regex.nonmemb/re.regex.nmswap/swap.pass.cpp COMPILE_FAIL +std/re/re.regex/re.regex.swap/swap.pass.cpp COMPILE_FAIL +std/re/re.traits/lookup_collatename.pass.cpp COMPILE_FAIL +std/re/re.traits/transform_primary.pass.cpp COMPILE_FAIL # Not yet analyzed, likely STL bugs. Various assertions. -std/numerics/complex.number/complex.member.ops/divide_equal_complex.pass.cpp FAIL -std/numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp FAIL -std/numerics/complex.number/complex.ops/complex_times_complex.pass.cpp FAIL -std/numerics/complex.number/complex.ops/scalar_divide_complex.pass.cpp FAIL -std/numerics/complex.number/complex.transcendentals/acos.pass.cpp FAIL -std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp FAIL -std/numerics/complex.number/complex.transcendentals/asin.pass.cpp FAIL -std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp FAIL -std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp FAIL -std/numerics/complex.number/complex.transcendentals/cos.pass.cpp FAIL -std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp FAIL -std/numerics/complex.number/complex.transcendentals/exp.pass.cpp FAIL -std/numerics/complex.number/complex.transcendentals/log10.pass.cpp FAIL -std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp FAIL -std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp FAIL -std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp FAIL -std/numerics/complex.number/complex.transcendentals/sin.pass.cpp FAIL -std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp FAIL -std/numerics/complex.number/complex.transcendentals/sqrt.pass.cpp FAIL -std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp FAIL -std/numerics/complex.number/complex.value.ops/norm.pass.cpp FAIL -std/numerics/complex.number/complex.value.ops/polar.pass.cpp FAIL -std/numerics/complex.number/complex.value.ops/proj.pass.cpp FAIL +std/numerics/complex.number/complex.member.ops/divide_equal_complex.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.ops/complex_times_complex.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.ops/scalar_divide_complex.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.transcendentals/acos.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.transcendentals/asin.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.transcendentals/cos.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.transcendentals/exp.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.transcendentals/log10.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.transcendentals/pow_complex_complex.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.transcendentals/pow_complex_scalar.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.transcendentals/pow_scalar_complex.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.transcendentals/sin.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.transcendentals/sqrt.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.value.ops/norm.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.value.ops/polar.pass.cpp COMPILE_FAIL +std/numerics/complex.number/complex.value.ops/proj.pass.cpp COMPILE_FAIL # Not yet analyzed, likely STL bugs. Many various assertions. -std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/decimal_point.pass.cpp FAIL -std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/thousands_sep.pass.cpp FAIL -std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp FAIL -std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp FAIL -std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname_wide.pass.cpp FAIL -std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname.pass.cpp FAIL -std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_one.pass.cpp FAIL -std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time_wide.pass.cpp FAIL -std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time.pass.cpp FAIL -std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday_wide.pass.cpp FAIL -std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday.pass.cpp FAIL -std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp FAIL -std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp FAIL -std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp FAIL -std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp FAIL -std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp FAIL -std/localization/locale.stdcvt/codecvt_utf16.pass.cpp FAIL -std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp FAIL -std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp FAIL -std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp FAIL -std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp FAIL -std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp FAIL -std/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp FAIL -std/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp FAIL -std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp FAIL -std/localization/locale.stdcvt/codecvt_utf8.pass.cpp FAIL -std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp FAIL -std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp FAIL -std/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.pass.cpp FAIL -std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp FAIL +std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.statics/classic_table.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_en_US.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_string_en_US.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/decimal_point.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/thousands_sep.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname_wide.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_monthname.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_one.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time_wide.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday_wide.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_weekday.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp COMPILE_FAIL +std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp COMPILE_FAIL +std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp COMPILE_FAIL +std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp COMPILE_FAIL +std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp COMPILE_FAIL +std/localization/locale.stdcvt/codecvt_utf16.pass.cpp COMPILE_FAIL +std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp COMPILE_FAIL +std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp COMPILE_FAIL +std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp COMPILE_FAIL +std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp COMPILE_FAIL +std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp COMPILE_FAIL +std/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp COMPILE_FAIL +std/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp COMPILE_FAIL +std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp COMPILE_FAIL +std/localization/locale.stdcvt/codecvt_utf8.pass.cpp COMPILE_FAIL +std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp COMPILE_FAIL +std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp COMPILE_FAIL +std/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.pass.cpp COMPILE_FAIL +std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp COMPILE_FAIL # Not yet analyzed, likely STL bugs. Various assertions. -std/input.output/iostream.format/ext.manip/get_money.pass.cpp FAIL -std/input.output/iostream.format/ext.manip/put_money.pass.cpp FAIL -std/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp FAIL +std/input.output/iostream.format/ext.manip/get_money.pass.cpp RUN_FAIL +std/input.output/iostream.format/ext.manip/put_money.pass.cpp COMPILE_FAIL +std/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp RUN_FAIL # Not yet analyzed, likely STL bugs. Assertion failed: os.str() == a -std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_result_type.pass.cpp FAIL -std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_sseq.pass.cpp FAIL -std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_result_type.pass.cpp FAIL -std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_sseq.pass.cpp FAIL -std/numerics/rand/rand.eng/rand.eng.mers/ctor_result_type.pass.cpp FAIL -std/numerics/rand/rand.eng/rand.eng.mers/ctor_sseq.pass.cpp FAIL -std/numerics/rand/rand.eng/rand.eng.sub/ctor_result_type.pass.cpp FAIL -std/numerics/rand/rand.eng/rand.eng.sub/ctor_sseq.pass.cpp FAIL +std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_result_type.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.adapt/rand.adapt.disc/ctor_sseq.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_result_type.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.adapt/rand.adapt.ibits/ctor_sseq.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.eng/rand.eng.mers/ctor_result_type.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.eng/rand.eng.mers/ctor_sseq.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.eng/rand.eng.sub/ctor_result_type.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.eng/rand.eng.sub/ctor_sseq.pass.cpp COMPILE_FAIL # Not yet analyzed, likely STL bugs. Assertion failed: e1 == e2 -std/numerics/rand/rand.adapt/rand.adapt.disc/io.pass.cpp FAIL -std/numerics/rand/rand.adapt/rand.adapt.ibits/io.pass.cpp FAIL -std/numerics/rand/rand.eng/rand.eng.sub/io.pass.cpp FAIL +std/numerics/rand/rand.adapt/rand.adapt.disc/io.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.adapt/rand.adapt.ibits/io.pass.cpp COMPILE_FAIL +std/numerics/rand/rand.eng/rand.eng.sub/io.pass.cpp COMPILE_FAIL # Likely STL bug: Looks like we shouldn't be using assignment. -std/thread/futures/futures.promise/set_rvalue.pass.cpp FAIL +std/thread/futures/futures.promise/set_rvalue.pass.cpp COMPILE_FAIL # Possible STL bugs in pair and tuple. -std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp:0 FAIL -std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp FAIL +std/utilities/tuple/tuple.tuple/tuple.cnstr/PR23256_constrain_UTypes_ctor.pass.cpp:0 COMPILE_FAIL +std/utilities/tuple/tuple.tuple/tuple.cnstr/PR31384.pass.cpp COMPILE_FAIL # Likely STL bugs in mersenne_twister; also fails at runtime # random(1186,26): error: constexpr variable '_WMSK' must be initialized by a constant expression # static constexpr _Ty _WMSK = ~((~_Ty(0) << (_Wx - 1)) << 1); # ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -std/numerics/rand/rand.eng/rand.eng.mers/ctor_sseq_all_zero.pass.cpp FAIL +std/numerics/rand/rand.eng/rand.eng.mers/ctor_sseq_all_zero.pass.cpp COMPILE_FAIL # Bugs/questionable choices in codecvt, which we probably will not fix since # (1) they are deprecated, and (2) we don't want to break existing users. -std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp FAIL -std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp FAIL -std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp FAIL -std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp FAIL +std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp COMPILE_FAIL +std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp COMPILE_FAIL # Likely STL bug in : "result type of conditional expression is ambiguous" -std/utilities/time/time.duration/time.duration.alg/abs.pass.cpp FAIL +std/utilities/time/time.duration/time.duration.alg/abs.pass.cpp COMPILE_FAIL # *** NOT YET ANALYZED *** # Not yet analyzed. Asserting about alloc_count. -std/thread/futures/futures.promise/alloc_ctor.pass.cpp FAIL -std/thread/futures/futures.promise/move_assign.pass.cpp FAIL -std/thread/futures/futures.promise/move_ctor.pass.cpp FAIL -std/thread/futures/futures.promise/swap.pass.cpp FAIL -std/thread/futures/futures.shared_future/dtor.pass.cpp FAIL -std/thread/futures/futures.unique_future/dtor.pass.cpp FAIL +std/thread/futures/futures.promise/alloc_ctor.pass.cpp COMPILE_FAIL +std/thread/futures/futures.promise/move_assign.pass.cpp COMPILE_FAIL +std/thread/futures/futures.promise/move_ctor.pass.cpp COMPILE_FAIL +std/thread/futures/futures.promise/swap.pass.cpp COMPILE_FAIL +std/thread/futures/futures.shared_future/dtor.pass.cpp COMPILE_FAIL +std/thread/futures/futures.unique_future/dtor.pass.cpp COMPILE_FAIL # Not yet analyzed. libc++ seems to have a different opinion about what tuple_size should do. -std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp FAIL -std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp FAIL +std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp COMPILE_FAIL +std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp COMPILE_FAIL # Not yet analyzed. Possibly testing nonstandard deduction guides. -std/containers/associative/map/map.cons/deduct_const.pass.cpp FAIL -std/containers/associative/multimap/multimap.cons/deduct_const.pass.cpp FAIL -std/containers/unord/unord.map/unord.map.cnstr/deduct_const.pass.cpp FAIL -std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct.pass.cpp:0 FAIL -std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct_const.pass.cpp FAIL -std/utilities/tuple/tuple.tuple/tuple.cnstr/deduct.pass.cpp:0 FAIL +std/containers/associative/map/map.cons/deduct_const.pass.cpp COMPILE_FAIL +std/containers/associative/multimap/multimap.cons/deduct_const.pass.cpp COMPILE_FAIL +std/containers/unord/unord.map/unord.map.cnstr/deduct_const.pass.cpp COMPILE_FAIL +std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct.pass.cpp:0 COMPILE_FAIL +std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct_const.pass.cpp COMPILE_FAIL +std/utilities/tuple/tuple.tuple/tuple.cnstr/deduct.pass.cpp:0 COMPILE_FAIL # Not yet analyzed. Assertion failed: f16_8.out(mbs, c16, c_c16p, c_c16p, c8, c8+4, c8p) == F32_8::ok -std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp FAIL +std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp COMPILE_FAIL # Not yet analyzed. Frequent timeouts containers\sequences\deque\deque.modifiers\insert_iter_iter.pass.cpp SKIPPED -# *** XFAILs WHICH PASS *** +# *** XFAILs which PASS in MSVC *** # Not yet implemented in libcxx and marked as XFAIL -std/strings/c.strings/cuchar.pass.cpp PASS -std/utilities/function.objects/func.search/func.search.bm/default.pass.cpp PASS -std/utilities/function.objects/func.search/func.search.bm/hash.pass.cpp PASS -std/utilities/function.objects/func.search/func.search.bm/hash.pred.pass.cpp PASS -std/utilities/function.objects/func.search/func.search.bm/pred.pass.cpp PASS -std/utilities/function.objects/func.search/func.search.bmh/default.pass.cpp PASS -std/utilities/function.objects/func.search/func.search.bmh/hash.pass.cpp PASS -std/utilities/function.objects/func.search/func.search.bmh/hash.pred.pass.cpp PASS -std/utilities/function.objects/func.search/func.search.bmh/pred.pass.cpp PASS +std/strings/c.strings/cuchar.pass.cpp SKIPPED +std/utilities/function.objects/func.search/func.search.bm/default.pass.cpp SKIPPED +std/utilities/function.objects/func.search/func.search.bm/hash.pass.cpp SKIPPED +std/utilities/function.objects/func.search/func.search.bm/hash.pred.pass.cpp SKIPPED +std/utilities/function.objects/func.search/func.search.bm/pred.pass.cpp SKIPPED +std/utilities/function.objects/func.search/func.search.bmh/default.pass.cpp SKIPPED +std/utilities/function.objects/func.search/func.search.bmh/hash.pass.cpp SKIPPED +std/utilities/function.objects/func.search/func.search.bmh/hash.pred.pass.cpp SKIPPED +std/utilities/function.objects/func.search/func.search.bmh/pred.pass.cpp SKIPPED diff --git a/tests/std/CMakeLists.txt b/tests/std/CMakeLists.txt index 55fe345db9c..0d282d8ce92 100644 --- a/tests/std/CMakeLists.txt +++ b/tests/std/CMakeLists.txt @@ -1,10 +1,10 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -set(STD_EXPECTED_RESULTS "${CMAKE_CURRENT_SOURCE_DIR}/expected_results.txt") set(STD_TEST_OUTPUT_DIR "${STL_TEST_OUTPUT_DIR}/std") set(STD_TEST_SUBDIRS_FILE "${CMAKE_CURRENT_SOURCE_DIR}/test.lst") set(STD_TEST_SUBDIRS_ROOT "${CMAKE_CURRENT_SOURCE_DIR}") +set(STD_TEST_TYPE_OVERRIDES "${CMAKE_CURRENT_SOURCE_DIR}/test_type_overrides.txt") configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in @@ -13,15 +13,3 @@ configure_file( get_property(STL_LIT_CONFIG_MAP GLOBAL PROPERTY STL_LIT_CONFIG_MAP) string(APPEND STL_LIT_CONFIG_MAP "map_config(\"${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg\", \"${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg\")\n") set_property(GLOBAL PROPERTY STL_LIT_CONFIG_MAP ${STL_LIT_CONFIG_MAP}) - -if(ENABLE_XUNIT_OUTPUT) - list(APPEND STD_ADDITIONAL_LIT_FLAGS "--xunit-xml-output" "${CMAKE_CURRENT_BINARY_DIR}/std.test.xml") -endif() - -list(APPEND STD_STL_LIT_COMMAND "${STL_LIT}" - "${ADDITIONAL_LIT_FLAGS}" - "${STD_ADDITIONAL_LIT_FLAGS}" - "${CMAKE_CURRENT_SOURCE_DIR}") - -add_test(NAME std COMMAND ${Python3_EXECUTABLE} ${STD_STL_LIT_COMMAND} COMMAND_EXPAND_LISTS) -set_tests_properties(std PROPERTIES RUN_SERIAL TRUE) diff --git a/tests/std/lit.site.cfg.in b/tests/std/lit.site.cfg.in index e3998e65f93..5aaafaf8557 100644 --- a/tests/std/lit.site.cfg.in +++ b/tests/std/lit.site.cfg.in @@ -1,18 +1,18 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -config.cxx_archive_root = "@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@" -config.cxx_headers = "@STL_TESTED_HEADERS_DIR@" -config.cxx_library_root = "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@" -config.cxx_runtime_root = "@CMAKE_RUNTIME_OUTPUT_DIRECTORY@" -config.expected_results_list_path = "@STD_EXPECTED_RESULTS@" -config.include_dirs = ["@LIBCXX_SOURCE_DIR@/test/support", "@STL_SOURCE_DIR@/tests/std/include"] -config.msvc_toolset_libs_root = "@TOOLSET_LIB@" -config.stl_build_root = "@STL_BUILD_ROOT@" -config.stl_src_root = "@STL_SOURCE_DIR@" -config.target_arch = "@VCLIBS_TARGET_ARCHITECTURE@" -config.test_exec_root = "@STD_TEST_OUTPUT_DIR@" -config.test_subdirs_file = "@STD_TEST_SUBDIRS_FILE@" -config.test_subdirs_root = "@STD_TEST_SUBDIRS_ROOT@" +config.cxx_archive_root = "@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@" +config.cxx_headers = "@STL_TESTED_HEADERS_DIR@" +config.cxx_library_root = "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@" +config.cxx_runtime_root = "@CMAKE_RUNTIME_OUTPUT_DIRECTORY@" +config.test_type_overrides_path = "@STD_TEST_TYPE_OVERRIDES@" +config.include_dirs = ["@LIBCXX_SOURCE_DIR@/test/support", "@STL_SOURCE_DIR@/tests/std/include"] +config.msvc_toolset_libs_root = "@TOOLSET_LIB@" +config.stl_build_root = "@STL_BUILD_ROOT@" +config.stl_src_root = "@STL_SOURCE_DIR@" +config.target_arch = "@VCLIBS_TARGET_ARCHITECTURE@" +config.test_exec_root = "@STD_TEST_OUTPUT_DIR@" +config.test_subdirs_file = "@STD_TEST_SUBDIRS_FILE@" +config.test_subdirs_root = "@STD_TEST_SUBDIRS_ROOT@" lit_config.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/lit.cfg") diff --git a/tests/std/expected_results.txt b/tests/std/test_type_overrides.txt similarity index 100% rename from tests/std/expected_results.txt rename to tests/std/test_type_overrides.txt diff --git a/tests/std/tests/Dev09_056375_locale_cleanup/custom_format.py b/tests/std/tests/Dev09_056375_locale_cleanup/custom_format.py index 9d7c64eeaec..04f4556e853 100644 --- a/tests/std/tests/Dev09_056375_locale_cleanup/custom_format.py +++ b/tests/std/tests/Dev09_056375_locale_cleanup/custom_format.py @@ -10,10 +10,8 @@ class CustomTestFormat(STLTestFormat): def getBuildSteps(self, test, lit_config, shared): exe_source = Path(test.getSourcePath()) dll_source = exe_source.parent / 'TestDll.cpp' - shared.exec_dir = test.getExecDir() output_base = test.getOutputBaseName() output_dir = test.getOutputDir() - pass_var, fail_var = test.getPassFailResultCodes() dll_output = output_dir / 'TestDll.DLL' dll_compile_cmd, out_files, exec_file = \ @@ -24,19 +22,22 @@ def getBuildSteps(self, test, lit_config, shared): shared.dll_file = dll_output - yield TestStep(dll_compile_cmd, shared.exec_dir, [dll_source], - test.cxx.compile_env) + yield TestStep(cmd=dll_compile_cmd, dependencies=[dll_source], + env=shared.exec_dir, out_files=out_files, + work_dir=shared.exec_dir) exe_compile_cmd, out_files, shared.exec_file = \ test.cxx.executeBasedOnFlagsCmd([exe_source], output_dir, shared.exec_dir, output_base, [], [], []) - yield TestStep(exe_compile_cmd, shared.exec_dir, [exe_source], - test.cxx.compile_env) + yield TestStep(cmd=exe_compile_cmd, dependencies=[exe_source], + env=shared.exec_dir, out_files=out_files, + work_dir=shared.exec_dir, num=1) def getTestSteps(self, test, lit_config, shared): if shared.exec_file is not None: - yield TestStep([str(shared.exec_file)], shared.exec_dir, - [shared.exec_file, shared.dll_file], - test.cxx.compile_env) + yield TestStep(cmd=[str(shared.exec_file)], + dependencies=[shared.exec_file, shared.dll_file], + env=shared.exec_env, + work_dir=shared.exec_dir) diff --git a/tests/std/tests/Dev09_056375_locale_cleanup/lit.local.cfg b/tests/std/tests/Dev09_056375_locale_cleanup/lit.local.cfg index 5a7c740f058..c24deb0f6e5 100644 --- a/tests/std/tests/Dev09_056375_locale_cleanup/lit.local.cfg +++ b/tests/std/tests/Dev09_056375_locale_cleanup/lit.local.cfg @@ -6,5 +6,5 @@ import Dev09_056375_locale_cleanup.custom_format config.test_format = \ Dev09_056375_locale_cleanup.custom_format.CustomTestFormat(config.test_format.cxx, config.test_format.execute_external, - config.test_format.build_executor, - config.test_format.test_executor) + config.test_format.build_step_writer, + config.test_format.test_step_writer) diff --git a/tests/std/tests/Dev11_0316853_find_memchr_optimization/test.cpp b/tests/std/tests/Dev11_0316853_find_memchr_optimization/test.cpp index 0dafea350eb..6e6475be2f9 100644 --- a/tests/std/tests/Dev11_0316853_find_memchr_optimization/test.cpp +++ b/tests/std/tests/Dev11_0316853_find_memchr_optimization/test.cpp @@ -79,7 +79,7 @@ int main() { // Make sure we don't look for 0x11 bytes in the range! assert(find(v.begin(), v.end(), 0xAABBCCDDUL) == v.begin() + 2); - assert(find(v.begin(), v.end(), 0x11) == v.end()); + assert(find(v.begin(), v.end(), 0x11UL) == v.end()); } { // Optimization inapplicable due to bogus value type (although the element type is good) diff --git a/tests/std/tests/GH_000545_include_compare/custom_format.py b/tests/std/tests/GH_000545_include_compare/custom_format.py index 05c32016fde..44326483d24 100644 --- a/tests/std/tests/GH_000545_include_compare/custom_format.py +++ b/tests/std/tests/GH_000545_include_compare/custom_format.py @@ -24,5 +24,6 @@ def getBuildSteps(self, test, lit_config, shared): shared.exec_dir, output_base, [], [], []) - yield TestStep(cmd, shared.exec_dir, source_files, - test.cxx.compile_env) + yield TestStep(cmd=cmd, dependencies=source_files, + env=shared.exec_env, out_files=out_files, + work_dir=shared.exec_dir) diff --git a/tests/std/tests/GH_000545_include_compare/lit.local.cfg b/tests/std/tests/GH_000545_include_compare/lit.local.cfg index cbdcadad3d6..45a876991e2 100644 --- a/tests/std/tests/GH_000545_include_compare/lit.local.cfg +++ b/tests/std/tests/GH_000545_include_compare/lit.local.cfg @@ -6,5 +6,5 @@ import GH_000545_include_compare.custom_format config.test_format = \ GH_000545_include_compare.custom_format.CustomTestFormat(config.test_format.cxx, config.test_format.execute_external, - config.test_format.build_executor, - config.test_format.test_executor) + config.test_format.build_step_writer, + config.test_format.test_step_writer) diff --git a/tests/std/tests/P0067R5_charconv/env.lst b/tests/std/tests/P0067R5_charconv/env.lst index 7194073a8e2..a71642859de 100644 --- a/tests/std/tests/P0067R5_charconv/env.lst +++ b/tests/std/tests/P0067R5_charconv/env.lst @@ -1,6 +1,34 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -RUNALL_INCLUDE ..\usual_17_matrix.lst +PM_CL="/nologo /W4 /w14061 /w14242 /w14265 /w14365 /w14582 /w14583 /w14587 /w14588 /w14749 /w14841 /w14842 /w15038 /w15214 /w15215 /w15216 /w15217 /sdl /WX /Zc:strictStrings /D_ENABLE_STL_INTERNAL_CHECK /D_ENFORCE_FACET_SPECIALIZATIONS=1 /bigobj" +RUNALL_CROSSLIST +PM_CL="/w14640 /Zc:threadSafeInit-" +RUNALL_CROSSLIST +PM_CL="/EHsc /MD /D_ITERATOR_DEBUG_LEVEL=0 /std:c++latest" +PM_CL="/EHsc /MD /D_ITERATOR_DEBUG_LEVEL=0 /std:c++17" +PM_CL="/EHsc /MD /D_ITERATOR_DEBUG_LEVEL=1 /std:c++latest" +PM_CL="/EHsc /MD /D_ITERATOR_DEBUG_LEVEL=0 /std:c++latest /Zc:char8_t-" +PM_CL="/EHsc /MDd /D_ITERATOR_DEBUG_LEVEL=0 /std:c++latest /Zc:wchar_t-" +PM_CL="/EHsc /MDd /D_ITERATOR_DEBUG_LEVEL=1 /std:c++latest" +PM_CL="/EHsc /MDd /D_ITERATOR_DEBUG_LEVEL=2 /std:c++latest /fp:except" +PM_CL="/EHsc /MDd /D_ITERATOR_DEBUG_LEVEL=2 /std:c++17 /permissive-" +PM_CL="/EHsc /MT /D_ITERATOR_DEBUG_LEVEL=0 /std:c++latest /await" +PM_CL="/EHsc /MT /D_ITERATOR_DEBUG_LEVEL=0 /std:c++latest /analyze:only" +PM_CL="/EHsc /MT /D_ITERATOR_DEBUG_LEVEL=1 /std:c++latest" +PM_CL="/EHsc /MTd /D_ITERATOR_DEBUG_LEVEL=0 /std:c++latest /fp:strict" +PM_CL="/EHsc /MTd /D_ITERATOR_DEBUG_LEVEL=1 /std:c++latest" +PM_CL="/EHsc /MTd /D_ITERATOR_DEBUG_LEVEL=2 /std:c++latest /await" +PM_CL="/EHsc /MTd /D_ITERATOR_DEBUG_LEVEL=2 /std:c++latest /analyze:only" +PM_CL="/Za /EHsc /MD /std:c++latest /permissive-" +PM_CL="/Za /EHsc /MDd /std:c++latest /permissive-" +PM_CL="/clr /MD /std:c++17" +PM_CL="/clr /MDd /std:c++17" +PM_CL="/BE /c /EHsc /MD /std:c++latest" +PM_CL="/BE /c /EHsc /MDd /std:c++17 /permissive-" +PM_CL="/BE /c /EHsc /MTd /std:c++latest /permissive-" +PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /EHsc /MD /std:c++latest" +PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /EHsc /MDd /std:c++17" +PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /EHsc /MTd /std:c++latest /fp:strict" RUNALL_CROSSLIST PM_CL="/O2 /wd4793" diff --git a/tests/std/tests/P0088R3_variant/env.lst b/tests/std/tests/P0088R3_variant/env.lst index 2d80e9188f7..e1f7d138ae9 100644 --- a/tests/std/tests/P0088R3_variant/env.lst +++ b/tests/std/tests/P0088R3_variant/env.lst @@ -7,7 +7,7 @@ RUNALL_INCLUDE ..\prefix.lst RUNALL_CROSSLIST -PM_CL="/w14640 /Zc:threadSafeInit-" +PM_CL="/w14640 /Zc:threadSafeInit- /D_SILENCE_CXX20_VOLATILE_DEPRECATION_WARNING" RUNALL_CROSSLIST PM_CL="/EHsc /MD /D_ITERATOR_DEBUG_LEVEL=0 /std:c++latest /DCONSTEXPR_NOTHROW" PM_CL="/EHsc /MD /D_ITERATOR_DEBUG_LEVEL=0 /std:c++17 /DCONSTEXPR_NOTHROW" diff --git a/tests/std/tests/P0607R0_inline_variables/custom_format.py b/tests/std/tests/P0607R0_inline_variables/custom_format.py index 323790ec7cb..fe7a685b08f 100644 --- a/tests/std/tests/P0607R0_inline_variables/custom_format.py +++ b/tests/std/tests/P0607R0_inline_variables/custom_format.py @@ -19,5 +19,6 @@ def getBuildSteps(self, test, lit_config, shared): output_dir, shared.exec_dir, output_base, [], [], []) - yield TestStep(cmd, shared.exec_dir, [exe_source, test2_source], - test.cxx.compile_env) + yield TestStep(cmd=cmd, dependencies=[exe_source, test2_source], + env=shared.exec_env, out_files=out_files, + work_dir=shared.exec_dir) diff --git a/tests/std/tests/P0607R0_inline_variables/lit.local.cfg b/tests/std/tests/P0607R0_inline_variables/lit.local.cfg index 55628eacde9..c6131e9e801 100644 --- a/tests/std/tests/P0607R0_inline_variables/lit.local.cfg +++ b/tests/std/tests/P0607R0_inline_variables/lit.local.cfg @@ -6,5 +6,5 @@ import P0607R0_inline_variables.custom_format config.test_format = \ P0607R0_inline_variables.custom_format.CustomTestFormat(config.test_format.cxx, config.test_format.execute_external, - config.test_format.build_executor, - config.test_format.test_executor) + config.test_format.build_step_writer, + config.test_format.test_step_writer) diff --git a/tests/std/tests/VSO_0000000_any_calling_conventions/custom_format.py b/tests/std/tests/VSO_0000000_any_calling_conventions/custom_format.py index 07b7dff9cfe..51d685d686a 100644 --- a/tests/std/tests/VSO_0000000_any_calling_conventions/custom_format.py +++ b/tests/std/tests/VSO_0000000_any_calling_conventions/custom_format.py @@ -37,8 +37,9 @@ def getBuildSteps(self, test, lit_config, shared): [test.calling_convention_a, '/c'], [], []) - yield TestStep(a_compile_cmd, shared.exec_dir, [a_source], - test.cxx.compile_env) + yield TestStep(cmd=a_compile_cmd, dependencies=[a_source], + env=shared.exec_env, out_files=out_files, + work_dir=shared.exec_dir) a_output = output_dir / 'a.obj' @@ -48,5 +49,8 @@ def getBuildSteps(self, test, lit_config, shared): [test.calling_convention_b, str(a_output)], [], []) - yield TestStep(exe_compile_cmd, shared.exec_dir, - [a_output, exe_source], test.cxx.compile_env) + yield TestStep(cmd=exe_compile_cmd, + dependencies=[a_output, exe_source], + env=shared.exec_env, + out_files=out_files, + work_dir=shared.exec_dir, num=1) diff --git a/tests/std/tests/VSO_0000000_any_calling_conventions/lit.local.cfg b/tests/std/tests/VSO_0000000_any_calling_conventions/lit.local.cfg index 9f4ac1b16d8..6928db9f865 100644 --- a/tests/std/tests/VSO_0000000_any_calling_conventions/lit.local.cfg +++ b/tests/std/tests/VSO_0000000_any_calling_conventions/lit.local.cfg @@ -8,5 +8,5 @@ import VSO_0000000_any_calling_conventions.custom_format config.test_format = \ VSO_0000000_any_calling_conventions.custom_format.CustomTestFormat(config.test_format.cxx, config.test_format.execute_external, - config.test_format.build_executor, - config.test_format.test_executor) + config.test_format.build_step_writer, + config.test_format.test_step_writer) diff --git a/tests/std/tests/fast_matrix.lst b/tests/std/tests/fast_matrix.lst index 3fbd3356cf7..0be33c5b9fa 100644 --- a/tests/std/tests/fast_matrix.lst +++ b/tests/std/tests/fast_matrix.lst @@ -2,6 +2,4 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # This is for tests that take a long time to execute, so run only one configuration. -RUNALL_INCLUDE .\prefix.lst -RUNALL_CROSSLIST -PM_CL="/EHsc /MT /O2 /GL /std:c++latest /analyze /w14640 /Zc:threadSafeInit-" +PM_CL="/nologo /W4 /w14061 /w14242 /w14265 /w14365 /w14582 /w14583 /w14587 /w14588 /w14749 /w14841 /w14842 /w15038 /w15214 /w15215 /w15216 /w15217 /sdl /WX /Zc:strictStrings /D_ENABLE_STL_INTERNAL_CHECK /D_ENFORCE_FACET_SPECIALIZATIONS=1 /bigobj /EHsc /MT /O2 /GL /std:c++latest /analyze /w14640 /Zc:threadSafeInit-" diff --git a/tests/std/tests/include_each_header_alone_matrix.lst b/tests/std/tests/include_each_header_alone_matrix.lst index 5aeec3dee49..57333f82ea8 100644 --- a/tests/std/tests/include_each_header_alone_matrix.lst +++ b/tests/std/tests/include_each_header_alone_matrix.lst @@ -60,7 +60,7 @@ PM_CL="/DMEOW_HEADER=stdexcept" PM_CL="/DMEOW_HEADER=streambuf" PM_CL="/DMEOW_HEADER=string" PM_CL="/DMEOW_HEADER=string_view" -PM_CL="/DMEOW_HEADER=strstream" +PM_CL="/DMEOW_HEADER=strstream /D_SILENCE_CXX17_STRSTREAM_DEPRECATION_WARNING" PM_CL="/DMEOW_HEADER=system_error" PM_CL="/DMEOW_HEADER=thread" PM_CL="/DMEOW_HEADER=tuple" @@ -84,7 +84,7 @@ PM_CL="/DMEOW_HEADER=experimental/unordered_map" PM_CL="/DMEOW_HEADER=experimental/unordered_set" PM_CL="/DMEOW_HEADER=experimental/vector" PM_CL="/DMEOW_HEADER=cassert" -PM_CL="/DMEOW_HEADER=ccomplex" +PM_CL="/DMEOW_HEADER=ccomplex /D_SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING" PM_CL="/DMEOW_HEADER=cctype" PM_CL="/DMEOW_HEADER=cerrno" PM_CL="/DMEOW_HEADER=cfenv" @@ -96,15 +96,15 @@ PM_CL="/DMEOW_HEADER=clocale" PM_CL="/DMEOW_HEADER=cmath" PM_CL="/DMEOW_HEADER=csetjmp" PM_CL="/DMEOW_HEADER=csignal" -PM_CL="/DMEOW_HEADER=cstdalign" +PM_CL="/DMEOW_HEADER=cstdalign /D_SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING" PM_CL="/DMEOW_HEADER=cstdarg" -PM_CL="/DMEOW_HEADER=cstdbool" +PM_CL="/DMEOW_HEADER=cstdbool /D_SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING" PM_CL="/DMEOW_HEADER=cstddef" PM_CL="/DMEOW_HEADER=cstdint" PM_CL="/DMEOW_HEADER=cstdio" PM_CL="/DMEOW_HEADER=cstdlib" PM_CL="/DMEOW_HEADER=cstring" -PM_CL="/DMEOW_HEADER=ctgmath" +PM_CL="/DMEOW_HEADER=ctgmath /D_SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING" PM_CL="/DMEOW_HEADER=ctime" PM_CL="/DMEOW_HEADER=cuchar" PM_CL="/DMEOW_HEADER=cwchar" diff --git a/tests/tr1/CMakeLists.txt b/tests/tr1/CMakeLists.txt index 2f9e967cb33..58f4500a8bd 100644 --- a/tests/tr1/CMakeLists.txt +++ b/tests/tr1/CMakeLists.txt @@ -1,9 +1,9 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -set(TR1_EXPECTED_RESULTS "${CMAKE_CURRENT_SOURCE_DIR}/expected_results.txt") set(TR1_TEST_OUTPUT_DIR "${STL_TEST_OUTPUT_DIR}/tr1") set(TR1_TEST_SUBDIRS_FILE "${CMAKE_CURRENT_SOURCE_DIR}/test.lst") +set(TR1_TEST_TYPE_OVERRIDES "${CMAKE_CURRENT_SOURCE_DIR}/test_type_overrides.txt") set(TR1_TEST_SUBDIRS_ROOT "${CMAKE_CURRENT_SOURCE_DIR}") configure_file( @@ -13,15 +13,3 @@ configure_file( get_property(STL_LIT_CONFIG_MAP GLOBAL PROPERTY STL_LIT_CONFIG_MAP) string(APPEND STL_LIT_CONFIG_MAP "map_config(\"${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg\", \"${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg\")\n") set_property(GLOBAL PROPERTY STL_LIT_CONFIG_MAP ${STL_LIT_CONFIG_MAP}) - -if(ENABLE_XUNIT_OUTPUT) - list(APPEND TR1_ADDITIONAL_LIT_FLAGS "--xunit-xml-output" "${CMAKE_CURRENT_BINARY_DIR}/tr1.test.xml") -endif() - -list(APPEND TR1_STL_LIT_COMMAND "${STL_LIT}" - "${ADDITIONAL_LIT_FLAGS}" - "${TR1_ADDITIONAL_LIT_FLAGS}" - "${CMAKE_CURRENT_SOURCE_DIR}") - -add_test(NAME tr1 COMMAND ${Python3_EXECUTABLE} ${TR1_STL_LIT_COMMAND} COMMAND_EXPAND_LISTS) -set_tests_properties(tr1 PROPERTIES RUN_SERIAL TRUE) diff --git a/tests/tr1/include/tfuns.h b/tests/tr1/include/tfuns.h index f365a8987e8..042041ed73d 100644 --- a/tests/tr1/include/tfuns.h +++ b/tests/tr1/include/tfuns.h @@ -6,6 +6,11 @@ #pragma warning(push) #pragma warning(disable : 5215) // '%s' a function parameter with volatile qualified type is deprecated in C++20 +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-volatile" +#endif + struct funobj; static int f0(); static int f1(const volatile funobj); @@ -629,3 +634,7 @@ const T& fake_lvalue(const T&& t) { // C++11 12.2 [class.temporary]/5: "A tempor } #pragma warning(pop) + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif diff --git a/tests/tr1/lit.site.cfg.in b/tests/tr1/lit.site.cfg.in index 56b631e9d68..961d571ab22 100644 --- a/tests/tr1/lit.site.cfg.in +++ b/tests/tr1/lit.site.cfg.in @@ -1,18 +1,18 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -config.cxx_archive_root = "@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@" -config.cxx_headers = "@STL_TESTED_HEADERS_DIR@" -config.cxx_library_root = "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@" -config.cxx_runtime_root = "@CMAKE_RUNTIME_OUTPUT_DIRECTORY@" -config.expected_results_list_path = "@TR1_EXPECTED_RESULTS@" -config.include_dirs = ["@STL_SOURCE_DIR@/tests/tr1/include"] -config.msvc_toolset_libs_root = "@TOOLSET_LIB@" -config.stl_build_root = "@STL_BUILD_ROOT@" -config.stl_src_root = "@STL_SOURCE_DIR@" -config.target_arch = "@VCLIBS_TARGET_ARCHITECTURE@" -config.test_exec_root = "@TR1_TEST_OUTPUT_DIR@" -config.test_subdirs_file = "@TR1_TEST_SUBDIRS_FILE@" -config.test_subdirs_root = "@TR1_TEST_SUBDIRS_ROOT@" +config.cxx_archive_root = "@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@" +config.cxx_headers = "@STL_TESTED_HEADERS_DIR@" +config.cxx_library_root = "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@" +config.cxx_runtime_root = "@CMAKE_RUNTIME_OUTPUT_DIRECTORY@" +config.test_type_overrides_path = "@TR1_TEST_TYPE_OVERRIDES@" +config.include_dirs = ["@STL_SOURCE_DIR@/tests/tr1/include"] +config.msvc_toolset_libs_root = "@TOOLSET_LIB@" +config.stl_build_root = "@STL_BUILD_ROOT@" +config.stl_src_root = "@STL_SOURCE_DIR@" +config.target_arch = "@VCLIBS_TARGET_ARCHITECTURE@" +config.test_exec_root = "@TR1_TEST_OUTPUT_DIR@" +config.test_subdirs_file = "@TR1_TEST_SUBDIRS_FILE@" +config.test_subdirs_root = "@TR1_TEST_SUBDIRS_ROOT@" lit_config.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/lit.cfg") diff --git a/tests/tr1/expected_results.txt b/tests/tr1/test_type_overrides.txt similarity index 100% rename from tests/tr1/expected_results.txt rename to tests/tr1/test_type_overrides.txt diff --git a/tests/tr1/tests/cvt/sjis_0208/test.cpp b/tests/tr1/tests/cvt/sjis_0208/test.cpp index 1b889584c24..27984cf0caf 100644 --- a/tests/tr1/tests/cvt/sjis_0208/test.cpp +++ b/tests/tr1/tests/cvt/sjis_0208/test.cpp @@ -1,11 +1,100 @@ // Copyright (c) Microsoft Corporation. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +#include +#include +#include + #include "tdefs.h" #include -#define NCHARS 0x10000 -#define MYWC_MAX 0x7e7e #define MYFILE "sjis_0208" -#define MYNAME stdext::cvt::codecvt_sjis_0208 +#define MYNAME stdext::cvt::codecvt_sjis_0208 +#define MYMAKE mymake +#define MYWCHAR wchar_t + +using namespace std; + +using Myistream = basic_istream; +using Myostream = basic_ostream; +using Mystring = basic_string; +using Mysconvert = stdext::cvt::wstring_convert; + +Mystring mymake() { + Mystring mystring; + Mysconvert myconv(""); + + // All ASCII and modified ASCII characters single byte characters + for (unsigned long ch = 0; ch <= 0x7f; ++ch) { + string buf = myconv.to_bytes((MYWCHAR) ch); + if (0 < buf.size() && ch != static_cast(WEOF)) { + mystring.insert(mystring.end(), (MYWCHAR) ch); + } + } + + // All single byte katakana + for (unsigned long ch = 0xa1; ch <= 0xe0; ++ch) { + string buf = myconv.to_bytes((MYWCHAR) ch); + if (0 < buf.size() && ch != static_cast(WEOF)) { + mystring.insert(mystring.end(), (MYWCHAR) ch); + } + } + + // First set of two byte characters with odd first bytes + for (unsigned long ch = 0x8100; ch <= 0xa000; ch += 0x0200) { + for (unsigned long offset = 0x40; offset < 0x7f; ++offset) { + string buf = myconv.to_bytes((MYWCHAR) (ch + offset)); + if (0 < buf.size() && (ch + offset) != static_cast(WEOF)) { + mystring.insert(mystring.end(), (MYWCHAR) (ch + offset)); + } + } + + for (unsigned long offset = 0x8A; offset < 0x9f; ++offset) { + string buf = myconv.to_bytes((MYWCHAR) (ch + offset)); + if (0 < buf.size() && (ch + offset) != static_cast(WEOF)) { + mystring.insert(mystring.end(), (MYWCHAR) (ch + offset)); + } + } + } + + // First set of two byte characters with even first bytes + for (unsigned long ch = 0x8200; ch <= 0xa000; ch += 0x0200) { + for (unsigned long offset = 0x9f; offset < 0xfd; ++offset) { + string buf = myconv.to_bytes((MYWCHAR) (ch + offset)); + if (0 < buf.size() && (ch + offset) != static_cast(WEOF)) { + mystring.insert(mystring.end(), (MYWCHAR) (ch + offset)); + } + } + } + + // Second set of two byte characters with odd first bytes + for (unsigned long ch = 0xe100; ch <= 0xf000; ch += 0x0200) { + for (unsigned long offset = 0x40; offset < 0x7f; ++offset) { + string buf = myconv.to_bytes((MYWCHAR) (ch + offset)); + if (0 < buf.size() && (ch + offset) != static_cast(WEOF)) { + mystring.insert(mystring.end(), (MYWCHAR) (ch + offset)); + } + } + + for (unsigned long offset = 0x8A; offset < 0x9f; ++offset) { + string buf = myconv.to_bytes((MYWCHAR) (ch + offset)); + if (0 < buf.size() && (ch + offset) != static_cast(WEOF)) { + mystring.insert(mystring.end(), (MYWCHAR) (ch + offset)); + } + } + } + + // Second set of two byte characters with even first bytes + for (unsigned long ch = 0xe000; ch <= 0xf000; ch += 0x0200) { + for (unsigned long offset = 0x9f; offset < 0xfd; ++offset) { + string buf = myconv.to_bytes((MYWCHAR) (ch + offset)); + if (0 < buf.size() && (ch + offset) != static_cast(WEOF)) { + mystring.insert(mystring.end(), (MYWCHAR) (ch + offset)); + } + } + } + + return mystring; +} + #include diff --git a/tests/utils/stl/compiler.py b/tests/utils/stl/compiler.py index 6a638046938..84a909cb8d4 100644 --- a/tests/utils/stl/compiler.py +++ b/tests/utils/stl/compiler.py @@ -11,8 +11,6 @@ from typing import List import os -import stl.util - class CXXCompiler: CM_Default = 0 @@ -35,7 +33,7 @@ def __init__(self, path, flags=None, compile_flags=None, self.compile_env = compile_env - def _basicCmd(self, source_files: List[Path], out: Path, + def _basicCmd(self, source_files: List[Path], out: Path, cwd: Path, mode=CM_Default, flags=[], compile_flags=[], link_flags=[], skip_mode_flags=False): out_files = [] @@ -59,7 +57,7 @@ def _basicCmd(self, source_files: List[Path], out: Path, else: for source_file in source_files: out_files.append( - Path(source_file.name.rsplit('.', 1)[0] + '.obj')) + cwd / (source_file.name.rsplit('.', 1)[0] + '.obj')) elif mode == self.CM_Analyze: if not skip_mode_flags: cmd.append('/analyze:only') @@ -68,8 +66,8 @@ def _basicCmd(self, source_files: List[Path], out: Path, else: for source_file in source_files: out_files.append( - Path(source_file.name.rsplit('.', 1)[0] + - '.nativecodeanalysis.xml')) + cwd / (source_file.name.rsplit('.', 1)[0] + + '.nativecodeanalysis.xml')) elif out is not None: cmd.append('/Fe' + str(out)) @@ -80,7 +78,7 @@ def _basicCmd(self, source_files: List[Path], out: Path, else: for source_file in source_files: out_files.append( - Path(source_file.name.rsplit('.', 1)[0] + '.obj')) + cwd / (source_file.name.rsplit('.', 1)[0] + '.obj')) if mode in (self.CM_Analyze, self.CM_Compile, self.CM_Default): cmd.extend(self.compile_flags) @@ -97,7 +95,7 @@ def _basicCmd(self, source_files: List[Path], out: Path, return cmd, out_files - def executeBasedOnFlagsCmd(self, source_files, out_dir, cwd=None, + def executeBasedOnFlagsCmd(self, source_files, out_dir, cwd, out_base=None, flags=[], compile_flags=[], link_flags=[]): mode = self.CM_Default @@ -133,78 +131,6 @@ def executeBasedOnFlagsCmd(self, source_files, out_dir, cwd=None, flags.append('/analyze:log' + str(out_dir / (out_base + '.nativecodeanalysis.xml'))) - cmd, out_files = self._basicCmd(source_files, output_file, mode, flags, - compile_flags, link_flags, True) + cmd, out_files = self._basicCmd(source_files, output_file, cwd, mode, + flags, compile_flags, link_flags, True) return cmd, out_files, exec_file - - def executeBasedOnFlags(self, source_files, out_dir, cwd=None, - out_base=None, flags=[], compile_flags=[], - link_flags=[]): - cmd, out_files, exec_file = \ - self.executeBasedOnFlagsCmd(source_files, out_dir, cwd, out_base, - flags, compile_flags, link_flags) - out, err, rc = stl.util.executeCommand(cmd, env=self.compile_env, - cwd=cwd) - return cmd, out, err, rc, out_files, exec_file - - def preprocessCmd(self, source_files, out=None, flags=[]): - return self._basicCmd(source_files, out, flags=flags, compile_flags=[], - link_flags=[], mode=self.CM_PreProcess) - - def compileCmd(self, source_files, out=None, flags=[]): - return self._basicCmd(source_files, out, flags=flags, compile_flags=[], - link_flags=[], mode=self.CM_Compile) - - def linkCmd(self, source_files, out=None, flags=[]): - return self._basicCmd(source_files, out, flags=flags, compile_flags=[], - link_flags=[], mode=self.CM_Link) - - def compileLinkCmd(self, source_files, out=None, flags=[]): - return self._basicCmd(source_files, out, flags=flags, compile_flags=[], - link_flags=[]) - - def preprocess(self, source_files, out=None, flags=[], cwd=None): - cmd, _ = self.preprocessCmd(source_files, out, flags) - out, err, rc = stl.util.executeCommand(cmd, env=self.compile_env, - cwd=cwd) - return cmd, out, err, rc - - def compile(self, source_files, out=None, flags=[], cwd=None): - cmd, _ = self.compileCmd(source_files, out, flags) - out, err, rc = stl.util.executeCommand(cmd, env=self.compile_env, - cwd=cwd) - return cmd, out, err, rc - - def link(self, source_files, exec_path=None, flags=[], cwd=None): - cmd, _ = self.linkCmd(source_files, exec_path, flags) - out, err, rc = stl.util.executeCommand(cmd, env=self.compile_env, - cwd=cwd) - return cmd, out, err, rc - - def compileLink(self, source_files, exec_path=None, flags=[], - cwd=None): - cmd, _ = self.compileLinkCmd(source_files, exec_path, flags) - out, err, rc = stl.util.executeCommand(cmd, env=self.compile_env, - cwd=cwd) - return cmd, out, err, rc - - def compileLinkTwoSteps(self, source_file, out=None, object_file=None, - flags=[], cwd=None): - if not isinstance(source_file, str): - raise TypeError('This function only accepts a single input file') - if object_file is None: - # Create, use, and delete a temporary object file if none is given. - def with_fn(): return stl.util.guardedTempFilename(suffix='.obj') - else: - # Otherwise wrap the filename in a context manager function. - def with_fn(): return stl.util.nullContext(object_file) - with with_fn() as object_file: - cc_cmd, cc_stdout, cc_stderr, rc = self.compile( - source_file, object_file, flags=flags, cwd=cwd) - if rc != 0: - return cc_cmd, cc_stdout, cc_stderr, rc - - link_cmd, link_stdout, link_stderr, rc = self.link( - object_file, exec_path=out, flags=flags, cwd=cwd) - return (cc_cmd + ['&'] + link_cmd, cc_stdout + link_stdout, - cc_stderr + link_stderr, rc) diff --git a/tests/utils/stl/test/config.py b/tests/utils/stl/test/config.py index cf9587846a2..fa4c8cb1e42 100644 --- a/tests/utils/stl/test/config.py +++ b/tests/utils/stl/test/config.py @@ -9,9 +9,10 @@ from pathlib import Path import os import platform +import re import shlex -from stl.test.executor import LocalExecutor +from stl.test.executor import BuildStepWriter, LocalTestStepWriter from stl.compiler import CXXCompiler import stl.util import stl.test.file_parsing @@ -34,15 +35,12 @@ def __init__(self, lit_config, config): self.cxx_runtime_root = None self.default_compiler = None self.execute_external = False - self.expected_results_list_path = None - self.expected_results_list_root = None self.format_name = None self.lit_config = lit_config self.link_shared = True self.long_tests = None self.msvc_toolset_libs_root = None self.stl_build_root = None - self.stl_inc_env_var = None self.stl_lib_env_var = None self.stl_path_env_var = None self.stl_src_root = None @@ -51,6 +49,8 @@ def __init__(self, lit_config, config): self.target_info = stl.test.target_info.WindowsLocalTI(lit_config) self.test_executor = None self.test_source_root = None + self.test_type_overrides_path = None + self.test_type_overrides_root = None def get_lit_conf(self, name, default=None): val = self.lit_config.params.get(name, None) @@ -90,7 +90,7 @@ def configure(self): self.configure_features() self.configure_default_compiler() self.configure_executors() - self.configure_expected_results() + self.configure_test_type_overrides() self.configure_test_dirs() self.configure_test_format() @@ -237,42 +237,6 @@ def configure_library_roots(self): self.cxx_runtime_root = Path(cxx_runtime_root) self.cxx_library_root = Path(cxx_library_root) - def configure_inc_env_var(self): - stl_inc_env_var = self.get_lit_conf('stl_inc_env_var', None) - - if stl_inc_env_var is None: - stl_inc_env_var = self.config.environment.get('INCLUDE', '') - - if self.cxx_headers is None: - self.configure_cxx_headers() - - include_dirs = self.get_lit_conf('include_dirs', []) - - if stl_inc_env_var != '': - stl_inc_env_var = ';'.join((str(self.cxx_headers), - *include_dirs, - stl_inc_env_var)) - else: - stl_inc_env_var = ';'.join((str(self.cxx_headers), - *include_dirs)) - - self.stl_inc_env_var = stl_inc_env_var - - # Note: This relies on kernel32.lib and ucrt.lib being in the LIB env var - def configure_lib_env_var(self): - stl_lib_env_var = self.get_lit_conf('stl_lib_env_var', None) - - if stl_lib_env_var is None: - stl_lib_env_var = self.config.environment.get('LIB', '') - - if stl_lib_env_var != '': - stl_lib_env_var = ';'.join((str(self.cxx_library_root), - stl_lib_env_var)) - else: - stl_lib_env_var = str(self.cxx_library_root) - - self.stl_lib_env_var = stl_lib_env_var - def configure_path_env_var(self): stl_path_env_var = self.get_lit_conf('stl_path_env_var', None) @@ -289,56 +253,45 @@ def configure_path_env_var(self): config_env = self.config.environment.get('PATH', None) if config_env is not None: - path_list.append(config_env) + path_list.append(config_env.strip('; ').replace(';;', ';')) stl_path_env_var = ';'.join(path_list) self.stl_path_env_var = stl_path_env_var def configure_test_env(self): - stl_test_env = self.get_lit_conf('stl_test_env', None) - - if stl_test_env is None: - stl_test_env = self.config.environment - - if self.stl_lib_env_var is None: - self.configure_inc_env_var() - - if self.stl_lib_env_var is None: - self.configure_lib_env_var() - if self.stl_path_env_var is None: self.configure_path_env_var() - stl_test_env['INCLUDE'] = self.stl_inc_env_var - stl_test_env['LIB'] = self.stl_lib_env_var + stl_test_env = {} stl_test_env['PATH'] = self.stl_path_env_var self.config.environment = stl_test_env - def configure_expected_results_list_location(self): - expected_results_list_path = self.get_lit_conf( - 'expected_results_list_path', None) + def configure_test_type_overrides_location(self): + test_type_overrides_path = self.get_lit_conf( + 'test_type_overrides_path', None) - if expected_results_list_path is not None: - self.expected_results_list_path = Path( - expected_results_list_path) + if test_type_overrides_path is not None: + self.test_type_overrides_path = Path( + test_type_overrides_path) else: - self.expected_results_list_path = Path(os.devnull) + self.test_type_overrides_path = Path(os.devnull) - def configure_expected_results(self): - expected_results = getattr(self.lit_config, 'expected_results', dict()) + def configure_test_type_overrides(self): + test_type_overrides = getattr(self.lit_config, 'test_type_overrides', + dict()) - if self.expected_results_list_path is None: - self.configure_expected_results_list_location() + if self.test_type_overrides_path is None: + self.configure_test_type_overrides_location() - expected_results[self.config.name] = \ - stl.test.file_parsing.parse_result_file( - self.expected_results_list_path) + test_type_overrides[self.config.name] = \ + stl.test.file_parsing.parse_test_type_file( + self.test_type_overrides_path) - self.lit_config.expected_results = expected_results - self.config.expected_results = \ - getattr(self.config, 'expected_results', dict()) + self.lit_config.test_type_overrides = test_type_overrides + self.config.test_type_overrides = \ + getattr(self.config, 'test_type_overrides', dict()) def configure_default_compiler(self): self.default_compiler = CXXCompiler(None) @@ -348,10 +301,9 @@ def configure_default_compiler(self): self.default_compiler.compile_env = self.config.environment - # TRANSITION: Investigate using SSHExecutor for ARM def configure_executors(self): - self.build_executor = LocalExecutor() - self.test_executor = LocalExecutor() + self.build_step_writer = BuildStepWriter() + self.test_step_writer = LocalTestStepWriter() def configure_compile_flags(self): self.configure_compile_flags_header_includes() @@ -423,8 +375,8 @@ def get_test_format(self): return getattr(stl.test.format, self.format_name)( self.default_compiler, self.execute_external, - self.build_executor, - self.test_executor) + self.build_step_writer, + self.test_step_writer) # TRANSITION: Might be nice to actually print something def print_config_info(self): diff --git a/tests/utils/stl/test/executor.py b/tests/utils/stl/test/executor.py index cee2b71bf7f..5e22af081b7 100644 --- a/tests/utils/stl/test/executor.py +++ b/tests/utils/stl/test/executor.py @@ -1,235 +1,116 @@ -#===----------------------------------------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -#===----------------------------------------------------------------------===## - -import platform +from pathlib import Path import os -import posixpath -import ntpath - -from stl.test import tracing -from stl.util import executeCommand - - -class Executor: - def __init__(self): - self.target_info = None - - def run(self, cmd, local_cwd, file_deps=None, env=None): - """Execute a command. - Be very careful not to change shared state in this function. - Executor objects are shared between python processes in `lit -jN`. - Args: - cmd: [str]: subprocess.call style command - local_cwd: str: Local path to the working directory - file_deps: [str]: Files required by the cmd - env: {str: str}: Environment variables to execute under - Returns: - cmd, out, err, exitCode - """ - raise NotImplementedError - - def merge_environments(self, current_env, updated_env): - """Merges two execution environments. - - If both environments contain the PATH variables, they are also merged - using the proper separator. - """ - result_env = dict(current_env) - for k, v in updated_env.items(): - if k == 'PATH' and self.target_info: - self.target_info.add_path(result_env, v) - else: - result_env[k] = v - return result_env - - -class LocalExecutor(Executor): - def __init__(self): - super(LocalExecutor, self).__init__() - self.is_windows = platform.system() == 'Windows' - - def run(self, cmd, work_dir='.', file_deps=None, env=None): - if str(work_dir) == '.': - work_dir = os.getcwd() - - if env: - env = self.merge_environments(os.environ, env) - - out, err, rc = executeCommand(cmd, cwd=work_dir, env=env) - return (cmd, out, err, rc) - - -class PrefixExecutor(Executor): - """Prefix an executor with some other command wrapper. - - Most useful for setting ulimits on commands, or running an emulator like - qemu and valgrind. - """ - def __init__(self, commandPrefix, chain): - super(PrefixExecutor, self).__init__() - - self.commandPrefix = commandPrefix - self.chain = chain - - def run(self, exe_path, cmd=None, work_dir='.', file_deps=None, env=None): - cmd = cmd or [exe_path] - return self.chain.run(exe_path, self.commandPrefix + cmd, work_dir, - file_deps, env=env) -class PostfixExecutor(Executor): - """Postfix an executor with some args.""" - def __init__(self, commandPostfix, chain): - super(PostfixExecutor, self).__init__() +def get_working_directory(step): + work_dir = Path() + if str(step.work_dir) == '.': + work_dir = Path(os.getcwd()) + else: + work_dir = step.work_dir - self.commandPostfix = commandPostfix - self.chain = chain + return work_dir - def run(self, exe_path, cmd=None, work_dir='.', file_deps=None, env=None): - cmd = cmd or [exe_path] - return self.chain.run(cmd + self.commandPostfix, work_dir, file_deps, - env=env) - -class RemoteExecutor(Executor): - def __init__(self): - super(RemoteExecutor, self).__init__() - self.local_run = executeCommand - - def remote_temp_dir(self): - return self._remote_temp(True) - - def remote_temp_file(self): - return self._remote_temp(False) - - def _remote_temp(self, is_dir): - raise NotImplementedError() - - def copy_in(self, local_srcs, remote_dsts): - # This could be wrapped up in a tar->scp->untar for performance - # if there are lots of files to be copied/moved - for src, dst in zip(local_srcs, remote_dsts): - self._copy_in_file(src, dst) - - def _copy_in_file(self, src, dst): - raise NotImplementedError() - - def delete_remote(self, remote): - try: - self._execute_command_remote(['rm', '-rf', remote]) - except OSError: - # TRANSITION: Log failure to delete? - pass - - def run(self, exe_path, cmd=None, work_dir='.', file_deps=None, env=None): - target_exe_path = None - target_cwd = None - try: - target_cwd = self.remote_temp_dir() - executable_name = 'libcxx_test.exe' - if self.target_info.is_windows(): - target_exe_path = ntpath.join(target_cwd, executable_name) - else: - target_exe_path = posixpath.join(target_cwd, executable_name) - - if cmd: - # Replace exe_path with target_exe_path. - cmd = [c if c != exe_path else target_exe_path for c in cmd] - else: - cmd = [target_exe_path] - - srcs = [exe_path] - dsts = [target_exe_path] - if file_deps is not None: - dev_paths = [os.path.join(target_cwd, os.path.basename(f)) - for f in file_deps] - srcs.extend(file_deps) - dsts.extend(dev_paths) - self.copy_in(srcs, dsts) - - # When testing executables that were cross-compiled on Windows for - # Linux, we may need to explicitly set the execution permission to - # avoid the 'Permission denied' error: - chmod_cmd = ['chmod', '+x', target_exe_path] - - return self._execute_command_remote(chmod_cmd + ['&&'] + cmd, - target_cwd, - env) - finally: - if target_cwd: - self.delete_remote(target_cwd) - - def _execute_command_remote(self, cmd, remote_work_dir='.', env=None): - raise NotImplementedError() - - -class SSHExecutor(RemoteExecutor): - def __init__(self, host, username=None): - super(SSHExecutor, self).__init__() - - self.user_prefix = username + '@' if username else '' - self.host = host - self.scp_command = 'scp' - self.ssh_command = 'ssh' - - if False: - self.local_run = tracing.trace_function( - self.local_run, log_calls=True, log_results=True, - label='ssh_local') - - def _remote_temp(self, is_dir): - # TRANSITION: detect what the target system is, and use the correct - # mktemp command for it. (linux and darwin differ here, and I'm - # sure windows has another way to do it) - - # Not sure how to do suffix on osx yet - dir_arg = '-d' if is_dir else '' - cmd = 'mktemp -q {} /tmp/stl.XXXXXXXXXX'.format(dir_arg) - _, temp_path, err, exitCode = self._execute_command_remote([cmd]) - temp_path = temp_path.strip() - if exitCode != 0: - raise RuntimeError(err) - return temp_path - - def _copy_in_file(self, src, dst): - scp = self.scp_command - remote = self.host - remote = self.user_prefix + remote - cmd = [scp, '-p', src, remote + ':' + dst] - self.local_run(cmd) - - def _export_command(self, env): - if not env: - return [] - - export_cmd = ['export'] - - for k, v in env.items(): - v = v.replace('\\', '\\\\') - if k == 'PATH': - # Pick up the existing paths, so we don't lose any commands - if self.target_info and self.target_info.is_windows(): - export_cmd.append('PATH="%s;%PATH%"' % v) - else: - export_cmd.append('PATH="%s:$PATH"' % v) +def merge_environments(current_env, updated_env, appended_vars={'PATH'}): + result_env = dict(current_env) + for k, v in updated_env.items(): + if k in appended_vars: + current_v = result_env.get(k) + if current_v: + result_env[k] = v + ';' + current_v else: - export_cmd.append('"%s"="%s"' % (k, v)) - - return export_cmd - - def _execute_command_remote(self, cmd, remote_work_dir='.', env=None): - remote = self.user_prefix + self.host - ssh_cmd = [self.ssh_command, '-oBatchMode=yes', remote] - export_cmd = self._export_command(env) - remote_cmd = ' '.join(cmd) - if export_cmd: - remote_cmd = ' '.join(export_cmd) + ' && ' + remote_cmd - if remote_work_dir != '.': - remote_cmd = 'cd ' + remote_work_dir + ' && ' + remote_cmd - out, err, rc = self.local_run(ssh_cmd + [remote_cmd]) - return (remote_cmd, out, err, rc) + result_env[k] = v + else: + result_env[k] = v + return result_env + + +class BuildStepWriter: + def write(self, test, step, test_file_handle): + work_dir = get_working_directory(step) + + build_cmd = '"' + step.cmd[0] + '"' + args = '"' + '" "'.join(step.cmd[1:]) + '"' + build_cmd = build_cmd.replace('\\', '/') + args = args.replace('\\', '/') + + pass_string = \ + 'add_custom_command(OUTPUT {out} COMMAND {cmd} ARGS {args} DEPENDS msvcpd_implib msvcp_implib libcpmt libcpmt1 libcpmtd libcpmtd1 libcpmtd0 {deps} WORKING_DIRECTORY "{cwd}")\nadd_custom_target({name} ALL DEPENDS {out})' + fail_string = \ + 'add_test(NAME {name} COMMAND {cmd} WORKING_DIRECTORY "{cwd}")\nset_property(TEST {name} PROPERTY WILL_FAIL TRUE)' + env_prop = \ + 'set_property(TEST {name} PROPERTY ENVIRONMENT {env})' + + if not step.should_fail: + name = test.getFullName() + '_' + str(step.num) + print(pass_string.format(out=' '.join(map(lambda dep: dep.as_posix(), step.out_files)), + cmd=build_cmd, + args=args, + deps='"' + '" "'.join(map(lambda dep: dep.as_posix(), step.dependencies)) + '"', + cwd=work_dir.as_posix(), + name=name), + file=test_file_handle) + else: + print(fail_string.format(name=test.getFullName(), + cmd=build_cmd + ' ' + args, + cwd=work_dir.as_posix()), + file=test_file_handle) + + if len(step.env): + env_list = [] + for k, v in step.env.items(): + env_list.append(k + '=' + v) + cmake_env_list = \ + '"' + \ + '" "'.join(env_list).replace('\\', '/').replace(';', '\\;') + \ + '"' + + print(env_prop.format(name=test.getFullName(), + env=cmake_env_list), + file=test_file_handle) + + +class LocalTestStepWriter: + def write(self, test, step, test_file_handle): + work_dir = get_working_directory(step) + + cmd = '"' + '" "'.join(step.cmd).replace('\\', '/') + '"' + + test_string = \ + 'add_test(NAME {name} COMMAND {cmd} WORKING_DIRECTORY "{cwd}")' + env_prop = \ + 'set_property(TEST {name} PROPERTY ENVIRONMENT {env})' + fail_string = \ + 'set_property(TEST {name} PROPERTY WILL_FAIL TRUE)' + depends_string = \ + 'set_property(TEST {name} PROPERTY DEPENDS {prev_test})' + + test_name = test.getFullName() + '_' + str(step.num) + print(test_string.format(name=test_name, + cmd=cmd, + cwd=work_dir.as_posix()), + file=test_file_handle) + + if len(step.env): + env_list = [] + for k, v in step.env.items(): + env_list.append(k + '=' + v) + cmake_env_list = \ + '"' + \ + '" "'.join(env_list).replace('\\', '/').replace(';', '\\;') + \ + '"' + + print(env_prop.format(name=test_name, env=cmake_env_list), + file=test_file_handle) + + if step.should_fail: + print(fail_string.format(name=test_name), + file=test_file_handle) + + if step.num != 0: + prev_test = \ + test.getFullName() + '_' + str(step.num - 1) + print(depends_string.format(name=test_name, + prev_test=prev_test), + file=test_file_handle) diff --git a/tests/utils/stl/test/file_parsing.py b/tests/utils/stl/test/file_parsing.py index 9a1308b9d5a..f97ffb0cc24 100644 --- a/tests/utils/stl/test/file_parsing.py +++ b/tests/utils/stl/test/file_parsing.py @@ -11,11 +11,11 @@ import lit.Test -import stl.test.tests +from stl.test.tests import TestType _envlst_cache = dict() _preprocessed_file_cache = dict() -_expected_result_entry_cache = dict() +_test_type_entry_cache = dict() @dataclass @@ -52,7 +52,7 @@ class _ParseCtx: _INCLUDE_REGEX = re.compile(r'^RUNALL_INCLUDE (?P.+$)') _ENV_VAR_MULTI_ITEM_REGEX = re.compile(r'(?P\w+)="(?P.*?)"') _CROSSLIST_REGEX = re.compile(r'^RUNALL_CROSSLIST$') -_EXPECTED_RESULT_REGEX = re.compile(r'^(?P.*) (?P.*?)$') +_EXPECTED_RESULT_REGEX = re.compile(r'^(?P.*) (?P.*?)$') def _parse_env_line(line: str) -> Optional[_TmpEnvEntry]: @@ -110,22 +110,19 @@ def parse_commented_file(filename: Union[str, bytes, os.PathLike]) \ return result -def parse_result_file(filename: Union[str, bytes, os.PathLike]) \ +def parse_test_type_file(filename: Union[str, bytes, os.PathLike]) \ -> Dict[str, lit.Test.ResultCode]: - if str(filename) in _expected_result_entry_cache: - return _expected_result_entry_cache[str(filename)] + if str(filename) in _test_type_entry_cache: + return _test_type_entry_cache[str(filename)] res = dict() for line in parse_commented_file(filename): m = _EXPECTED_RESULT_REGEX.match(line) prefix = m.group("prefix") - result = m.group("result") - result_code = getattr(lit.Test, result, None) - if result_code is None: - result_code = getattr(stl.test.tests, result) - res[prefix] = result_code + type = getattr(TestType, m.group("type")) + res[prefix] = type - _expected_result_entry_cache[str(filename)] = res + _test_type_entry_cache[str(filename)] = res return res diff --git a/tests/utils/stl/test/format.py b/tests/utils/stl/test/format.py index 8132ba29b3f..5460c8bae4b 100644 --- a/tests/utils/stl/test/format.py +++ b/tests/utils/stl/test/format.py @@ -8,18 +8,16 @@ from dataclasses import dataclass, field from pathlib import Path -from typing import Dict, List, Optional +from typing import Dict, List import copy import itertools -import errno import os import shutil -import time import lit.Test # pylint: disable=import-error import lit.TestRunner # pylint: disable=import-error -from stl.test.tests import STLTest, LibcxxTest +from stl.test.tests import STLTest, LibcxxTest, TestType import stl.test.file_parsing import stl.util @@ -27,10 +25,15 @@ @dataclass class TestStep: cmd: List[str] = field(default_factory=list) - work_dir: os.PathLike = field(default=Path('.')) - file_deps: List[os.PathLike] = field(default_factory=list) + dependencies: List[os.PathLike] = field(default_factory=list) env: Dict[str, str] = field(default_factory=dict) + num: int = field(default=0) + out_files: List[os.PathLike] = field(default_factory=list) should_fail: bool = field(default=False) + work_dir: os.PathLike = field(default=Path('.')) + + +_test_suite_file_handles = {} class STLTestFormat: @@ -39,11 +42,52 @@ class STLTestFormat: """ def __init__(self, default_cxx, execute_external, - build_executor, test_executor): + build_step_writer, test_step_writer): self.cxx = default_cxx self.execute_external = execute_external - self.build_executor = build_executor - self.test_executor = test_executor + self.build_step_writer = build_step_writer + self.test_step_writer = test_step_writer + + def getSteps(self, test, lit_config): + class SharedState: + def __init__(self, test): + self.exec_dir = test.getExecDir() + self.exec_env = test.cxx.compile_env + self.exec_env['TMP'] = str(self.exec_dir) + self.exec_env['TEMP'] = str(self.exec_dir) + self.exec_env['TMPDIR'] = str(self.exec_dir) + self.exec_env['TEMPDIR'] = str(self.exec_dir) + self.exec_file = None + + shared = SharedState(test) + return self.getBuildSteps(test, lit_config, shared), \ + self.getTestSteps(test, lit_config, shared) + + def getBuildSteps(self, test, lit_config, shared): + output_base = test.getOutputBaseName() + output_dir = test.getOutputDir() + source_path = Path(test.getSourcePath()) + + cmd, out_files, shared.exec_file = \ + test.cxx.executeBasedOnFlagsCmd([source_path], output_dir, + shared.exec_dir, output_base, + [], [], []) + + yield TestStep(cmd=cmd, dependencies=[source_path], + env=shared.exec_env, out_files=out_files, + should_fail=not test.shouldBuild(), + work_dir=shared.exec_dir) + + def getTestSteps(self, test, lit_config, shared): + if shared.exec_file is None: + return + + if test.test_type in (TestType.RUN_PASS, TestType.RUN_FAIL): + yield TestStep(cmd=[str(shared.exec_file)], + dependencies=[shared.exec_file], + env=shared.exec_env, + should_fail=test.test_type is TestType.RUN_FAIL, + work_dir=shared.exec_dir) def isLegalDirectory(self, source_path, litConfig): found = False @@ -71,6 +115,14 @@ def getEnvLst(self, source_path, localConfig): def getTestsInDirectory(self, testSuite, path_in_suite, litConfig, localConfig, test_class=STLTest): + if testSuite.name not in _test_suite_file_handles: + test_list = Path(testSuite.exec_root) / 'tests.cmake' + _test_suite_file_handles[testSuite.name] = test_list.open('w') + + global_prop_string = \ + 'set_property(GLOBAL APPEND PROPERTY STL_LIT_GENERATED_FILES {})' + include_string = '\ninclude({})' + source_path = testSuite.getSourcePath(path_in_suite) if not self.isLegalDirectory(source_path, litConfig): @@ -95,17 +147,26 @@ def getTestsInDirectory(self, testSuite, path_in_suite, stl.test.file_parsing.parse_env_lst_file(envlst_path) format_string = "{:0" + str(len(str(len(env_entries)))) + \ "d}" + for env_entry, env_num \ in zip(env_entries, itertools.count()): test_config = copy.deepcopy(localConfig) test_path_in_suite = path_in_suite + (filename,) - yield test_class(testSuite, - test_path_in_suite, - litConfig, test_config, - env_entry, - format_string.format(env_num), - self.cxx) + test = test_class(testSuite, test_path_in_suite, + litConfig, test_config, env_entry, + format_string.format(env_num), + self.cxx) + + if test.script_result is None: + test_file = test.getTestFilePath().as_posix() + out_string = global_prop_string.format(test_file) + out_string += include_string.format(test_file) + out_handle = \ + _test_suite_file_handles[testSuite.name] + print(out_string, file=out_handle) + + yield test def setup(self, test): exec_dir = test.getExecDir() @@ -123,159 +184,27 @@ def setup(self, test): if path.is_file() and path.name.endswith('.dat'): shutil.copy2(path, exec_dir / path.name) - def cleanup(self, test): - shutil.rmtree(test.getExecDir(), ignore_errors=True) - shutil.rmtree(test.getOutputDir(), ignore_errors=True) - - def getIntegratedScriptResult(self, test, lit_config): - if test.skipped: - return (lit.Test.SKIPPED, "Test was marked as skipped") - - name = test.path_in_suite[-1] - name_root, name_ext = os.path.splitext(name) - is_sh_test = name_root.endswith('.sh') - is_objcxx_test = name.endswith('.mm') - - if is_sh_test: - return (lit.Test.UNSUPPORTED, - "Sh tests are currently unsupported") - - if is_objcxx_test: - return (lit.Test.UNSUPPORTED, - "Objective-C tests are unsupported") - - if test.config.unsupported: - return (lit.Test.UNSUPPORTED, - "A lit.local.cfg marked this unsupported") - - if lit_config.noExecute: - return lit.Test.Result(lit.Test.PASS) - - if test.expected_result is None: - script = lit.TestRunner.parseIntegratedTestScript( - test, require_script=False) - - if isinstance(script, lit.Test.Result): - return script - - return None - def execute(self, test, lit_config): - result = None - while True: - try: - result = self._execute(test, lit_config) - break - except OSError as oe: - if oe.errno != errno.ETXTBSY: - raise - time.sleep(0.1) + if test.script_result is not None: + return test.script_result - return result + self.setup(test) + buildSteps, testSteps = self.getSteps(test, lit_config) - def _execute(self, test, lit_config): - # TRANSITION: It is potentially wasteful that all the skipping and - # unsupported logic lives here when it is known at time of test - # discovery. Investigate - script_result = self.getIntegratedScriptResult(test, lit_config) - if script_result is not None: - return script_result + test_file = test.getTestFilePath() try: - self.setup(test) - pass_var, fail_var = test.getPassFailResultCodes() - buildSteps, testSteps = self.getSteps(test, lit_config) - - report = "" - for step in buildSteps: - cmd, out, err, rc = \ - self.build_executor.run(step.cmd, step.work_dir, - step.file_deps, step.env) - - if step.should_fail and rc == 0: - report += "Build step succeeded unexpectedly.\n" - elif rc != 0: - report += "Build step failed unexpectedly.\n" - - report += stl.util.makeReport(cmd, out, err, rc) - if (step.should_fail and rc == 0) or \ - (not step.should_fail and rc != 0): - lit_config.note(report) - return lit.Test.Result(fail_var, report) - - for step in testSteps: - cmd, out, err, rc = \ - self.test_executor.run(step.cmd, step.work_dir, - step.file_deps, step.env) - - if step.should_fail and rc == 0: - report += "Test step succeeded unexpectedly.\n" - elif rc != 0: - report += "Test step failed unexpectedly.\n" - - report += stl.util.makeReport(cmd, out, err, rc) - if (step.should_fail and rc == 0) or \ - (not step.should_fail and rc != 0): - lit_config.note(report) - return lit.Test.Result(fail_var, report) - - return lit.Test.Result(pass_var, report) - + with test_file.open('w') as f: + for step in buildSteps: + self.build_step_writer.write(test, step, f) + for step in testSteps: + self.test_step_writer.write(test, step, f) except Exception as e: lit_config.warning(str(e)) raise e - finally: - self.cleanup(test) - def getSteps(self, test, lit_config): - @dataclass - class SharedState: - exec_file: Optional[os.PathLike] = field(default=None) - exec_dir: os.PathLike = field(default_factory=Path) - - shared = SharedState() - return self.getBuildSteps(test, lit_config, shared), \ - self.getTestSteps(test, lit_config, shared) - - def getBuildSteps(self, test, lit_config, shared): - if not test.path_in_suite[-1].endswith('.fail.cpp'): - shared.exec_dir = test.getExecDir() - output_base = test.getOutputBaseName() - output_dir = test.getOutputDir() - source_path = Path(test.getSourcePath()) - - cmd, out_files, shared.exec_file = \ - test.cxx.executeBasedOnFlagsCmd([source_path], output_dir, - shared.exec_dir, output_base, - [], [], []) - - yield TestStep(cmd, shared.exec_dir, [source_path], - test.cxx.compile_env) - - def getTestSteps(self, test, lit_config, shared): - if shared.exec_file is not None: - exec_env = test.cxx.compile_env - exec_env['TMP'] = str(shared.exec_dir) - - yield TestStep([str(shared.exec_file)], shared.exec_dir, - [shared.exec_file], exec_env) - elif test.path_in_suite[-1].endswith('.fail.cpp'): - exec_dir = test.getExecDir() - source_path = Path(test.getSourcePath()) - - flags = [] - if test.cxx.name == 'cl' and \ - ('/analyze' in test.cxx.flags or - '/analyze' in test.cxx.compile_flags): - output_base = test.getOutputBaseName() - output_dir = test.getOutputDir() - analyze_path = output_dir / (output_base + - '.nativecodeanalysis.xml') - flags.append('/analyze:log' + str(analyze_path)) - - cmd, _ = test.cxx.compileCmd([source_path], os.devnull, flags) - yield TestStep(cmd, exec_dir, [source_path], - test.cxx.compile_env, True) + return lit.Test.Result(lit.Test.PASS, + 'Command file was succesfully written') class LibcxxTestFormat(STLTestFormat): diff --git a/tests/utils/stl/test/tests.py b/tests/utils/stl/test/tests.py index 6555d652143..9517c207571 100644 --- a/tests/utils/stl/test/tests.py +++ b/tests/utils/stl/test/tests.py @@ -9,17 +9,34 @@ from itertools import chain from pathlib import Path -from xml.sax.saxutils import quoteattr +import enum import os +import re import shutil -from lit.Test import FAIL, PASS, SKIPPED, Test, UNSUPPORTED, XPASS, XFAIL +from lit.Test import Test +import lit from stl.compiler import CXXCompiler +_CMAKE_TARGET_NAME_REGEX = re.compile('[^a-zA-Z0-9_.+\-]+') +_name_counter = 0 + _compiler_path_cache = dict() +class TestType(enum.Enum): + COMPILE_PASS = enum.auto() + LINK_PASS = enum.auto() + RUN_PASS = enum.auto() + + COMPILE_FAIL = enum.auto() + LINK_FAIL = enum.auto() + RUN_FAIL = enum.auto() + + SKIPPED = enum.auto() + + class STLTest(Test): def __init__(self, suite, path_in_suite, lit_config, test_config, envlst_entry, env_num, default_cxx, file_path=None): @@ -27,9 +44,12 @@ def __init__(self, suite, path_in_suite, lit_config, test_config, self.skipped = False Test.__init__(self, suite, path_in_suite, test_config, file_path) - self._configure_expected_result(suite, path_in_suite, lit_config, - test_config, env_num) - if self.skipped: + self._configure_name() + self._configure_test_type(suite, path_in_suite, lit_config, + test_config) + if self.test_type is TestType.SKIPPED: + self.script_result = (lit.Test.SKIPPED, + "Test was marked as skipped") return self._configure_cxx(lit_config, envlst_entry, default_cxx) @@ -41,6 +61,46 @@ def __init__(self, suite, path_in_suite, lit_config, test_config, elif flag.startswith('BE', 1): self.requires.append('edg') + self.script_result = self._get_integrated_script_result(lit_config) + + def _get_integrated_script_result(self, lit_config): + name = self.path_in_suite[-1] + name_root, name_ext = os.path.splitext(name) + is_sh_self = name_root.endswith('.sh') + is_objcxx_self = name.endswith('.mm') + + if is_sh_self: + return (lit.Test.UNSUPPORTED, + "Sh selfs are currently unsupported") + + if is_objcxx_self: + return (lit.Test.UNSUPPORTED, + "Objective-C selfs are unsupported") + + if self.config.unsupported: + return (lit.Test.UNSUPPORTED, + "A lit.local.cfg marked this unsupported") + + if lit_config.noExecute: + return lit.Test.Result(lit.Test.PASS) + + script = lit.TestRunner.parseIntegratedTestScript( + self, require_script=False) + + if isinstance(script, lit.Test.Result): + return script + + return None + + def _configure_name(self): + global _name_counter + + self.name = _CMAKE_TARGET_NAME_REGEX.sub( + str(_name_counter), '-'.join(self.path_in_suite[:-1])) + \ + '--' + self.env_num + + _name_counter = _name_counter + 1 + def getOutputDir(self): return Path(os.path.join( self.suite.getExecPath(self.path_in_suite[:-1]))) / self.env_num @@ -54,59 +114,57 @@ def getExecDir(self): def getExecPath(self): return self.getExecDir() / (self.getOutputBaseName() + '.exe') + def getTestFilePath(self): + return self.getOutputDir() / 'test.cmake' + def getTestName(self): - return '/'.join(self.path_in_suite[:-1]) + ":" + self.env_num + return self.name def getFullName(self): - return self.suite.config.name + ' :: ' + self.getTestName() - - def getPassFailResultCodes(self): - should_fail = self.isExpectedToFail() - pass_var = XPASS if should_fail else PASS - fail_var = XFAIL if should_fail else FAIL - - return pass_var, fail_var - - def getXMLOutputTestName(self): - return ':'.join((self.path_in_suite[-2], self.env_num)) - - def getXMLOutputClassName(self): - safe_test_path = [x.replace(".", "_") for x in self.path_in_suite[:-1]] - safe_suite_name = self.suite.name.replace(".", "-") - - if safe_test_path: - return safe_suite_name + "." + "/".join(safe_test_path) - else: - return safe_suite_name + "." + safe_suite_name + return self.suite.config.name + '--' + self.getTestName() - def _configure_expected_result(self, suite, path_in_suite, lit_config, - test_config, env_num): - test_name = self.getTestName() - self.expected_result = None + def _configure_test_type(self, suite, path_in_suite, lit_config, + test_config): + test_name = '/'.join(path_in_suite) + ':' + self.env_num + self.test_type = None current_prefix = "" - for prefix, result in \ - chain(test_config.expected_results.items(), - lit_config.expected_results.get(test_config.name, - dict()).items()): + for prefix, type in \ + chain(test_config.test_type_overrides.items(), + lit_config.test_type_overrides.get(test_config.name, + dict()).items()): if test_name == prefix: - self.expected_result = result - break + self.test_type = type + return elif test_name.startswith(prefix) and \ len(prefix) > len(current_prefix): current_prefix = prefix - self.expected_result = result + self.test_type = type - if test_name in test_config.expected_results: - self.expected_result = test_config.expected_results[test_name] - elif test_name in lit_config.expected_results: - self.expected_result = lit_config.expected_results[test_name] + if self.test_type is not None: + return + + filename = path_in_suite[-1] + if filename.endswith('.compile.pass.cpp'): + self.test_type = TestType.COMPILE_PASS + elif filename.endswith('.link.pass.cpp'): + self.test_type = TestType.LINK_PASS + elif filename.endswith('.pass.cpp'): + self.test_type = TestType.RUN_PASS + elif filename.endswith('.compile.fail.cpp'): + self.test_type = TestType.COMPILE_FAIL + elif filename.endswith('.link.fail.cpp'): + self.test_type = TestType.LINK_FAIL + elif filename.endswith('.run.fail.cpp'): + self.test_type = TestType.RUN_FAIL + elif filename.endswith('.fail.cpp'): + self.test_type = TestType.COMPILE_FAIL + else: + self.test_type = TestType.RUN_PASS - if self.expected_result is not None: - if self.expected_result == SKIPPED: - self.skipped = True - elif self.expected_result.isFailure: - self.xfails = ['*'] + def shouldBuild(self): + return self.test_type in (TestType.COMPILE_PASS, TestType.LINK_PASS, + TestType.RUN_PASS, TestType.RUN_FAIL) def _configure_cxx(self, lit_config, envlst_entry, default_cxx): env_compiler = envlst_entry.getEnvVal('PM_COMPILER', 'cl') @@ -143,52 +201,6 @@ def _configure_cxx(self, lit_config, envlst_entry, default_cxx): self.cxx = CXXCompiler(cxx, flags, compile_flags, link_flags, default_cxx.compile_env) - # This is partially lifted from lit's Test class. The changes here are to - # handle skipped tests, our env.lst format, and different naming schemes. - def writeJUnitXML(self, fil): - """Write the test's report xml representation to a file handle.""" - test_name = quoteattr(self.getXMLOutputTestName()) - class_name = quoteattr(self.getXMLOutputClassName()) - - testcase_template = \ - '\n\t", "]]]]>")) - fil.write("]]>\n") - elif self.result.code == UNSUPPORTED: - unsupported_features = self.getMissingRequiredFeatures() - if unsupported_features: - skip_message = \ - "Skipping because of: " + ", ".join(unsupported_features) - else: - skip_message = "Skipping because of configuration." - skip_message = quoteattr(skip_message) - - fil.write( - ">\n\t\n".format( - skip_message)) - elif self.result.code == SKIPPED: - message = quoteattr('Test is explicitly marked as skipped') - fil.write(">\n\t\n".format( - message)) - else: - fil.write("/>") - class LibcxxTest(STLTest): def getOutputBaseName(self): @@ -208,8 +220,11 @@ def getOutputDir(self): self.suite.getExecPath(self.path_in_suite[:-1]))) / dir_name / \ self.env_num - def getXMLOutputTestName(self): - return ':'.join((self.path_in_suite[-1], self.env_num)) + def _configure_name(self): + global _name_counter - def getTestName(self): - return '/'.join(self.path_in_suite) + ':' + self.env_num + self.name = _CMAKE_TARGET_NAME_REGEX.sub( + str(_name_counter), '-'.join(self.path_in_suite[:-1]) + '-' + + self.getOutputBaseName()) + "--" + self.env_num + + _name_counter = _name_counter + 1