Merge pull request #2560 from nlohmann/issue2324
Add switch to skip non-reproducible tests.
diff --git a/README.md b/README.md
index cb7e85a..d87e95c 100644
--- a/README.md
+++ b/README.md
@@ -1634,4 +1634,6 @@
In case you have downloaded the library rather than checked out the code via Git, test `cmake_fetch_content_configure`. Please execute `ctest -LE git_required` to skip these tests. See [issue #2189](https://github.com/nlohmann/json/issues/2189) for more information.
+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.
+
As Intel compilers use unsafe floating point optimization by default, the unit tests may fail. Use flag [`/fp:precise`](https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/compiler-options/compiler-option-details/floating-point-options/fp-model-fp.html) then.
diff --git a/test/cmake_add_subdirectory/CMakeLists.txt b/test/cmake_add_subdirectory/CMakeLists.txt
index 4fa9eb8..21c736a 100644
--- a/test/cmake_add_subdirectory/CMakeLists.txt
+++ b/test/cmake_add_subdirectory/CMakeLists.txt
@@ -10,7 +10,9 @@
)
set_tests_properties(cmake_add_subdirectory_configure PROPERTIES
FIXTURES_SETUP cmake_add_subdirectory
+ LABELS not_reproducible
)
set_tests_properties(cmake_add_subdirectory_build PROPERTIES
FIXTURES_REQUIRED cmake_add_subdirectory
+ LABELS not_reproducible
)
diff --git a/test/cmake_fetch_content/CMakeLists.txt b/test/cmake_fetch_content/CMakeLists.txt
index 0b0d9f6..f850b8b 100644
--- a/test/cmake_fetch_content/CMakeLists.txt
+++ b/test/cmake_fetch_content/CMakeLists.txt
@@ -12,9 +12,11 @@
set_tests_properties(cmake_fetch_content_configure PROPERTIES
FIXTURES_SETUP cmake_fetch_content
LABELS git_required
+ LABELS not_reproducible
)
set_tests_properties(cmake_fetch_content_build PROPERTIES
FIXTURES_REQUIRED cmake_fetch_content
LABELS git_required
+ LABELS not_reproducible
)
endif()
diff --git a/test/cmake_import/CMakeLists.txt b/test/cmake_import/CMakeLists.txt
index af3c891..13290b2 100644
--- a/test/cmake_import/CMakeLists.txt
+++ b/test/cmake_import/CMakeLists.txt
@@ -11,7 +11,9 @@
)
set_tests_properties(cmake_import_configure PROPERTIES
FIXTURES_SETUP cmake_import
+ LABELS not_reproducible
)
set_tests_properties(cmake_import_build PROPERTIES
FIXTURES_REQUIRED cmake_import
+ LABELS not_reproducible
)
diff --git a/test/cmake_import_minver/CMakeLists.txt b/test/cmake_import_minver/CMakeLists.txt
index d1a1072..6d8db43 100644
--- a/test/cmake_import_minver/CMakeLists.txt
+++ b/test/cmake_import_minver/CMakeLists.txt
@@ -11,7 +11,9 @@
)
set_tests_properties(cmake_import_minver_configure PROPERTIES
FIXTURES_SETUP cmake_import_minver
+ LABELS not_reproducible
)
set_tests_properties(cmake_import_minver_build PROPERTIES
FIXTURES_REQUIRED cmake_import_minver
+ LABELS not_reproducible
)
diff --git a/test/cmake_target_include_directories/CMakeLists.txt b/test/cmake_target_include_directories/CMakeLists.txt
index da738ea..0a324cb 100644
--- a/test/cmake_target_include_directories/CMakeLists.txt
+++ b/test/cmake_target_include_directories/CMakeLists.txt
@@ -10,7 +10,9 @@
)
set_tests_properties(cmake_target_include_directories_configure PROPERTIES
FIXTURES_SETUP cmake_target_include_directories
+ LABELS not_reproducible
)
set_tests_properties(cmake_target_include_directories_build PROPERTIES
FIXTURES_REQUIRED cmake_target_include_directories
+ LABELS not_reproducible
)