Skip to content

Commit 53c7a96

Browse files
committed
Merge branch 'jk/interop-test-build-options'
The support to customize build options to adjust for older versions and/or older systems for the interop tests has been improved. * jk/interop-test-build-options: t/interop: allow per-version make options
2 parents 4c22e57 + 22ef5f0 commit 53c7a96

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

t/interop/README

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,10 @@ You can then use test_expect_success as usual, with a few differences:
8383
should create one with the appropriate version of git.
8484

8585
At the end of the script, call test_done as usual.
86+
87+
Some older versions may need a few build knobs tweaked (e.g., ancient
88+
versions of Git no longer build with modern OpenSSL). Your script can
89+
set MAKE_OPTS_A and MAKE_OPTS_B, which will be passed alongside
90+
GIT_INTEROP_MAKE_OPTS. Users can override them per-script by setting
91+
GIT_INTEROP_MAKE_OPTS_{A,B} in the environment, just like they can set
92+
GIT_TEST_VERSION_{A,B}.

t/interop/i5500-git-daemon.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
VERSION_A=.
44
VERSION_B=v1.0.0
5+
MAKE_OPTS_B="NO_OPENSSL=TooOld"
56

67
: ${LIB_GIT_DAEMON_PORT:=5500}
78
LIB_GIT_DAEMON_COMMAND='git.a daemon'

t/interop/interop-lib.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ build_version () {
4545

4646
(
4747
cd "$dir" &&
48-
make $GIT_INTEROP_MAKE_OPTS >&2 &&
48+
make $2 $GIT_INTEROP_MAKE_OPTS >&2 &&
4949
touch .built
5050
) || return 1
5151

@@ -76,9 +76,11 @@ generate_wrappers () {
7676

7777
VERSION_A=${GIT_TEST_VERSION_A:-$VERSION_A}
7878
VERSION_B=${GIT_TEST_VERSION_B:-$VERSION_B}
79+
MAKE_OPTS_A=${GIT_INTEROP_MAKE_OPTS_A:-$MAKE_OPTS_A}
80+
MAKE_OPTS_B=${GIT_INTEROP_MAKE_OPTS_B:-$MAKE_OPTS_B}
7981

80-
if ! DIR_A=$(build_version "$VERSION_A") ||
81-
! DIR_B=$(build_version "$VERSION_B")
82+
if ! DIR_A=$(build_version "$VERSION_A" "$MAKE_OPTS_A") ||
83+
! DIR_B=$(build_version "$VERSION_B" "$MAKE_OPTS_B")
8284
then
8385
echo >&2 "fatal: unable to build git versions"
8486
exit 1

0 commit comments

Comments
 (0)