Skip to content

Commit ac4b99c

Browse files
author
Gianfranco Costamagna
committed
Add a new network_required switch. Right now it is coincident with git_required, but in the future they might diverge, for example if a git test runs on local data
Signed-off-by: Gianfranco Costamagna <[email protected]>
1 parent bccdfad commit ac4b99c

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1883,8 +1883,10 @@ json/tests/src/make_test_data_available.hpp:23: FATAL ERROR: REQUIRE( utils::che
18831883

18841884
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](https://github.com/nlohmann/json/issues/2189) for more information.
18851885

1886+
Some tests are requiring network to be properly execute. They are labeled as `network_required`. Please execute `ctest -LE network_required` to skip these tests. See [issue #4851](https://github.com/nlohmann/json/issues/4851) for more information.
1887+
18861888
Some tests change the installed files and hence make the whole process not reproducible. Please execute `ctest -LE not_reproducible` to skip these tests. See [issue #2324](https://github.com/nlohmann/json/issues/2324) for more information. Furthermore, assertions must be switched off to ensure reproducible builds (see [discussion 4494](https://github.com/nlohmann/json/discussions/4494)).
18871889

1888-
Note you need to call `cmake -LE "not_reproducible|git_required"` to exclude both labels. See [issue #2596](https://github.com/nlohmann/json/issues/2596) for more information.
1890+
Note you need to call `cmake -LE "git_required|not_reproducible|network_required"` to exclude labels. See [issue #2596](https://github.com/nlohmann/json/issues/2596) for more information.
18891891

18901892
As Intel compilers use unsafe floating point optimization by default, the unit tests may fail. Use flag [`/fp:precise`](https://www.intel.com/content/www/us/en/docs/cpp-compiler/developer-guide-reference/2021-8/fp-model-fp.html) then.

tests/cmake_fetch_content/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ if (${CMAKE_VERSION} VERSION_GREATER "3.11.0")
1212
)
1313
set_tests_properties(cmake_fetch_content_configure PROPERTIES
1414
FIXTURES_SETUP cmake_fetch_content
15-
LABELS "git_required;not_reproducible"
15+
LABELS "git_required;not_reproducible;network_required"
1616
)
1717
set_tests_properties(cmake_fetch_content_build PROPERTIES
1818
FIXTURES_REQUIRED cmake_fetch_content
19-
LABELS "git_required;not_reproducible"
19+
LABELS "git_required;not_reproducible;network_required"
2020
)
2121
endif()

tests/cmake_fetch_content2/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ if (${CMAKE_VERSION} VERSION_GREATER "3.14.0")
1212
)
1313
set_tests_properties(cmake_fetch_content2_configure PROPERTIES
1414
FIXTURES_SETUP cmake_fetch_content2
15-
LABELS "git_required;not_reproducible"
15+
LABELS "git_required;not_reproducible;network_required"
1616
)
1717
set_tests_properties(cmake_fetch_content2_build PROPERTIES
1818
FIXTURES_REQUIRED cmake_fetch_content2
19-
LABELS "git_required;not_reproducible"
19+
LABELS "git_required;not_reproducible;network_required"
2020
)
2121
endif()

0 commit comments

Comments
 (0)