summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-11-16 23:47:14 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2022-02-22 22:07:45 -0500
commit2b09b5d7a0e856f6a5b23bfbd38537f8ee472523 (patch)
treea0bf56a3ce3d96a30ebae714cb3dca3216e80b13
parent25bc84fb8f702b57983d374f1c79b93a2d7543f1 (diff)
downloadlibgit2-2b09b5d7a0e856f6a5b23bfbd38537f8ee472523.tar.gz
refactor: move headertest into separate test folder
-rw-r--r--tests/CMakeLists.txt1
-rw-r--r--tests/README.md3
-rw-r--r--tests/headertest/CMakeLists.txt14
-rw-r--r--tests/headertest/headertest.c (renamed from tests/libgit2/headertest.c)0
-rw-r--r--tests/libgit2/CMakeLists.txt17
5 files changed, 18 insertions, 17 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index d17f52589..7214d94de 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,4 +1,5 @@
# The main libgit2 tests tree: this CMakeLists.txt includes the
# subprojects that make up core libgit2 support.
+add_subdirectory(headertest)
add_subdirectory(libgit2)
diff --git a/tests/README.md b/tests/README.md
index 2e3b2630e..91b26f592 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -4,6 +4,9 @@ These are the unit and integration tests for the libgit2 projects.
* `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.
* `libgit2`
These tests exercise the core git functionality in libgit2 itself.
* `resources`
diff --git a/tests/headertest/CMakeLists.txt b/tests/headertest/CMakeLists.txt
new file mode 100644
index 000000000..c70ce1ae1
--- /dev/null
+++ b/tests/headertest/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Header file validation project: ensure that we do not publish any sloppy
+# definitions in our headers and that a consumer can include <git2.dll>
+# even when they have aggressive C90 warnings enabled.
+
+add_executable(headertest headertest.c)
+set_target_properties(headertest PROPERTIES C_STANDARD 90)
+set_target_properties(headertest PROPERTIES C_EXTENSIONS OFF)
+target_include_directories(headertest PRIVATE ${LIBGIT2_INCLUDES})
+
+if (MSVC)
+ target_compile_options(headertest PUBLIC /W4 /WX)
+else()
+ target_compile_options(headertest PUBLIC -Wall -Wextra -pedantic -Werror)
+endif()
diff --git a/tests/libgit2/headertest.c b/tests/headertest/headertest.c
index 2af8a14ec..2af8a14ec 100644
--- a/tests/libgit2/headertest.c
+++ b/tests/headertest/headertest.c
diff --git a/tests/libgit2/CMakeLists.txt b/tests/libgit2/CMakeLists.txt
index 9ab01077a..90ae6253e 100644
--- a/tests/libgit2/CMakeLists.txt
+++ b/tests/libgit2/CMakeLists.txt
@@ -80,20 +80,3 @@ add_clar_test(ssh -v -sonline::push -sonline::clone::ssh_cert -s
add_clar_test(proxy -v -sonline::clone::proxy)
add_clar_test(auth_clone -v -sonline::clone::cred)
add_clar_test(auth_clone_and_push -v -sonline::clone::push -sonline::push)
-
-#
-# Header file validation project: ensure that we do not publish any sloppy
-# definitions in our headers and that a consumer can include <git2.dll>
-# even when they have aggressive C90 warnings enabled.
-#
-
-add_executable(headertest headertest.c)
-set_target_properties(headertest PROPERTIES C_STANDARD 90)
-set_target_properties(headertest PROPERTIES C_EXTENSIONS OFF)
-target_include_directories(headertest PRIVATE ${LIBGIT2_INCLUDES})
-
-if (MSVC)
- target_compile_options(headertest PUBLIC /W4 /WX)
-else()
- target_compile_options(headertest PUBLIC -Wall -Wextra -pedantic -Werror)
-endif()