From patchwork Thu Mar 10 18:13:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [V2] hook: filter out unstable output in tests From: Siddharth Agarwal X-Patchwork-Id: 13743 Message-Id: To: Date: Thu, 10 Mar 2016 10:13:46 -0800 # HG changeset patch # User Siddharth Agarwal # Date 1457633543 28800 # Thu Mar 10 10:12:23 2016 -0800 # Node ID bc4649e9bc48855a464414ee993fac96847c76b6 # Parent 1c658391b22fb4d98ccfb60c0e57315b55634117 # Available At http://42.netv6.net/sid0-wip/hg/ # hg pull http://42.netv6.net/sid0-wip/hg/ -r bc4649e9bc48 hook: filter out unstable output in tests This output is different between Python 2.6 and Python 2.7. It's also pretty irrelevant, so just filter it out. diff --git a/tests/test-hook.t b/tests/test-hook.t --- a/tests/test-hook.t +++ b/tests/test-hook.t @@ -530,13 +530,13 @@ test python hooks (run with --traceback for stack trace) [255] - $ hg pull ../a --traceback 2>&1 | egrep -v '^( +File| [_a-zA-Z*(])' +The second egrep is to filter out lines like ' ^', which are slightly +different between Python 2.6 and Python 2.7. + $ hg pull ../a --traceback 2>&1 | egrep -v '^( +File| [_a-zA-Z*(])' | egrep -v '^( )+(\^)?$' pulling from ../a searching for changes exception from first failed import attempt: Traceback (most recent call last): - - ^ SyntaxError: invalid syntax exception from second failed import attempt: Traceback (most recent call last):