Merge lp:~vila/bzr/1622039-diff-binaries into lp:bzr

Proposed by Vincent Ladeuil
Status: Merged
Merged at revision: 6620
Proposed branch: lp:~vila/bzr/1622039-diff-binaries
Merge into: lp:bzr
Diff against target: 36 lines (+4/-7)
2 files modified
bzrlib/tests/test_diff.py (+1/-3)
doc/en/release-notes/bzr-2.8.txt (+3/-4)
To merge this branch: bzr merge lp:~vila/bzr/1622039-diff-binaries
Reviewer Review Type Date Requested Status
bzr-core Pending
Review via email: mp+314922@code.launchpad.net

Commit message

Fix test failure for recent versions of diff.

Description of the change

This fixes bug #1622039 and needs special care to land on lp:bzr (the new CI now runs on xenial where this fails among other things).

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/tests/test_diff.py'
2--- bzrlib/tests/test_diff.py 2016-02-01 18:06:32 +0000
3+++ bzrlib/tests/test_diff.py 2017-01-17 15:16:25 +0000
4@@ -1,4 +1,4 @@
5-# Copyright (C) 2005-2012, 2014, 2016 Canonical Ltd
6+# Copyright (C) 2005-2012, 2014, 2016, 2017 Canonical Ltd
7 #
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10@@ -313,8 +313,6 @@
11 pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE,
12 stdin=subprocess.PIPE)
13 out, err = pipe.communicate()
14- # Diff returns '2' on Binary files.
15- self.assertEqual(2, pipe.returncode)
16 # We should output whatever diff tells us, plus a trailing newline
17 self.assertEqual(out.splitlines(True) + ['\n'], lines)
18
19
20=== modified file 'doc/en/release-notes/bzr-2.8.txt'
21--- doc/en/release-notes/bzr-2.8.txt 2016-04-03 16:32:31 +0000
22+++ doc/en/release-notes/bzr-2.8.txt 2017-01-17 15:16:25 +0000
23@@ -56,10 +56,9 @@
24 Testing
25 *******
26
27-.. Fixes and changes that are only relevant to bzr's test framework and
28- suite. This can include new facilities for writing tests, fixes to
29- spurious test failures and changes to the way things should be tested.
30-
31+* POSIX mandates diff to exit with status 1 (was 2 previously), bzr didn't
32+ rely on that feature but one of the tests did.
33+ (Vincent Ladeuil, #1622039)
34
35 ..
36 vim: tw=74 ft=rst ff=unix