nlohmann / json

JSON for Modern C++
https://json.nlohmann.me
MIT License
41.33k stars 6.58k forks source link

3.11.3: test suite fails in 4 units #4224

Closed kloczek closed 7 months ago

kloczek commented 7 months ago

Description

Looks like test suite is still failing.

Reproduction steps

Configure source tree with:

%cmake \
        -D JSON_BuildTests=ON \
        -D JSON_TestDataDirectory=json_test_data-%{test_data_version} \
        -D JSON_Valgrind=ON \

Expected vs. actual results

Test suite should not fail.

Here is the result:

```console + cd json-3.11.3 + /usr/bin/ctest --test-dir x86_64-redhat-linux-gnu --output-on-failure --force-new-ctest-process -j48 Internal ctest changing into directory: /home/tkloczko/rpmbuild/BUILD/json-3.11.3/x86_64-redhat-linux-gnu Test project /home/tkloczko/rpmbuild/BUILD/json-3.11.3/x86_64-redhat-linux-gnu Start 1: download_test_data Start 145: cmake_import_configure Start 147: cmake_import_minver_configure Start 149: cmake_add_subdirectory_configure Start 151: cmake_fetch_content_configure Start 153: cmake_fetch_content2_configure Start 155: cmake_target_include_directories_configure Start 140: test-abi_config_default Start 141: test-abi_config_noversion Start 142: test-abi_config_custom Start 143: test-abi_compat_diag Start 144: test-abi_compat_inline_ns 1/156 Test #140: test-abi_config_default ............................ Passed 0.01 sec 2/156 Test #141: test-abi_config_noversion .......................... Passed 0.01 sec 3/156 Test #142: test-abi_config_custom ............................. Passed 0.01 sec 4/156 Test #143: test-abi_compat_diag ............................... Passed 0.01 sec 5/156 Test #144: test-abi_compat_inline_ns .......................... Passed 0.00 sec 6/156 Test #1: download_test_data ................................. Passed 0.43 sec Start 2: test-algorithms_cpp11 Start 3: test-algorithms_cpp11_valgrind Start 4: test-alt-string_cpp11 Start 5: test-alt-string_cpp11_valgrind Start 6: test-assert_macro_cpp11 Start 7: test-assert_macro_cpp11_valgrind Start 8: test-binary_formats_cpp11 Start 9: test-binary_formats_cpp11_valgrind Start 10: test-bjdata_cpp11 Start 11: test-bjdata_cpp11_valgrind Start 12: test-bson_cpp11 Start 13: test-bson_cpp11_valgrind Start 14: test-byte_container_with_subtype_cpp11 Start 15: test-byte_container_with_subtype_cpp11_valgrind Start 16: test-capacity_cpp11 Start 17: test-capacity_cpp11_valgrind Start 18: test-cbor_cpp11 Start 19: test-cbor_cpp11_valgrind Start 20: test-class_const_iterator_cpp11 Start 21: test-class_const_iterator_cpp11_valgrind Start 22: test-class_iterator_cpp11 Start 23: test-class_iterator_cpp11_valgrind Start 24: test-class_lexer_cpp11 Start 25: test-class_lexer_cpp11_valgrind Start 26: test-class_parser_cpp11 Start 27: test-class_parser_cpp11_valgrind Start 28: test-comparison_cpp11 Start 29: test-comparison_cpp11_valgrind Start 30: test-comparison_cpp20 Start 31: test-comparison_cpp20_valgrind Start 32: test-concepts_cpp11 Start 33: test-concepts_cpp11_valgrind Start 34: test-constructor1_cpp11 Start 35: test-constructor1_cpp11_valgrind Start 36: test-constructor2_cpp11 Start 37: test-constructor2_cpp11_valgrind Start 38: test-convenience_cpp11 Start 39: test-convenience_cpp11_valgrind Start 40: test-conversions_cpp11 Start 41: test-conversions_cpp11_valgrind Start 42: test-conversions_cpp17 Start 43: test-conversions_cpp17_valgrind 7/156 Test #145: cmake_import_configure ............................. Passed 0.51 sec Start 44: test-custom-base-class_cpp11 8/156 Test #147: cmake_import_minver_configure ...................... Passed 0.51 sec Start 45: test-custom-base-class_cpp11_valgrind 9/156 Test #149: cmake_add_subdirectory_configure ................... Passed 0.52 sec Start 46: test-deserialization_cpp11 10/156 Test #151: cmake_fetch_content_configure ......................***Failed 0.52 sec -- The CXX compiler identification is GNU 13.2.1 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at /usr/share/cmake/Modules/ExternalProject.cmake:2851 (message): error: could not find git for clone of json-populate Call Stack (most recent call first): /usr/share/cmake/Modules/ExternalProject.cmake:4345 (_ep_add_download_command) CMakeLists.txt:29 (ExternalProject_Add) -- Configuring incomplete, errors occurred! CMake Error at /usr/share/cmake/Modules/FetchContent.cmake:1650 (message): CMake step for json failed: 1 Call Stack (most recent call first): /usr/share/cmake/Modules/FetchContent.cmake:1802:EVAL:2 (__FetchContent_directPopulate) /usr/share/cmake/Modules/FetchContent.cmake:1802 (cmake_language) CMakeLists.txt:12 (FetchContent_Populate) -- Configuring incomplete, errors occurred! Start 47: test-deserialization_cpp11_valgrind 11/156 Test #155: cmake_target_include_directories_configure ......... Passed 0.52 sec Start 48: test-diagnostics_cpp11 12/156 Test #2: test-algorithms_cpp11 .............................. Passed 0.10 sec Start 49: test-diagnostics_cpp11_valgrind 13/156 Test #4: test-alt-string_cpp11 .............................. Passed 0.10 sec Start 50: test-disabled_exceptions_cpp11 14/156 Test #6: test-assert_macro_cpp11 ............................ Passed 0.10 sec Start 51: test-disabled_exceptions_cpp11_valgrind 15/156 Test #12: test-bson_cpp11 .................................... Passed 0.10 sec Start 52: test-element_access1_cpp11 16/156 Test #14: test-byte_container_with_subtype_cpp11 ............. Passed 0.09 sec Start 53: test-element_access1_cpp11_valgrind 17/156 Test #16: test-capacity_cpp11 ................................ Passed 0.09 sec Start 54: test-element_access2_cpp11 18/156 Test #20: test-class_const_iterator_cpp11 .................... Passed 0.09 sec Start 55: test-element_access2_cpp11_valgrind 19/156 Test #22: test-class_iterator_cpp11 .......................... Passed 0.09 sec Start 56: test-element_access2_cpp14 20/156 Test #24: test-class_lexer_cpp11 ............................. Passed 0.09 sec Start 57: test-element_access2_cpp14_valgrind 21/156 Test #28: test-comparison_cpp11 .............................. Passed 0.08 sec Start 58: test-element_access2_cpp17 22/156 Test #30: test-comparison_cpp20 .............................. Passed 0.08 sec Start 59: test-element_access2_cpp17_valgrind 23/156 Test #32: test-concepts_cpp11 ................................ Passed 0.08 sec Start 60: test-hash_cpp11 24/156 Test #34: test-constructor1_cpp11 ............................ Passed 0.07 sec Start 61: test-hash_cpp11_valgrind 25/156 Test #36: test-constructor2_cpp11 ............................ Passed 0.07 sec Start 62: test-inspection_cpp11 26/156 Test #38: test-convenience_cpp11 ............................. Passed 0.07 sec Start 63: test-inspection_cpp11_valgrind 27/156 Test #153: cmake_fetch_content2_configure .....................***Failed 0.56 sec -- The CXX compiler identification is GNU 13.2.1 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at /usr/share/cmake/Modules/ExternalProject.cmake:2851 (message): error: could not find git for clone of json-populate Call Stack (most recent call first): /usr/share/cmake/Modules/ExternalProject.cmake:4345 (_ep_add_download_command) CMakeLists.txt:29 (ExternalProject_Add) -- Configuring incomplete, errors occurred! CMake Error at /usr/share/cmake/Modules/FetchContent.cmake:1650 (message): CMake step for json failed: 1 Call Stack (most recent call first): /usr/share/cmake/Modules/FetchContent.cmake:1802:EVAL:2 (__FetchContent_directPopulate) /usr/share/cmake/Modules/FetchContent.cmake:1802 (cmake_language) /usr/share/cmake/Modules/FetchContent.cmake:2016 (FetchContent_Populate) CMakeLists.txt:9 (FetchContent_MakeAvailable) -- Configuring incomplete, errors occurred! Start 64: test-items_cpp11 28/156 Test #40: test-conversions_cpp11 ............................. Passed 0.08 sec Start 65: test-items_cpp11_valgrind 29/156 Test #42: test-conversions_cpp17 ............................. Passed 0.08 sec Start 66: test-items_cpp17 30/156 Test #44: test-custom-base-class_cpp11 ....................... Passed 0.07 sec Start 67: test-items_cpp17_valgrind 31/156 Test #46: test-deserialization_cpp11 ......................... Passed 0.06 sec Start 68: test-iterators1_cpp11 32/156 Test #48: test-diagnostics_cpp11 ............................. Passed 0.06 sec Start 69: test-iterators1_cpp11_valgrind 33/156 Test #50: test-disabled_exceptions_cpp11 ..................... Passed 0.06 sec Start 70: test-json_patch_cpp11 34/156 Test #52: test-element_access1_cpp11 ......................... Passed 0.05 sec Start 71: test-json_patch_cpp11_valgrind 35/156 Test #54: test-element_access2_cpp11 ......................... Passed 0.05 sec Start 72: test-json_pointer_cpp11 36/156 Test #56: test-element_access2_cpp14 ......................... Passed 0.05 sec Start 73: test-json_pointer_cpp11_valgrind 37/156 Test #60: test-hash_cpp11 .................................... Passed 0.04 sec Start 74: test-json_pointer_cpp20 38/156 Test #26: test-class_parser_cpp11 ............................ Passed 0.14 sec Start 75: test-json_pointer_cpp20_valgrind 39/156 Test #58: test-element_access2_cpp17 ......................... Passed 0.05 sec Start 76: test-large_json_cpp11 40/156 Test #64: test-items_cpp11 ................................... Passed 0.04 sec Start 77: test-large_json_cpp11_valgrind 41/156 Test #66: test-items_cpp17 ................................... Passed 0.04 sec Start 78: test-merge_patch_cpp11 42/156 Test #68: test-iterators1_cpp11 .............................. Passed 0.03 sec Start 79: test-merge_patch_cpp11_valgrind 43/156 Test #72: test-json_pointer_cpp11 ............................ Passed 0.03 sec Start 80: test-meta_cpp11 44/156 Test #70: test-json_patch_cpp11 .............................. Passed 0.04 sec Start 81: test-meta_cpp11_valgrind 45/156 Test #74: test-json_pointer_cpp20 ............................ Passed 0.03 sec Start 82: test-modifiers_cpp11 46/156 Test #78: test-merge_patch_cpp11 ............................. Passed 0.02 sec Start 83: test-modifiers_cpp11_valgrind 47/156 Test #80: test-meta_cpp11 .................................... Passed 0.01 sec Start 84: test-msgpack_cpp11 48/156 Test #82: test-modifiers_cpp11 ............................... Passed 0.01 sec Start 85: test-msgpack_cpp11_valgrind 49/156 Test #9: test-binary_formats_cpp11_valgrind ................. Passed 1.25 sec Start 86: test-no-mem-leak-on-adl-serialize_cpp11 50/156 Test #86: test-no-mem-leak-on-adl-serialize_cpp11 ............ Passed 0.01 sec Start 87: test-no-mem-leak-on-adl-serialize_cpp11_valgrind 51/156 Test #15: test-byte_container_with_subtype_cpp11_valgrind .... Passed 1.29 sec Start 88: test-noexcept_cpp11 52/156 Test #88: test-noexcept_cpp11 ................................ Passed 0.01 sec Start 89: test-noexcept_cpp11_valgrind 53/156 Test #7: test-assert_macro_cpp11_valgrind ................... Passed 1.32 sec Start 90: test-ordered_json_cpp11 54/156 Test #90: test-ordered_json_cpp11 ............................ Passed 0.01 sec Start 91: test-ordered_json_cpp11_valgrind 55/156 Test #33: test-concepts_cpp11_valgrind ....................... Passed 1.33 sec Start 92: test-ordered_map_cpp11 56/156 Test #51: test-disabled_exceptions_cpp11_valgrind ............ Passed 1.29 sec Start 93: test-ordered_map_cpp11_valgrind 57/156 Test #92: test-ordered_map_cpp11 ............................. Passed 0.01 sec Start 94: test-pointer_access_cpp11 58/156 Test #94: test-pointer_access_cpp11 .......................... Passed 0.01 sec Start 95: test-pointer_access_cpp11_valgrind 59/156 Test #25: test-class_lexer_cpp11_valgrind .................... Passed 1.40 sec Start 96: test-readme_cpp11 60/156 Test #96: test-readme_cpp11 .................................. Passed 0.01 sec Start 97: test-readme_cpp11_valgrind 61/156 Test #5: test-alt-string_cpp11_valgrind ..................... Passed 1.47 sec Start 98: test-reference_access_cpp11 62/156 Test #37: test-constructor2_cpp11_valgrind ................... Passed 1.42 sec Start 99: test-reference_access_cpp11_valgrind 63/156 Test #98: test-reference_access_cpp11 ........................ Passed 0.01 sec Start 100: test-regression1_cpp11 64/156 Test #39: test-convenience_cpp11_valgrind .................... Passed 1.45 sec Start 101: test-regression1_cpp11_valgrind 65/156 Test #61: test-hash_cpp11_valgrind ........................... Passed 1.41 sec Start 102: test-regression1_cpp17 66/156 Test #21: test-class_const_iterator_cpp11_valgrind ........... Passed 1.55 sec Start 103: test-regression1_cpp17_valgrind 67/156 Test #81: test-meta_cpp11_valgrind ........................... Passed 1.39 sec Start 104: test-serialization_cpp11 68/156 Test #104: test-serialization_cpp11 ........................... Passed 0.01 sec Start 105: test-serialization_cpp11_valgrind 69/156 Test #45: test-custom-base-class_cpp11_valgrind .............. Passed 1.53 sec Start 106: test-testsuites_cpp11 70/156 Test #29: test-comparison_cpp11_valgrind ..................... Passed 1.59 sec Start 107: test-testsuites_cpp11_valgrind 71/156 Test #79: test-merge_patch_cpp11_valgrind .................... Passed 1.47 sec Start 108: test-to_chars_cpp11 72/156 Test #108: test-to_chars_cpp11 ................................ Passed 0.01 sec Start 109: test-to_chars_cpp11_valgrind 73/156 Test #17: test-capacity_cpp11_valgrind ....................... Passed 1.66 sec Start 110: test-type_traits_cpp11 74/156 Test #110: test-type_traits_cpp11 ............................. Passed 0.01 sec Start 111: test-type_traits_cpp11_valgrind 75/156 Test #106: test-testsuites_cpp11 .............................. Passed 0.07 sec Start 112: test-ubjson_cpp11 76/156 Test #23: test-class_iterator_cpp11_valgrind ................. Passed 1.67 sec Start 113: test-ubjson_cpp11_valgrind 77/156 Test #31: test-comparison_cpp20_valgrind ..................... Passed 1.66 sec Start 114: test-udl_cpp11 78/156 Test #114: test-udl_cpp11 ..................................... Passed 0.01 sec Start 115: test-udl_cpp11_valgrind 79/156 Test #49: test-diagnostics_cpp11_valgrind .................... Passed 1.80 sec Start 116: test-udt_cpp11 80/156 Test #116: test-udt_cpp11 ..................................... Passed 0.01 sec Start 117: test-udt_cpp11_valgrind 81/156 Test #65: test-items_cpp11_valgrind .......................... Passed 1.99 sec Start 118: test-udt_macro_cpp11 82/156 Test #3: test-algorithms_cpp11_valgrind ..................... Passed 2.15 sec Start 119: test-udt_macro_cpp11_valgrind 83/156 Test #118: test-udt_macro_cpp11 ............................... Passed 0.01 sec Start 120: test-unicode1_cpp11 84/156 Test #67: test-items_cpp17_valgrind .......................... Passed 2.03 sec Start 121: test-unicode1_cpp11_valgrind 85/156 Test #76: test-large_json_cpp11 .............................. Passed 2.09 sec Start 122: test-unicode2_cpp11 86/156 Test #13: test-bson_cpp11_valgrind ........................... Passed 2.37 sec Start 123: test-unicode2_cpp11_valgrind 87/156 Test #53: test-element_access1_cpp11_valgrind ................ Passed 2.31 sec Start 124: test-unicode3_cpp11 88/156 Test #89: test-noexcept_cpp11_valgrind ....................... Passed 1.23 sec Start 125: test-unicode3_cpp11_valgrind 89/156 Test #87: test-no-mem-leak-on-adl-serialize_cpp11_valgrind ... Passed 1.34 sec Start 126: test-unicode4_cpp11 90/156 Test #83: test-modifiers_cpp11_valgrind ...................... Passed 2.49 sec Start 127: test-unicode4_cpp11_valgrind 91/156 Test #97: test-readme_cpp11_valgrind ......................... Passed 1.26 sec Start 128: test-unicode5_cpp11 92/156 Test #91: test-ordered_json_cpp11_valgrind ................... Passed 1.46 sec Start 129: test-unicode5_cpp11_valgrind 93/156 Test #73: test-json_pointer_cpp11_valgrind ................... Passed 2.65 sec Start 130: test-user_defined_input_cpp11 94/156 Test #130: test-user_defined_input_cpp11 ...................... Passed 0.01 sec Start 131: test-user_defined_input_cpp11_valgrind 95/156 Test #69: test-iterators1_cpp11_valgrind ..................... Passed 2.72 sec Start 132: test-windows_h_cpp11 96/156 Test #132: test-windows_h_cpp11 ............................... Passed 0.01 sec Start 133: test-windows_h_cpp11_valgrind 97/156 Test #75: test-json_pointer_cpp20_valgrind ................... Passed 2.82 sec Start 134: test-wstring_cpp11 98/156 Test #111: test-type_traits_cpp11_valgrind .................... Passed 1.31 sec Start 135: test-wstring_cpp11_valgrind 99/156 Test #134: test-wstring_cpp11 ................................. Passed 0.01 sec Start 136: test-comparison_legacy_cpp11 100/156 Test #136: test-comparison_legacy_cpp11 ....................... Passed 0.01 sec Start 137: test-comparison_legacy_cpp11_valgrind 101/156 Test #35: test-constructor1_cpp11_valgrind ................... Passed 2.96 sec Start 138: test-comparison_legacy_cpp20 102/156 Test #138: test-comparison_legacy_cpp20 ....................... Passed 0.01 sec Start 139: test-comparison_legacy_cpp20_valgrind 103/156 Test #93: test-ordered_map_cpp11_valgrind .................... Passed 1.67 sec Start 146: cmake_import_build 104/156 Test #95: test-pointer_access_cpp11_valgrind ................. Passed 1.70 sec Start 148: cmake_import_minver_build 105/156 Test #99: test-reference_access_cpp11_valgrind ............... Passed 1.64 sec Start 150: cmake_add_subdirectory_build 106/156 Test #62: test-inspection_cpp11 .............................. Passed 3.01 sec Start 152: cmake_fetch_content_build Failed test dependencies: cmake_fetch_content_configure 107/156 Test #152: cmake_fetch_content_build ..........................***Not Run 0.00 sec Start 154: cmake_fetch_content2_build Failed test dependencies: cmake_fetch_content2_configure 108/156 Test #154: cmake_fetch_content2_build .........................***Not Run 0.00 sec Start 156: cmake_target_include_directories_build 109/156 Test #71: test-json_patch_cpp11_valgrind ..................... Passed 2.99 sec 110/156 Test #43: test-conversions_cpp17_valgrind .................... Passed 3.16 sec 111/156 Test #109: test-to_chars_cpp11_valgrind ....................... Passed 1.65 sec 112/156 Test #105: test-serialization_cpp11_valgrind .................. Passed 1.79 sec 113/156 Test #47: test-deserialization_cpp11_valgrind ................ Passed 3.37 sec 114/156 Test #41: test-conversions_cpp11_valgrind .................... Passed 3.40 sec 115/156 Test #115: test-udl_cpp11_valgrind ............................ Passed 1.76 sec 116/156 Test #123: test-unicode2_cpp11_valgrind ....................... Passed 1.29 sec 117/156 Test #125: test-unicode3_cpp11_valgrind ....................... Passed 1.16 sec 118/156 Test #117: test-udt_cpp11_valgrind ............................ Passed 1.86 sec 119/156 Test #133: test-windows_h_cpp11_valgrind ...................... Passed 0.94 sec 120/156 Test #127: test-unicode4_cpp11_valgrind ....................... Passed 1.27 sec 121/156 Test #121: test-unicode1_cpp11_valgrind ....................... Passed 1.80 sec 122/156 Test #129: test-unicode5_cpp11_valgrind ....................... Passed 1.25 sec 123/156 Test #10: test-bjdata_cpp11 .................................. Passed 4.13 sec 124/156 Test #119: test-udt_macro_cpp11_valgrind ...................... Passed 1.99 sec 125/156 Test #131: test-user_defined_input_cpp11_valgrind ............. Passed 1.53 sec 126/156 Test #139: test-comparison_legacy_cpp20_valgrind .............. Passed 1.33 sec 127/156 Test #135: test-wstring_cpp11_valgrind ........................ Passed 1.37 sec 128/156 Test #137: test-comparison_legacy_cpp11_valgrind .............. Passed 1.72 sec 129/156 Test #120: test-unicode1_cpp11 ................................ Passed 2.77 sec 130/156 Test #55: test-element_access2_cpp11_valgrind ................ Passed 4.81 sec 131/156 Test #102: test-regression1_cpp17 ............................. Passed 3.51 sec 132/156 Test #57: test-element_access2_cpp14_valgrind ................ Passed 4.96 sec 133/156 Test #107: test-testsuites_cpp11_valgrind ..................... Passed 3.69 sec 134/156 Test #100: test-regression1_cpp11 ............................. Passed 3.99 sec 135/156 Test #59: test-element_access2_cpp17_valgrind ................ Passed 5.82 sec 136/156 Test #112: test-ubjson_cpp11 .................................. Passed 4.30 sec 137/156 Test #148: cmake_import_minver_build .......................... Passed 3.06 sec 138/156 Test #27: test-class_parser_cpp11_valgrind ................... Passed 6.55 sec 139/156 Test #8: test-binary_formats_cpp11 .......................... Passed 7.38 sec 140/156 Test #146: cmake_import_build ................................. Passed 6.21 sec 141/156 Test #150: cmake_add_subdirectory_build ....................... Passed 8.84 sec 142/156 Test #122: test-unicode2_cpp11 ................................ Passed 10.45 sec 143/156 Test #156: cmake_target_include_directories_build ............. Passed 9.61 sec 144/156 Test #18: test-cbor_cpp11 .................................... Passed 12.89 sec 145/156 Test #84: test-msgpack_cpp11 ................................. Passed 13.70 sec 146/156 Test #128: test-unicode5_cpp11 ................................ Passed 24.26 sec 147/156 Test #113: test-ubjson_cpp11_valgrind ......................... Passed 25.62 sec 148/156 Test #85: test-msgpack_cpp11_valgrind ........................ Passed 27.95 sec 149/156 Test #11: test-bjdata_cpp11_valgrind ......................... Passed 29.82 sec 150/156 Test #19: test-cbor_cpp11_valgrind ........................... Passed 30.36 sec 151/156 Test #124: test-unicode3_cpp11 ................................ Passed 32.75 sec 152/156 Test #77: test-large_json_cpp11_valgrind ..................... Passed 42.59 sec 153/156 Test #63: test-inspection_cpp11_valgrind ..................... Passed 54.97 sec 154/156 Test #103: test-regression1_cpp17_valgrind .................... Passed 81.09 sec 155/156 Test #101: test-regression1_cpp11_valgrind .................... Passed 82.78 sec 156/156 Test #126: test-unicode4_cpp11 ................................ Passed 98.42 sec 97% tests passed, 4 tests failed out of 156 Label Time Summary: all = 226.22 sec*proc (69 tests) git_required = 1.08 sec*proc (4 tests) not_reproducible = 30.86 sec*proc (12 tests) valgrind = 500.72 sec*proc (69 tests) Total Test time (real) = 101.47 sec The following tests FAILED: 151 - cmake_fetch_content_configure (Failed) 152 - cmake_fetch_content_build (Not Run) 153 - cmake_fetch_content2_configure (Failed) 154 - cmake_fetch_content2_build (Not Run) Errors while running CTest ```

Minimal code example

No response

Error messages

No response

Compiler and operating system

gcc 13.2.1, Linux x86/64

Library version

3.11.3

Validation

gregmarr commented 7 months ago

Did you download this version or check it out via git?

From the Readme:

In case you have downloaded the library rather than checked out the code via Git, test cmake_fetch_content_configure will fail. Please execute ctest -LE git_required to skip these tests. See issue #2189 for more information.

nlohmann commented 7 months ago

See https://github.com/nlohmann/json#execute-unit-tests

kloczek commented 7 months ago

I'm using as input source autogenerated from git tag tar ball. Looking on the cmake files IMO if for example git command is not available those units should be skipped.

nlohmann commented 7 months ago

Does ctest -LE git_required work?

kloczek commented 7 months ago

Skipping failing units always works. Tangling test procedure to git repo would be justifiable if project would provide some git related tools however in this case it is not the case.

nlohmann commented 7 months ago

The tests fail, because they require a Git checkout and test specifics of CMake in the context of Git. Hence we introduced the label so it is easy for you to skip them.

kloczek commented 7 months ago

Are you aware of fact that most of the distributions build infras are INTENTIONNALLY cut off from public network access? Ho someone can test json without public network access. And again: if some resources' are needed by test suite why they are not integrated in source tree?

nlohmann commented 7 months ago

Are you aware of fact that most of the distributions build infras are INTENTIONNALLY cut off from public network access? Ho someone can test json without public network access.

This is possible and documented here: https://github.com/nlohmann/json#execute-unit-tests


Note that during the ctest stage, several JSON test files are downloaded from an external repository. If policies forbid downloading artifacts during testing, you can download the files yourself and pass the directory with the test files via -DJSON_TestDataDirectory=path to CMake. Then, no Internet connectivity is required. See issue #2189 for more information.


And again: if some resources' are needed by test suite why they are not integrated in source tree?

We test CMake's FetchContent which, in our tests, needs the directory to come from a Git checkout. If you did not check out from Git, then you need to skip the test. The tests are for the maintainers and run in the CI. If you have a different setup and tests fail, all we can do is point you to the documentation.