From 1424585fb64cbfdb86ff1637830634ec7e9247e0 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Sat, 10 Jan 2026 14:05:19 +0000 Subject: [PATCH] tests: move clar to `deps` Clean up the `tests` folder to only contain _actual tests_. Since clar is now a reasonably external project, move it to `deps`. --- {tests => deps}/clar/clar.c | 0 {tests => deps}/clar/clar.h | 0 {tests => deps}/clar/clar/fixtures.h | 0 {tests => deps}/clar/clar/fs.h | 0 {tests => deps}/clar/clar/print.h | 0 {tests => deps}/clar/clar/sandbox.h | 0 {tests => deps}/clar/clar/summary.h | 0 {tests => deps}/clar/clar_libgit2.c | 0 {tests => deps}/clar/clar_libgit2.h | 0 {tests => deps}/clar/clar_libgit2_alloc.c | 0 {tests => deps}/clar/clar_libgit2_alloc.h | 0 {tests => deps}/clar/clar_libgit2_timer.c | 0 {tests => deps}/clar/clar_libgit2_timer.h | 0 {tests => deps}/clar/clar_libgit2_trace.c | 0 {tests => deps}/clar/clar_libgit2_trace.h | 0 {tests => deps}/clar/generate.py | 0 {tests => deps}/clar/main.c | 0 tests/README.md | 2 -- tests/libgit2/CMakeLists.txt | 2 +- tests/util/CMakeLists.txt | 2 +- 20 files changed, 2 insertions(+), 4 deletions(-) rename {tests => deps}/clar/clar.c (100%) rename {tests => deps}/clar/clar.h (100%) rename {tests => deps}/clar/clar/fixtures.h (100%) rename {tests => deps}/clar/clar/fs.h (100%) rename {tests => deps}/clar/clar/print.h (100%) rename {tests => deps}/clar/clar/sandbox.h (100%) rename {tests => deps}/clar/clar/summary.h (100%) rename {tests => deps}/clar/clar_libgit2.c (100%) rename {tests => deps}/clar/clar_libgit2.h (100%) rename {tests => deps}/clar/clar_libgit2_alloc.c (100%) rename {tests => deps}/clar/clar_libgit2_alloc.h (100%) rename {tests => deps}/clar/clar_libgit2_timer.c (100%) rename {tests => deps}/clar/clar_libgit2_timer.h (100%) rename {tests => deps}/clar/clar_libgit2_trace.c (100%) rename {tests => deps}/clar/clar_libgit2_trace.h (100%) rename {tests => deps}/clar/generate.py (100%) rename {tests => deps}/clar/main.c (100%) diff --git a/tests/clar/clar.c b/deps/clar/clar.c similarity index 100% rename from tests/clar/clar.c rename to deps/clar/clar.c diff --git a/tests/clar/clar.h b/deps/clar/clar.h similarity index 100% rename from tests/clar/clar.h rename to deps/clar/clar.h diff --git a/tests/clar/clar/fixtures.h b/deps/clar/clar/fixtures.h similarity index 100% rename from tests/clar/clar/fixtures.h rename to deps/clar/clar/fixtures.h diff --git a/tests/clar/clar/fs.h b/deps/clar/clar/fs.h similarity index 100% rename from tests/clar/clar/fs.h rename to deps/clar/clar/fs.h diff --git a/tests/clar/clar/print.h b/deps/clar/clar/print.h similarity index 100% rename from tests/clar/clar/print.h rename to deps/clar/clar/print.h diff --git a/tests/clar/clar/sandbox.h b/deps/clar/clar/sandbox.h similarity index 100% rename from tests/clar/clar/sandbox.h rename to deps/clar/clar/sandbox.h diff --git a/tests/clar/clar/summary.h b/deps/clar/clar/summary.h similarity index 100% rename from tests/clar/clar/summary.h rename to deps/clar/clar/summary.h diff --git a/tests/clar/clar_libgit2.c b/deps/clar/clar_libgit2.c similarity index 100% rename from tests/clar/clar_libgit2.c rename to deps/clar/clar_libgit2.c diff --git a/tests/clar/clar_libgit2.h b/deps/clar/clar_libgit2.h similarity index 100% rename from tests/clar/clar_libgit2.h rename to deps/clar/clar_libgit2.h diff --git a/tests/clar/clar_libgit2_alloc.c b/deps/clar/clar_libgit2_alloc.c similarity index 100% rename from tests/clar/clar_libgit2_alloc.c rename to deps/clar/clar_libgit2_alloc.c diff --git a/tests/clar/clar_libgit2_alloc.h b/deps/clar/clar_libgit2_alloc.h similarity index 100% rename from tests/clar/clar_libgit2_alloc.h rename to deps/clar/clar_libgit2_alloc.h diff --git a/tests/clar/clar_libgit2_timer.c b/deps/clar/clar_libgit2_timer.c similarity index 100% rename from tests/clar/clar_libgit2_timer.c rename to deps/clar/clar_libgit2_timer.c diff --git a/tests/clar/clar_libgit2_timer.h b/deps/clar/clar_libgit2_timer.h similarity index 100% rename from tests/clar/clar_libgit2_timer.h rename to deps/clar/clar_libgit2_timer.h diff --git a/tests/clar/clar_libgit2_trace.c b/deps/clar/clar_libgit2_trace.c similarity index 100% rename from tests/clar/clar_libgit2_trace.c rename to deps/clar/clar_libgit2_trace.c diff --git a/tests/clar/clar_libgit2_trace.h b/deps/clar/clar_libgit2_trace.h similarity index 100% rename from tests/clar/clar_libgit2_trace.h rename to deps/clar/clar_libgit2_trace.h diff --git a/tests/clar/generate.py b/deps/clar/generate.py similarity index 100% rename from tests/clar/generate.py rename to deps/clar/generate.py diff --git a/tests/clar/main.c b/deps/clar/main.c similarity index 100% rename from tests/clar/main.c rename to deps/clar/main.c diff --git a/tests/README.md b/tests/README.md index 460e045e3..4c1a5890c 100644 --- a/tests/README.md +++ b/tests/README.md @@ -4,8 +4,6 @@ These are the unit and integration tests for the libgit2 projects. * `benchmarks` These are benchmark tests that excercise the CLI. -* `clar` - This is [clar](https://github.com/clar-test/clar) the common test framework. * `headertest` This is a simple project that ensures that our public headers are compatible with extremely strict compilation options. diff --git a/tests/libgit2/CMakeLists.txt b/tests/libgit2/CMakeLists.txt index 7a4bb476c..f8b80eb32 100644 --- a/tests/libgit2/CMakeLists.txt +++ b/tests/libgit2/CMakeLists.txt @@ -12,7 +12,7 @@ if(NOT PYTHONINTERP_FOUND) "Make sure python is available, or pass -DBUILD_TESTS=OFF to skip building the tests") ENDIF() -set(CLAR_PATH "${PROJECT_SOURCE_DIR}/tests/clar") +set(CLAR_PATH "${PROJECT_SOURCE_DIR}/deps/clar") set(CLAR_FIXTURES "${PROJECT_SOURCE_DIR}/tests/resources/") set(TEST_PATH "${CMAKE_CURRENT_SOURCE_DIR}") add_definitions(-DCLAR_FIXTURE_PATH=\"${CLAR_FIXTURES}\") diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt index 425c27dcd..6b44b85fa 100644 --- a/tests/util/CMakeLists.txt +++ b/tests/util/CMakeLists.txt @@ -12,7 +12,7 @@ if(NOT PYTHONINTERP_FOUND) "Make sure python is available, or pass -DBUILD_TESTS=OFF to skip building the tests") ENDIF() -set(CLAR_PATH "${libgit2_SOURCE_DIR}/tests/clar") +set(CLAR_PATH "${libgit2_SOURCE_DIR}/deps/clar") set(CLAR_FIXTURES "${libgit2_SOURCE_DIR}/tests/resources/") set(TEST_PATH "${CMAKE_CURRENT_SOURCE_DIR}") add_definitions(-DCLAR_FIXTURE_PATH=\"${CLAR_FIXTURES}\")