Patchwork tests: use `pwd` instead of $PWD

login
register
mail settings
Submitter Manuel Jacob
Date July 4, 2020, 10:45 a.m.
Message ID <5e758cf2e5c1c2c9b8d1.1593859521@tmp.fritz.box>
Download mbox | patch
Permalink /patch/46618/
State New
Headers show

Comments

Manuel Jacob - July 4, 2020, 10:45 a.m.
# HG changeset patch
# User Manuel Jacob <me@manueljacob.de>
# Date 1593858979 -7200
#      Sat Jul 04 12:36:19 2020 +0200
# Node ID 5e758cf2e5c1c2c9b8d11c5dc227b35797ec83a6
# Parent  73bee569f39d229412809a45c8b21fc809c5d996
# EXP-Topic pwd
tests: use `pwd` instead of $PWD

Before, check-code gave the following warning:

tests/test-rhg.t:13:
 >   $ rm -rf $PWD
 warning: don't use $PWD, use `pwd`
Manuel Jacob - July 4, 2020, 2:26 p.m.
More tests are broken:

* 
https://buildbot.mercurial-scm.org/builders/hg%20tests/builds/2975/steps/run-tests.py%20%28python%202.7.10%29/logs/stdio
* https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/82924

Since both are still draft, we could also temporarily prune afecc7f76f2d 
and 3707f6e7e04e, which seem to be the cause of the failure.

On 2020-07-04 12:45, Manuel Jacob wrote:
> # HG changeset patch
> # User Manuel Jacob <me@manueljacob.de>
> # Date 1593858979 -7200
> #      Sat Jul 04 12:36:19 2020 +0200
> # Node ID 5e758cf2e5c1c2c9b8d11c5dc227b35797ec83a6
> # Parent  73bee569f39d229412809a45c8b21fc809c5d996
> # EXP-Topic pwd
> tests: use `pwd` instead of $PWD
> 
> Before, check-code gave the following warning:
> 
> tests/test-rhg.t:13:
>  >   $ rm -rf $PWD
>  warning: don't use $PWD, use `pwd`
> 
> diff --git a/tests/test-rhg.t b/tests/test-rhg.t
> --- a/tests/test-rhg.t
> +++ b/tests/test-rhg.t
> @@ -10,7 +10,7 @@
>    $ rhg root > /dev/full
>    abort: No space left on device (os error 28)
>    [255]
> -  $ rm -rf $PWD
> +  $ rm -rf `pwd`
>    $ rhg root
>    abort: error getting current working directory: $ENOENT$
>    [255]
> 
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Yuya Nishihara - July 6, 2020, 11:29 a.m.
On Sat, 04 Jul 2020 16:26:04 +0200, Manuel Jacob wrote:
> More tests are broken:
> 
> * 
> https://buildbot.mercurial-scm.org/builders/hg%20tests/builds/2975/steps/run-tests.py%20%28python%202.7.10%29/logs/stdio
> * https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/82924
> 
> Since both are still draft, we could also temporarily prune afecc7f76f2d 
> and 3707f6e7e04e, which seem to be the cause of the failure.

I've rebased the other patch onto afecc7f76f2d^.

Augie, can you rebase or prune afecc7f76f2d::?
Augie Fackler - July 7, 2020, 1:51 a.m.
> On Jul 6, 2020, at 7:29 AM, Yuya Nishihara <yuya@tcha.org> wrote:
> 
> On Sat, 04 Jul 2020 16:26:04 +0200, Manuel Jacob wrote:
>> More tests are broken:
>> 
>> * 
>> https://buildbot.mercurial-scm.org/builders/hg%20tests/builds/2975/steps/run-tests.py%20%28python%202.7.10%29/logs/stdio
>> * https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/82924
>> 
>> Since both are still draft, we could also temporarily prune afecc7f76f2d 
>> and 3707f6e7e04e, which seem to be the cause of the failure.
> 
> I've rebased the other patch onto afecc7f76f2d^.
> 
> Augie, can you rebase or prune afecc7f76f2d::?

Done.

Patch

diff --git a/tests/test-rhg.t b/tests/test-rhg.t
--- a/tests/test-rhg.t
+++ b/tests/test-rhg.t
@@ -10,7 +10,7 @@ 
   $ rhg root > /dev/full
   abort: No space left on device (os error 28)
   [255]
-  $ rm -rf $PWD
+  $ rm -rf `pwd`
   $ rhg root
   abort: error getting current working directory: $ENOENT$
   [255]