Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
d02f4f7a
Commit
d02f4f7a
authored
Nov 17, 2021
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: refactor `add_clar_test` into separate module
parent
e6d93612
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
30 deletions
+19
-30
ci/test.sh
+0
-4
cmake/AddClarTest.cmake
+7
-0
tests/libgit2/CMakeLists.txt
+10
-17
tests/util/CMakeLists.txt
+2
-9
No files found.
ci/test.sh
View file @
d02f4f7a
...
@@ -156,10 +156,6 @@ fi
...
@@ -156,10 +156,6 @@ fi
# Run the tests that do not require network connectivity.
# Run the tests that do not require network connectivity.
if
[
-z
"
$SKIP_UTILITY_TESTS
"
]
;
then
run_test util
fi
if
[
-z
"
$SKIP_OFFLINE_TESTS
"
]
;
then
if
[
-z
"
$SKIP_OFFLINE_TESTS
"
]
;
then
echo
""
echo
""
echo
"##############################################################################"
echo
"##############################################################################"
...
...
cmake/AddClarTest.cmake
0 → 100644
View file @
d02f4f7a
function
(
ADD_CLAR_TEST project name
)
if
(
NOT USE_LEAK_CHECKER STREQUAL
"OFF"
)
add_test
(
${
name
}
"
${
PROJECT_SOURCE_DIR
}
/script/
${
USE_LEAK_CHECKER
}
.sh"
"
${
PROJECT_BINARY_DIR
}
/
${
project
}
"
${
ARGN
}
)
else
()
add_test
(
${
name
}
"
${
PROJECT_BINARY_DIR
}
/
${
project
}
"
${
ARGN
}
)
endif
()
endfunction
(
ADD_CLAR_TEST
)
tests/libgit2/CMakeLists.txt
View file @
d02f4f7a
...
@@ -63,20 +63,13 @@ if(MSVC_IDE)
...
@@ -63,20 +63,13 @@ if(MSVC_IDE)
set_source_files_properties("
precompiled.c
" COMPILE_FLAGS "
/Ycprecompiled.h
")
set_source_files_properties("
precompiled.c
" COMPILE_FLAGS "
/Ycprecompiled.h
")
endif()
endif()
function(ADD_CLAR_TEST name)
include(AddClarTest)
if(NOT USE_LEAK_CHECKER STREQUAL "
OFF
")
add_clar_test(libgit2_tests offline -v -xonline)
add_test(
${
name
}
"
${
PROJECT_SOURCE_DIR
}
/script/
${
USE_LEAK_CHECKER
}
.sh
" "
${
PROJECT_BINARY_DIR
}
/libgit2_tests
"
${
ARGN
}
)
add_clar_test(libgit2_tests invasive -v -score::ftruncate -sfilter::stream::bigfile -sodb::largefiles -siterator::workdir::filesystem_gunk -srepo::init -srepo::init::at_filesystem_root)
else()
add_clar_test(libgit2_tests online -v -sonline -xonline::customcert)
add_test(
${
name
}
"
${
PROJECT_BINARY_DIR
}
/libgit2_tests
"
${
ARGN
}
)
add_clar_test(libgit2_tests online_customcert -v -sonline::customcert)
endif()
add_clar_test(libgit2_tests gitdaemon -v -sonline::push)
endfunction(ADD_CLAR_TEST)
add_clar_test(libgit2_tests ssh -v -sonline::push -sonline::clone::ssh_cert -sonline::clone::ssh_with_paths -sonline::clone::path_whitespace_ssh)
add_clar_test(libgit2_tests proxy -v -sonline::clone::proxy)
add_clar_test(offline -v -xonline)
add_clar_test(libgit2_tests auth_clone -v -sonline::clone::cred)
add_clar_test(invasive -v -score::ftruncate -sfilter::stream::bigfile -sodb::largefiles -siterator::workdir::filesystem_gunk -srepo::init -srepo::init::at_filesystem_root)
add_clar_test(libgit2_tests auth_clone_and_push -v -sonline::clone::push -sonline::push)
add_clar_test(online -v -sonline -xonline::customcert)
add_clar_test(online_customcert -v -sonline::customcert)
add_clar_test(gitdaemon -v -sonline::push)
add_clar_test(ssh -v -sonline::push -sonline::clone::ssh_cert -sonline::clone::ssh_with_paths -sonline::clone::path_whitespace_ssh)
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)
tests/util/CMakeLists.txt
View file @
d02f4f7a
...
@@ -62,14 +62,7 @@ if(MSVC_IDE)
...
@@ -62,14 +62,7 @@ if(MSVC_IDE)
set_source_files_properties("
precompiled.c
" COMPILE_FLAGS "
/Ycprecompiled.h
")
set_source_files_properties("
precompiled.c
" COMPILE_FLAGS "
/Ycprecompiled.h
")
endif()
endif()
function(ADD_CLAR_TEST name)
if(NOT USE_LEAK_CHECKER STREQUAL "
OFF
")
add_test(
${
name
}
"
${
libgit2_SOURCE_DIR
}
/script/
${
USE_LEAK_CHECKER
}
.sh
" "
${
libgit2_BINARY_DIR
}
/util_tests
"
${
ARGN
}
)
else()
add_test(
${
name
}
"
${
libgit2_BINARY_DIR
}
/util_tests
"
${
ARGN
}
)
endif()
endfunction(ADD_CLAR_TEST)
enable_testing()
enable_testing()
add_clar_test(util -v)
include(AddClarTest)
add_clar_test(util_tests util -v)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment