Skip to content

Commit 68c7d27

Browse files
avargitster
authored andcommitted
test-lib: add a PTHREADS prerequisite
Add a PTHREADS prerequisite which is false when git is compiled with NO_PTHREADS=YesPlease. There's lots of custom code that runs when threading isn't available, but before this prerequisite there was no way to test it. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 543f1c0 commit 68c7d27

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2242,6 +2242,7 @@ GIT-BUILD-OPTIONS: FORCE
22422242
@echo NO_EXPAT=\''$(subst ','\'',$(subst ','\'',$(NO_EXPAT)))'\' >>$@+
22432243
@echo USE_LIBPCRE1=\''$(subst ','\'',$(subst ','\'',$(USE_LIBPCRE)))'\' >>$@+
22442244
@echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@+
2245+
@echo NO_PTHREADS=\''$(subst ','\'',$(subst ','\'',$(NO_PTHREADS)))'\' >>$@+
22452246
@echo NO_PYTHON=\''$(subst ','\'',$(subst ','\'',$(NO_PYTHON)))'\' >>$@+
22462247
@echo NO_UNIX_SOCKETS=\''$(subst ','\'',$(subst ','\'',$(NO_UNIX_SOCKETS)))'\' >>$@+
22472248
@echo PAGER_ENV=\''$(subst ','\'',$(subst ','\'',$(PAGER_ENV)))'\' >>$@+

t/README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,10 @@ use these, and "test_set_prereq" for how to define your own.
817817
Test is run on a filesystem which converts decomposed utf-8 (nfd)
818818
to precomposed utf-8 (nfc).
819819

820+
- PTHREADS
821+
822+
Git wasn't compiled with NO_PTHREADS=YesPlease.
823+
820824
Tips for Writing Tests
821825
----------------------
822826

t/test-lib.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,7 @@ esac
10091009

10101010
( COLUMNS=1 && test $COLUMNS = 1 ) && test_set_prereq COLUMNS_CAN_BE_1
10111011
test -z "$NO_PERL" && test_set_prereq PERL
1012+
test -z "$NO_PTHREADS" && test_set_prereq PTHREADS
10121013
test -z "$NO_PYTHON" && test_set_prereq PYTHON
10131014
test -n "$USE_LIBPCRE1" && test_set_prereq PCRE
10141015
test -z "$NO_GETTEXT" && test_set_prereq GETTEXT

0 commit comments

Comments
 (0)