diff options
| author | Stefan Boberg <[email protected]> | 2023-03-07 15:00:28 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-03-07 15:00:28 +0100 |
| commit | 28ed9533d5f50a68c2daf97a43dacc2c58a33d8b (patch) | |
| tree | 5b04a0261d2536cc3b97553710c894185575dc19 | |
| parent | store cache rawhash and rawsize for unstructured cache values (#234) (diff) | |
| download | zen-28ed9533d5f50a68c2daf97a43dacc2c58a33d8b.tar.xz zen-28ed9533d5f50a68c2daf97a43dacc2c58a33d8b.zip | |
removed catch2 (#241)
removed catch2 since it's de facto not supported due to the lack of multithreading support
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | README.md | 10 | ||||
| -rw-r--r-- | xmake.lua | 8 | ||||
| -rw-r--r-- | zencore-test/xmake.lua | 1 | ||||
| -rw-r--r-- | zencore/include/zencore/testing.h | 16 | ||||
| -rw-r--r-- | zencore/xmake.lua | 1 |
6 files changed, 12 insertions, 25 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d4f9d2fe..fc6ec9420 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Improvement: FileCas now keeps an up to date index of all the entries improving performance when getting cache misses on large payloads - Improvement: Structured cache now keeps RawHash and RawSize in memory avoiding materialization of cache values before sending response - Changed: Exit with failure code on port conflict rather than reporting crash to Sentry +- Changed: removed catch2 support for now since it does not handle multithreaded tests ## 0.2.4 - Bugfix: Don't send empty http responses with content type set to Text. Fixes UE-177895 @@ -44,6 +44,14 @@ basis and requires manual bootstrap so you will need to do the following at leas Now you are ready to start building! +#### Installing pre-commit (optional) + +This is necessary to run pre-commit locally, which is useful in particular to run clang-format prior to +commit. + +* Make sure python3 is installed. Version 3.11 or later should work +* Run `pip install pre-commit` + ### Building with Visual Studio We currently require Visual Studio 2022 or later. The following steps need to be run from a Command Prompt window or a Terminal instance @@ -227,7 +235,7 @@ is incredibly handy. When that is installed you may enable auto-attach to child * `zencore-test` exercises unit tests in the zencore project * `zenserver-test` exercises the zen server itself (functional tests) -The tests are implemented using [doctest](https://github.com/onqtam/doctest), which is similar to Catch in usage. We now also support [catch2](https://github.com/catchorg/Catch2) +The tests are implemented using [doctest](https://github.com/onqtam/doctest), which is similar to Catch in usage. # Adding a http.sys URL reservation (Windows only) @@ -5,7 +5,6 @@ set_configvar("ZEN_SCHEMA_VERSION", 4) -- store Cid data in CAS under raw hash ( add_requires( "vcpkg::asio", "vcpkg::blake3", - "vcpkg::catch2 2.13.8", "vcpkg::cpr", "vcpkg::curl", "vcpkg::cxxopts", @@ -113,13 +112,6 @@ if is_os("windows") then add_define_by_config("ZEN_WITH_HTTPSYS", "httpsys") end -option("catch2") - set_default(false) - set_showmenu(true) - set_description("Use catch2 to run tests") -option_end() -add_define_by_config("ZEN_USE_CATCH2", "catch2") - option("compute") set_default(true) set_showmenu(true) diff --git a/zencore-test/xmake.lua b/zencore-test/xmake.lua index 2556a1399..74c7e74a7 100644 --- a/zencore-test/xmake.lua +++ b/zencore-test/xmake.lua @@ -5,5 +5,4 @@ target("zencore-test") add_headerfiles("**.h") add_files("*.cpp") add_deps("zencore") - add_packages("vcpkg::catch2") add_packages("vcpkg::doctest") diff --git a/zencore/include/zencore/testing.h b/zencore/include/zencore/testing.h index faa4eef6c..bd55524aa 100644 --- a/zencore/include/zencore/testing.h +++ b/zencore/include/zencore/testing.h @@ -9,26 +9,14 @@ # define DOCTEST_CONFIG_IMPLEMENT #endif -#ifndef ZEN_USE_CATCH2 -# define ZEN_USE_CATCH2 0 -#endif - #if ZEN_WITH_TESTS -# if ZEN_USE_CATCH2 -# include <catch2/catch.hpp> -# define SUBCASE(x) SECTION(x) -# define CHECK_EQ(x, y) CHECK((x) == (y)) -# define CHECK_MESSAGE(x, y) CHECK(x) -# define ZEN_RUN_TESTS(argC, argV) Catch::Session().run(argC, argV) -# else -# include <doctest/doctest.h> -# define ZEN_RUN_TESTS(argC, argV) doctest::Context(argc, argv).run() +# include <doctest/doctest.h> +# define ZEN_RUN_TESTS(argC, argV) doctest::Context(argc, argv).run() inline auto Approx(auto Value) { return doctest::Approx(Value); } -# endif #else # define ZEN_RUN_TESTS(argC, argV) #endif diff --git a/zencore/xmake.lua b/zencore/xmake.lua index 61000f739..e1e649c1d 100644 --- a/zencore/xmake.lua +++ b/zencore/xmake.lua @@ -27,7 +27,6 @@ target('zencore') add_options("zentrace") add_packages( "vcpkg::blake3", - "vcpkg::catch2", "vcpkg::cpr", "vcpkg::curl", -- required by cpr "vcpkg::doctest", |