Skip to content

Commit 2b9d096

Browse files
committed
test: optionally test contrib in CI
Recently it was reported that a topic merged to 'next' broke build and test for contrib/subtree part of the system. Instead of having those who run 'next' or 'master' to hit the build and test breakage and report to us, make sure we notice breakages in contrib/ area before they hit my tree at all, during their own presubmit testing. Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 67ad421 commit 2b9d096

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ include shared.mak
342342
# If it isn't set, fallback to $LC_ALL, $LANG or use the first utf-8
343343
# locale returned by "locale -a".
344344
#
345+
# Define TEST_CONTRIB_TOO to make "make test" run tests in contrib/
346+
# directories.
347+
#
345348
# Define HAVE_CLOCK_GETTIME if your platform has clock_gettime.
346349
#
347350
# Define HAVE_CLOCK_MONOTONIC if your platform has CLOCK_MONOTONIC.
@@ -3369,6 +3372,9 @@ export TEST_NO_MALLOC_CHECK
33693372

33703373
test: all
33713374
$(MAKE) -C t/ all
3375+
ifdef TEST_CONTRIB_TOO
3376+
$(MAKE) -C contrib/ test
3377+
endif
33723378

33733379
perf: all
33743380
$(MAKE) -C t/perf/ all

ci/run-build-and-tests.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ case "$jobname" in
99
fedora-breaking-changes-musl|linux-breaking-changes)
1010
export WITH_BREAKING_CHANGES=YesPlease
1111
export WITH_RUST=YesPlease
12+
export TEST_CONTRIB_TOO=yes
1213
MESONFLAGS="$MESONFLAGS -Dbreaking_changes=true"
1314
MESONFLAGS="$MESONFLAGS -Drust=enabled"
1415
;;
@@ -26,6 +27,7 @@ linux-TEST-vars)
2627
export GIT_TEST_NO_WRITE_REV_INDEX=1
2728
export GIT_TEST_CHECKOUT_WORKERS=2
2829
export GIT_TEST_PACK_USE_BITMAP_BOUNDARY_TRAVERSAL=1
30+
export TEST_CONTRIB_TOO=yes
2931
;;
3032
linux-clang)
3133
export GIT_TEST_DEFAULT_HASH=sha1
@@ -36,6 +38,7 @@ linux-sha256)
3638
linux-reftable|linux-reftable-leaks|osx-reftable)
3739
export GIT_TEST_DEFAULT_REF_FORMAT=reftable
3840
;;
41+
3942
esac
4043

4144
case "$jobname" in

contrib/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
all::
2+
3+
test::
4+
$(MAKE) -C diff-highlight $@
5+
$(MAKE) -C subtree $@
6+
7+
clean::
8+
$(MAKE) -C contacts $@
9+
$(MAKE) -C diff-highlight $@
10+
$(MAKE) -C subtree $@

0 commit comments

Comments
 (0)