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
358a60e1
Unverified
Commit
358a60e1
authored
Oct 28, 2021
by
Edward Thomson
Committed by
GitHub
Oct 28, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6100 from mkhl/tests/instead-of-clar
libgit2_clar is now libgit2_tests
parents
9b04a307
f66e7f36
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
18 deletions
+18
-18
.vscode/launch.json
+1
-1
.vscode/tasks.json
+1
-1
README.md
+3
-3
cmake/IdeSplitSources.cmake
+1
-1
docs/contributing.md
+4
-4
fuzzers/corpora/objects/blob
+3
-3
tests/README.md
+4
-4
tests/core/init.c
+1
-1
No files found.
.vscode/launch.json
View file @
358a60e1
...
...
@@ -8,7 +8,7 @@
"name"
:
"(gdb) Launch"
,
"type"
:
"cppdbg"
,
"request"
:
"launch"
,
"program"
:
"${workspaceFolder}/build/libgit2_
clar
"
,
"program"
:
"${workspaceFolder}/build/libgit2_
tests
"
,
"args"
:
[],
"stopAtEntry"
:
false
,
"cwd"
:
"${fileDirname}"
,
...
...
.vscode/tasks.json
View file @
358a60e1
...
...
@@ -16,7 +16,7 @@
{
"label"
:
"Run Tests"
,
"type"
:
"shell"
,
"command"
:
"build/libgit2_
clar
-v"
,
"command"
:
"build/libgit2_
tests
-v"
,
"group"
:
"test"
,
"presentation"
:
{
"reveal"
:
"always"
,
...
...
README.md
View file @
358a60e1
...
...
@@ -236,18 +236,18 @@ Once built, you can run the tests from the `build` directory with the command
Alternatively you can run the test suite directly using,
$ ./libgit2_
clar
$ ./libgit2_
tests
Invoking the test suite directly is useful because it allows you to execute
individual tests, or groups of tests using the
`-s`
flag. For example, to
run the index tests:
$ ./libgit2_
clar
-sindex
$ ./libgit2_
tests
-sindex
To run a single test named
`index::racy::diff`
, which corresponds to the test
function
[
`test_index_racy__diff`
](
https://github.com/libgit2/libgit2/blob/main/tests/index/racy.c#L23
)
:
$ ./libgit2_
clar
-sindex::racy::diff
$ ./libgit2_
tests
-sindex::racy::diff
The test suite will print a
`.`
for every passing test, and an
`F`
for any
failing test. An
`S`
indicates that a test was skipped because it is not
...
...
cmake/IdeSplitSources.cmake
View file @
358a60e1
# This function splits the sources files up into their appropriate
# subdirectories. This is especially useful for IDEs like Xcode and
# Visual Studio, so that you can navigate into the libgit2_
clar
project,
# Visual Studio, so that you can navigate into the libgit2_
tests
project,
# and see the folders within the tests folder (instead of just seeing all
# source and tests in a single folder.)
FUNCTION
(
IDE_SPLIT_SOURCES target
)
...
...
docs/contributing.md
View file @
358a60e1
...
...
@@ -120,15 +120,15 @@ In addition to new tests, please ensure that your changes do not cause
any other test failures. Running the entire test suite is helpful
before you submit a pull request. When you build libgit2, the test
suite will also be built. You can run most of the tests by simply running
the resultant
`libgit2_
clar
`
binary. If you want to run a specific
the resultant
`libgit2_
tests
`
binary. If you want to run a specific
unit test, you can name it with the
`-s`
option. For example:
libgit2_
clar
-sstatus::worktree::long_filenames
libgit2_
tests
-sstatus::worktree::long_filenames
Or you can run an entire class of tests. For example, to run all the
worktree status tests:
libgit2_
clar
-sstatus::worktree
libgit2_
tests
-sstatus::worktree
The default test run is fairly exhaustive, but it will exclude some
unit tests by default: in particular, those that talk to network
...
...
@@ -136,7 +136,7 @@ servers and the tests that manipulate the filesystem in onerous
ways (and may need to have special privileges to run). To run the
network tests:
libgit2_
clar
-ionline
libgit2_
tests
-ionline
In addition, various tests may be enabled by environment variables,
like the ones that write exceptionally large repositories or manipulate
...
...
fuzzers/corpora/objects/blob
View file @
358a60e1
...
...
@@ -187,18 +187,18 @@ Once built, you can run the tests from the `build` directory with the command
Alternatively you can run the test suite directly using,
$ ./libgit2_
clar
$ ./libgit2_
tests
Invoking the test suite directly is useful because it allows you to execute
individual tests, or groups of tests using the `-s` flag. For example, to
run the index tests:
$ ./libgit2_
clar
-sindex
$ ./libgit2_
tests
-sindex
To run a single test named `index::racy::diff`, which corresponds to the test
function (`test_index_racy__diff`)[https://github.com/libgit2/libgit2/blob/master/tests/index/racy.c#L23]:
$ ./libgit2_
clar
-sindex::racy::diff
$ ./libgit2_
tests
-sindex::racy::diff
The test suite will print a `.` for every passing test, and an `F` for any
failing test. An `S` indicates that a test was skipped because it is not
...
...
tests/README.md
View file @
358a60e1
...
...
@@ -15,7 +15,7 @@ https://github.com/vmg/clar
*
Test:
./build/libgit2_
clar
./build/libgit2_
tests
*
Make sure everything is fine.
...
...
@@ -34,8 +34,8 @@ Uses [`valgrind`](http://www.valgrind.org/):
```
console
$
cmake
-DBUILD_TESTS
=
ON
-DVALGRIND
=
ON ..
$
cmake
--build
.
$
valgrind
--leak-check
=
full
--show-reachable
=
yes
--num-callers
=
50
--suppressions
=
../libgit2_
clar
.supp
\
./libgit2_
clar
$
valgrind
--leak-check
=
full
--show-reachable
=
yes
--num-callers
=
50
--suppressions
=
../libgit2_
tests
.supp
\
./libgit2_
tests
```
#### macOS
...
...
@@ -44,5 +44,5 @@ Uses [`leaks`](https://developer.apple.com/library/archive/documentation/Perform
```
console
$
MallocStackLogging
=
1
MallocScribble
=
1
MallocLogFile
=
/dev/null
CLAR_AT_EXIT
=
"leaks -quiet
\$
PPID"
\
./libgit2_
clar
./libgit2_
tests
```
tests/core/init.c
View file @
358a60e1
...
...
@@ -2,7 +2,7 @@
void
test_core_init__returns_count
(
void
)
{
/* libgit2_
clar
initializes us first, so we have an existing
/* libgit2_
tests
initializes us first, so we have an existing
* initialization.
*/
cl_assert_equal_i
(
2
,
git_libgit2_init
());
...
...
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