Skip to content

Commit c594f7a

Browse files
committed
Merge branch 'sj/meson-test-environ-fix' into seen
meson-based build procedure was overly aggressive in using test environment in two contrib/ directories, which was corrected. * sj/meson-test-environ-fix: meson: use test_environment conditionally.
2 parents 1c7952f + fb17758 commit c594f7a

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

contrib/credential/netrc/meson.build

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ credential_netrc = custom_target(
77
install_dir: get_option('libexecdir') / 'git-core',
88
)
99

10-
credential_netrc_testenv = test_environment
11-
credential_netrc_testenv.set('CREDENTIAL_NETRC_PATH', credential_netrc.full_path())
10+
if get_option('tests')
11+
credential_netrc_testenv = test_environment
12+
credential_netrc_testenv.set('CREDENTIAL_NETRC_PATH', credential_netrc.full_path())
13+
else
14+
credential_netrc_testenv = environment()
15+
endif
1216

1317
test('t-git-credential-netrc',
1418
shell,

contrib/subtree/meson.build

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ git_subtree = custom_target(
1212
install_dir: get_option('libexecdir') / 'git-core',
1313
)
1414

15-
subtree_test_environment = test_environment
16-
subtree_test_environment.prepend('PATH', meson.current_build_dir())
15+
if get_option('tests')
16+
subtree_test_environment = test_environment
17+
subtree_test_environment.prepend('PATH', meson.current_build_dir())
18+
else
19+
subtree_test_environment = environment()
20+
endif
1721

1822
test('t7900-subtree', shell,
1923
args: [ 't7900-subtree.sh' ],

0 commit comments

Comments
 (0)