Re: [PATCH v1 09/11] t: add tests for restore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Duy,

On Fri, 8 Mar 2019, Nguyễn Thái Ngọc Duy wrote:

> diff --git a/t/t2070-restore.sh b/t/t2070-restore.sh
> new file mode 100755
> index 0000000000..df91bf54bc
> --- /dev/null
> +++ b/t/t2070-restore.sh
> @@ -0,0 +1,77 @@
> +#!/bin/sh
> +
> +test_description='restore basic functionality'
> +
> +. ./test-lib.sh
> +
> +test_expect_success 'setup' '
> +	test_commit first &&
> +	echo first-and-a-half >>first.t &&
> +	git add first.t &&
> +	test_commit second &&
> +	echo one >one &&
> +	echo two >two &&
> +	echo untracked >untracked &&
> +	echo ignored >ignored &&
> +	echo /ignored >.gitignore &&
> +	git add one two .gitignore &&
> +	git update-ref refs/heads/one master
> +'
> +
> +test_expect_success 'restore without pathspec is not ok' '
> +	test_must_fail git restore &&
> +	test_must_fail git restore --source=first
> +'
> +
> +test_expect_success 'restore -p without pathspec is fine' '
> +	echo q >cmd &&
> +	git restore -p <cmd
> +'

This breaks with NO_PERL builds. See e.g.

https://dev.azure.com/gitgitgadget/git/_build/results?buildId=4581
https://dev.azure.com/gitgitgadget/git/_build/results?buildId=4584
https://dev.azure.com/git/git/_build/results?buildId=386

You need this squashed in:

diff --git a/t/t2070-restore.sh b/t/t2070-restore.sh
index df91bf54bc06..f4766544c5de 100755
--- a/t/t2070-restore.sh
+++ b/t/t2070-restore.sh
@@ -23,7 +23,7 @@ test_expect_success 'restore without pathspec is not ok'
'
 	test_must_fail git restore --source=first
 '
 
-test_expect_success 'restore -p without pathspec is fine' '
+test_expect_success PERL 'restore -p without pathspec is fine' '
 	echo q >cmd &&
 	git restore -p <cmd
 '


Junio, could you please add that as SQUASH??? on top of
nd/switch-and-restore to unbreak the CI builds?

Duy, have you thought about making use of the CI builds? You could catch
those bugs before they hit the Git mailing list...

Thanks,
Dscho

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux