tests: add req on bash for test-transaction-rollback-on-sigpipe (issue6429)
authorAugie Fackler <augie@google.com>
Tue, 18 May 2021 13:24:41 -0400
changeset 47301 97f04eaafa65
parent 47300 8b2d09c7e5cd
child 47302 338623a2ebf2
tests: add req on bash for test-transaction-rollback-on-sigpipe (issue6429) I think we could work around this by rewriting the helper scripts in Python, but I don't want to deal with that now and this should prevent failures due to a lack of bash. Differential Revision: https://phab.mercurial-scm.org/D10732
tests/hghave.py
tests/test-transaction-rollback-on-sigpipe.t
--- a/tests/hghave.py	Mon May 17 15:24:46 2021 +0200
+++ b/tests/hghave.py	Tue May 18 13:24:41 2021 -0400
@@ -1129,3 +1129,8 @@
         return True
     except ImportError:
         return False
+
+
+@check("bash", "bash shell")
+def has_bash():
+    return matchoutput("bash -c 'echo hi'", b'^hi$')
--- a/tests/test-transaction-rollback-on-sigpipe.t	Mon May 17 15:24:46 2021 +0200
+++ b/tests/test-transaction-rollback-on-sigpipe.t	Tue May 18 13:24:41 2021 -0400
@@ -1,3 +1,4 @@
+#require bash
 Test that, when an hg push is interrupted and the remote side recieves SIGPIPE,
 the remote hg is able to successfully roll back the transaction.