Patchwork [STABLE] tests: fix test-patch.t on pickier /bin/sh implementations

login
register
mail settings
Submitter Augie Fackler
Date June 12, 2018, 10:20 p.m.
Message ID <0c4019611293212012b5.1528842039@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/32097/
State Accepted
Headers show

Comments

Augie Fackler - June 12, 2018, 10:20 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1526871918 14400
#      Sun May 20 23:05:18 2018 -0400
# Branch stable
# Node ID 0c4019611293212012b598949832dcb2de6b96b2
# Parent  3c84493556db3bffcff2fa2f24bb6738dde9fc58
tests: fix test-patch.t on pickier /bin/sh implementations

This is a graft of 0b39edeff033 and f44306940c94 from default because
I'm tired of seeing the FreeBSD build be red on stable. See those
revisions for details on what's going on here.
Yuya Nishihara - June 13, 2018, 12:04 p.m.
On Tue, 12 Jun 2018 18:20:39 -0400, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1526871918 14400
> #      Sun May 20 23:05:18 2018 -0400
> # Branch stable
> # Node ID 0c4019611293212012b598949832dcb2de6b96b2
> # Parent  3c84493556db3bffcff2fa2f24bb6738dde9fc58
> tests: fix test-patch.t on pickier /bin/sh implementations

Queued for stable, thanks.

Patch

diff --git a/tests/test-patch.t b/tests/test-patch.t
--- a/tests/test-patch.t
+++ b/tests/test-patch.t
@@ -92,7 +92,12 @@  Clone and apply patch:
 
 Error exit (issue4746)
 
-  $ hg import ../c/p --config ui.patch='sh -c "exit 1"'
+  $ cat >> exit1.py <<EOF
+  > import sys
+  > sys.exit(1)
+  > EOF
+
+  $ hg import ../c/p --config ui.patch="\"$PYTHON\" \"`pwd`/exit1.py\""
   applying ../c/p
   abort: patch command failed: exited with status 1
   [255]