From patchwork Wed Nov 1 21:27:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D1282: test-dispatch: stabilize the test From: phabricator X-Patchwork-Id: 25322 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Wed, 1 Nov 2017 21:27:25 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHG0ccb43d4cf01: test-dispatch: stabilize the test (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1282?vs=3196&id=3197 REVISION DETAIL https://phab.mercurial-scm.org/D1282 AFFECTED FILES tests/test-dispatch.t CHANGE DETAILS To: quark, #hg-reviewers, durin42 Cc: mercurial-devel diff --git a/tests/test-dispatch.t b/tests/test-dispatch.t --- a/tests/test-dispatch.t +++ b/tests/test-dispatch.t @@ -68,9 +68,13 @@ $ mkdir $TESTTMP/repo1 $ cd $TESTTMP/repo1 $ rm -rf $TESTTMP/repo1 - $ HGDEMANDIMPORT=disable hg version -q - abort: error getting current working directory: * (glob) (no-chg !) - chg: abort: failed to getcwd (errno = *) (glob) (chg !) - [255] + +The output could be one of the following and something else: + chg: abort: failed to getcwd (errno = *) (glob) + abort: error getting current working directory: * (glob) + sh: 0: getcwd() failed: No such file or directory +Since the exact behavior depends on the shell, only check it returns non-zero. + $ HGDEMANDIMPORT=disable hg version -q 2>/dev/null || false + [1] #endif