threads / patch / 62097

patch, 2 partsadd missing LIBCURL prereq to a few tests

Subject: [PATCH 0/2] add missing LIBCURL prereq to a few tests

## tl;dr

4 messages between Sep 11, 2024 and Sep 11, 2024. Diffs are folded; open one to read it.

replies: 3people: 2as markdown or json

Martin Ågren· Sep 11, 2024, 10:30 UTC · lore
Hi,

I recently had reason to build Git without libcurl. That surfaced two test scripts that use `git http-fetch` or similar without giving the LIBCURL prerequisite.

Martin
Martin Ågren (2):
  t1517: add missing LIBCURL prereq
  t0211: add missing LIBCURL prereq
 t/t0211-trace2-perf.sh  | 6 ++++--
 t/t1517-outside-repo.sh | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)
-- 
2.46.0.733.g1eb83ef1a1
Martin Ågren· Sep 11, 2024, 10:30 UTC · re: Martin Ågren · lore

[PATCH 1/2] t1517: add missing LIBCURL prereq

After building Git with NO_LIBCURL, there is no `git remote-http`, so it's not meaningful to test that it can run outside of a repository. Indeed, that test will fail. Add the LIBCURL prereq to it.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
---
 This is from b25ec8b8d5 (t1517: more coverage for commands that work
 without repository, 2024-05-31), which first appeared in 2.46.0.
 t/t1517-outside-repo.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t1517-outside-repo.sh +1 −1
diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 990a036582..342defbb61 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -98,7 +98,7 @@ test_expect_success 'stripspace outside repository' '
 	nongit git stripspace -s </dev/null
 '
 
-test_expect_success 'remote-http outside repository' '
+test_expect_success LIBCURL 'remote-http outside repository' '
 	test_must_fail git remote-http 2>actual &&
 	test_grep "^error: remote-curl" actual &&
 	(
-- 
2.46.0.733.g1eb83ef1a1
Martin Ågren· Sep 11, 2024, 10:31 UTC · re: Martin Ågren · lore

[PATCH 2/2] t0211: add missing LIBCURL prereq

After building Git with NO_LIBCURL, we're lacking `git remote-http` and `git http-fetch`, so when we test that they trace as they should, we're bound to fail. Add the LIBCURL prereq to those tests.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
---
 This is from around 6111252cbf (trace2: emit 'def_param' set with
 'cmd_name' event, 2024-03-07), which first appeared in 2.45.0.
 t/t0211-trace2-perf.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Show changes to t/t0211-trace2-perf.sh +4 −2
diff --git a/t/t0211-trace2-perf.sh b/t/t0211-trace2-perf.sh
index 070fe7a5da..dddc130560 100755
--- a/t/t0211-trace2-perf.sh
+++ b/t/t0211-trace2-perf.sh
@@ -337,7 +337,8 @@ test_expect_success 'expect def_params for query command' '
 # remote-curl.c rather than git.c.  Confirm that we get def_param
 # events from both layers.
 #
-test_expect_success 'expect def_params for remote-curl and _run_dashed_' '
+test_expect_success LIBCURL \
+		'expect def_params for remote-curl and _run_dashed_' '
 	test_when_finished "rm prop.perf actual" &&
 
 	test_config_global "trace2.configParams" "cfg.prop.*" &&
@@ -366,7 +367,8 @@ test_expect_success 'expect def_params for remote-curl and _run_dashed_' '
 # an executable built from http-fetch.c.  Confirm that we get
 # def_param events from both layers.
 #
-test_expect_success 'expect def_params for http-fetch and _run_dashed_' '
+test_expect_success LIBCURL \
+		'expect def_params for http-fetch and _run_dashed_' '
 	test_when_finished "rm prop.perf actual" &&
 
 	test_config_global "trace2.configParams" "cfg.prop.*" &&
-- 
2.46.0.733.g1eb83ef1a1
Junio C Hamano· Sep 11, 2024, 15:53 UTC · re: Martin Ågren · lore

Re: [PATCH 0/2] add missing LIBCURL prereq to a few tests

Martin Ågren <martin.agren@gmail.com> writes:
Show 15 quoted lines
> Hi,
>
> I recently had reason to build Git without libcurl. That surfaced two
> test scripts that use `git http-fetch` or similar without giving the
> LIBCURL prerequisite.
>
> Martin
>
> Martin Ågren (2):
>   t1517: add missing LIBCURL prereq
>   t0211: add missing LIBCURL prereq
>
>  t/t0211-trace2-perf.sh  | 6 ++++--
>  t/t1517-outside-repo.sh | 2 +-
>  2 files changed, 5 insertions(+), 3 deletions(-)
Thanks.

← back to recent threads