Skip to content

Commit 5e163fa

Browse files
pks-tgitster
authored andcommitted
t: import the clar unit testing framework
Import the clar unit testing framework at commit faa8419 (Merge pull request #93 from clar-test/ethomson/fixtures, 2023-12-14). The framework will be wired up in subsequent commits. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d70c1e4 commit 5e163fa

File tree

20 files changed

+2943
-1
lines changed

20 files changed

+2943
-1
lines changed

Documentation/technical/unit-tests.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ GitHub / GitLab stars to estimate this.
203203
:criterion: https://github.com/Snaipe/Criterion[Criterion]
204204
:c-tap: https://github.com/rra/c-tap-harness/[C TAP]
205205
:check: https://libcheck.github.io/check/[Check]
206+
:clar: https://github.com/clar-test/clar[Clar]
206207

207208
[format="csv",options="header",width="33%",subs="specialcharacters,attributes,quotes,macros"]
208209
|=====
@@ -212,6 +213,7 @@ Framework,"<<license,License>>","<<vendorable-or-ubiquitous,Vendorable or ubiqui
212213
{criterion},{mit},{false},{partial},{true},{true},{true},{true},{true},{false},{true},19,1800
213214
{c-tap},{expat},{true},{partial},{partial},{true},{false},{true},{false},{false},{false},4,33
214215
{check},{lgpl},{false},{partial},{true},{true},{true},{false},{false},{false},{true},17,973
216+
{clar},{isc},{false},{partial},{true},{true},{true},{true},{false},{false},{true},1,192
215217
|=====
216218

217219
=== Additional framework candidates

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1331,6 +1331,8 @@ THIRD_PARTY_SOURCES += compat/poll/%
13311331
THIRD_PARTY_SOURCES += compat/regex/%
13321332
THIRD_PARTY_SOURCES += sha1collisiondetection/%
13331333
THIRD_PARTY_SOURCES += sha1dc/%
1334+
THIRD_PARTY_SOURCES += $(UNIT_TEST_DIR)/clar/%
1335+
THIRD_PARTY_SOURCES += $(UNIT_TEST_DIR)/clar/clar/%
13341336

13351337
UNIT_TEST_PROGRAMS += t-ctype
13361338
UNIT_TEST_PROGRAMS += t-example-decorate
@@ -3260,7 +3262,7 @@ $(SP_OBJ): %.sp: %.c %.o
32603262
.PHONY: sparse
32613263
sparse: $(SP_OBJ)
32623264

3263-
EXCEPT_HDRS := $(GENERATED_H) unicode-width.h compat/% xdiff/%
3265+
EXCEPT_HDRS := $(GENERATED_H) unicode-width.h compat/% xdiff/% $(UNIT_TEST_DIR)/clar/% $(UNIT_TEST_DIR)/clar/clar/%
32643266
ifndef OPENSSL_SHA1
32653267
EXCEPT_HDRS += sha1/openssl.h
32663268
endif
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
os: [ ubuntu-latest, macos-latest ]
14+
15+
runs-on: ${{ matrix.os }}
16+
17+
steps:
18+
- name: Check out
19+
uses: actions/checkout@v2
20+
- name: Build
21+
run: |
22+
cd test
23+
make

t/unit-tests/clar/COPYING

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
ISC License
2+
3+
Copyright (c) 2011-2015 Vicent Marti
4+
5+
Permission to use, copy, modify, and/or distribute this software for any
6+
purpose with or without fee is hereby granted, provided that the above
7+
copyright notice and this permission notice appear in all copies.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

0 commit comments

Comments
 (0)