diff mbox series

t7900: add '--scheduler=launchctl' parameter to fix test

Message ID 17313607-7ae8-c37a-7931-7712c7bfdb88@ramsayjones.plus.com (mailing list archive)
State New, archived
Headers show
Series t7900: add '--scheduler=launchctl' parameter to fix test | expand

Commit Message

Ramsay Jones Aug. 27, 2021, 11:59 p.m. UTC
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---

Hi Lénaïc,

As I said, I had a test failure from your previous series (Linux Mint)
which was solved with this patch.

ATB,
Ramsay Jones

 t/t7900-maintenance.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Junio C Hamano Aug. 30, 2021, 4:02 p.m. UTC | #1
Ramsay Jones <ramsay@ramsayjones.plus.com> writes:

> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
>
> Hi Lénaïc,
>
> As I said, I had a test failure from your previous series (Linux Mint)
> which was solved with this patch.
>
> ATB,
> Ramsay Jones
>
>  t/t7900-maintenance.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

This test comes from outside Lénaïc's series.  I guess I am seeing a
botched semantic merge conflict resolution of mine where the two
topics met.

The need for this fix made me a bit worried that the behaviour of
resolve_scheduler(SCHEDULER_AUTO) forces us to always name the
scheduler or risk a similar breakage, but in real life, nobody needs
to "force" use of, say, launchctl on a platform where launchctl is
not available so it is OK.


> diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh
> index 8955aea9c8..36a4218745 100755
> --- a/t/t7900-maintenance.sh
> +++ b/t/t7900-maintenance.sh
> @@ -609,11 +609,11 @@ test_expect_success 'start and stop macOS maintenance' '
>  
>  test_expect_success 'use launchctl list to prevent extra work' '
>  	# ensure we are registered
> -	GIT_TEST_MAINT_SCHEDULER=launchctl:./print-args git maintenance start &&
> +	GIT_TEST_MAINT_SCHEDULER=launchctl:./print-args git maintenance start --scheduler=launchctl &&
>  
>  	# do it again on a fresh args file
>  	rm -f args &&
> -	GIT_TEST_MAINT_SCHEDULER=launchctl:./print-args git maintenance start &&
> +	GIT_TEST_MAINT_SCHEDULER=launchctl:./print-args git maintenance start --scheduler=launchctl &&
>  
>  	ls "$HOME/Library/LaunchAgents" >actual &&
>  	cat >expect <<-\EOF &&
Ramsay Jones Aug. 31, 2021, 12:44 a.m. UTC | #2
On 30/08/2021 17:02, Junio C Hamano wrote:
> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
> 
[snip]
> 
> This test comes from outside Lénaïc's series.  I guess I am seeing a
> botched semantic merge conflict resolution of mine where the two
> topics met.

Oops! :( My apologies to you both.

My build of 'seen' had two test failures (t5319.19 and this one), and
I had to be somewhere else in about 30 mins ...

I should know by now not to rush out a patch ... Sorry to have wasted
your time.

ATB,
Ramsay Jones
Junio C Hamano Aug. 31, 2021, 3:59 p.m. UTC | #3
Ramsay Jones <ramsay@ramsayjones.plus.com> writes:

> On 30/08/2021 17:02, Junio C Hamano wrote:
>> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
>> 
> [snip]
>> 
>> This test comes from outside Lénaïc's series.  I guess I am seeing a
>> botched semantic merge conflict resolution of mine where the two
>> topics met.
>
> Oops! :( My apologies to you both.
>
> My build of 'seen' had two test failures (t5319.19 and this one), and
> I had to be somewhere else in about 30 mins ...
>
> I should know by now not to rush out a patch ... Sorry to have wasted
> your time.

No, the input was very valuable to me.  Neither topic has enough to
solve the issue because the new test got created in the topic that
does not yet have the --scheduler option in the "git maintenance"
command, and the other topic that added the option does not yet have
the test yet.

Unless one topic is made to build on the other, it is a semantic
context for me to resolve.

Hopefully what is near the tip of 'seen' now has the merge fix.

THanks.
diff mbox series

Patch

diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh
index 8955aea9c8..36a4218745 100755
--- a/t/t7900-maintenance.sh
+++ b/t/t7900-maintenance.sh
@@ -609,11 +609,11 @@  test_expect_success 'start and stop macOS maintenance' '
 
 test_expect_success 'use launchctl list to prevent extra work' '
 	# ensure we are registered
-	GIT_TEST_MAINT_SCHEDULER=launchctl:./print-args git maintenance start &&
+	GIT_TEST_MAINT_SCHEDULER=launchctl:./print-args git maintenance start --scheduler=launchctl &&
 
 	# do it again on a fresh args file
 	rm -f args &&
-	GIT_TEST_MAINT_SCHEDULER=launchctl:./print-args git maintenance start &&
+	GIT_TEST_MAINT_SCHEDULER=launchctl:./print-args git maintenance start --scheduler=launchctl &&
 
 	ls "$HOME/Library/LaunchAgents" >actual &&
 	cat >expect <<-\EOF &&