Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsoncons: skip a few tests with libstdc++, fix 32-bit #22749

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions devel/jsoncons/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,15 @@ checksums rmd160 4861f8442599537fe6b001673474250366ae8043 \
sha256 3e3525325c88b33f15af2e1f3cf7a1893a49e47aa787a2df723a098b3a4b20b1 \
size 1422526

compiler.cxx_standard 2011

# https://github.com/danielaparker/jsoncons/issues/488
if {${configure.cxx_stdlib} ne "libc++"} {
patchfiles-append patch-disable-broken-tests.diff
}
# Should be build_arch here, not configure.build_arch:
if {${build_arch} in [list arm i386 ppc]} {
patchfiles-append patch-32-bit.diff
}

test.run yes
11 changes: 11 additions & 0 deletions devel/jsoncons/files/patch-32-bit.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- test/CMakeLists.txt 2024-02-05 05:59:37.000000000 +0800
+++ test/CMakeLists.txt 2024-02-20 08:26:06.000000000 +0800
@@ -199,7 +198,7 @@
message(STATUS Version " ${CMAKE_CXX_COMPILER_VERSION}")
# older GCC versions don't support
target_compile_options(unit_tests PRIVATE
- $<$<CXX_COMPILER_ID:GNU>:-Wnon-virtual-dtor -Werror=stringop-overflow -Werror -Wall -Wextra -Wcast-align -Wcast-qual -Wimplicit-fallthrough -Wsign-compare -pedantic -Wnonnull -Werror=nonnull>
+ $<$<CXX_COMPILER_ID:GNU>:-Wnon-virtual-dtor -Werror=stringop-overflow -Wall -Wextra -Wcast-align -Wcast-qual -Wimplicit-fallthrough -Wsign-compare -pedantic -Wnonnull -Werror=nonnull>
)
endif()

73 changes: 73 additions & 0 deletions devel/jsoncons/files/patch-disable-broken-tests.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
--- test/CMakeLists.txt 2024-02-05 05:59:37.000000000 +0800
+++ test/CMakeLists.txt 2024-02-20 09:25:47.000000000 +0800
@@ -65,7 +65,6 @@
bson/src/bson_decimal128_tests.cpp
bson/src/bson_oid_tests.cpp
bson/src/bson_test_suite.cpp
- bson/src/encode_decode_bson_tests.cpp
cbor/src/cbor_bitset_traits_tests.cpp
cbor/src/cbor_cursor_tests.cpp
cbor/src/cbor_event_reader_tests.cpp
@@ -75,7 +74,6 @@
cbor/src/cbor_tests.cpp
cbor/src/cbor_typed_array_tests.cpp
cbor/src/decode_cbor_tests.cpp
- cbor/src/encode_cbor_tests.cpp
csv/src/csv_cursor_tests.cpp
csv/src/csv_subfield_tests.cpp
csv/src/csv_tests.cpp
@@ -96,16 +94,13 @@
jsonpath/src/jsonpath_json_replace_tests.cpp
jsonpath/src/jsonpath_select_paths_tests.cpp
jsonpath/src/jsonpath_test_suite.cpp
- jsonpath/src/jsonpath_stateful_allocator_tests.cpp
jsonpointer/src/jsonpointer_flatten_tests.cpp
- jsonpointer/src/jsonpointer_tests.cpp
jsonschema/src/format_validator_tests.cpp
jsonschema/src/jsonschema_defaults_tests.cpp
jsonschema/src/jsonschema_output_format_tests.cpp
jsonschema/src/jsonschema_draft7_tests.cpp
jsonschema/src/schema_version_tests.cpp
msgpack/src/decode_msgpack_tests.cpp
- msgpack/src/encode_msgpack_tests.cpp
msgpack/src/msgpack_bitset_traits_tests.cpp
msgpack/src/msgpack_cursor_tests.cpp
msgpack/src/msgpack_event_reader_tests.cpp
@@ -125,7 +120,6 @@
corelib/src/double_round_trip_tests.cpp
corelib/src/double_to_string_tests.cpp
corelib/src/dtoa_tests.cpp
- corelib/src/encode_decode_json_tests.cpp
corelib/src/encode_traits_tests.cpp
corelib/src/error_recovery_tests.cpp
corelib/src/json_array_tests.cpp
@@ -145,7 +139,6 @@
corelib/src/json_line_split_tests.cpp
corelib/src/json_literal_operator_tests.cpp
corelib/src/json_object_tests.cpp
- corelib/src/ojson_object_tests.cpp
corelib/src/json_options_tests.cpp
corelib/src/json_parse_error_tests.cpp
corelib/src/json_parser_position_tests.cpp
@@ -153,7 +146,6 @@
corelib/src/json_proxy_tests.cpp
corelib/src/json_push_back_tests.cpp
corelib/src/json_reader_exception_tests.cpp
- corelib/src/json_reader_tests.cpp
corelib/src/json_storage_tests.cpp
corelib/src/json_swap_tests.cpp
corelib/src/json_traits_macro_functional_tests.cpp
@@ -173,13 +165,10 @@
corelib/src/source_tests.cpp
corelib/src/staj_iterator_tests.cpp
corelib/src/extension_traits_tests.cpp
- corelib/src/polymorphic_allocator_tests.cpp
- corelib/src/scoped_allocator_adaptor_tests.cpp
corelib/src/string_to_double_tests.cpp
corelib/src/unicode_conv_tests.cpp
corelib/src/wjson_tests.cpp
ubjson/src/decode_ubjson_tests.cpp
- ubjson/src/encode_ubjson_tests.cpp
ubjson/src/ubjson_cursor_tests.cpp
ubjson/src/ubjson_encoder_tests.cpp
corelib/src/testmain.cpp