]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - python3/patches/00153-fix-test_gdb-noise.patch
python3: New package.
[people/ms/ipfire-3.x.git] / python3 / patches / 00153-fix-test_gdb-noise.patch
1 diff -up cpython-59223da36dec/Lib/test/test_gdb.py.fix-test_gdb-noise cpython-59223da36dec/Lib/test/test_gdb.py
2 --- cpython-59223da36dec/Lib/test/test_gdb.py.fix-test_gdb-noise 2012-08-07 06:10:57.000000000 -0400
3 +++ cpython-59223da36dec/Lib/test/test_gdb.py 2012-08-07 17:13:46.592343113 -0400
4 @@ -115,6 +115,15 @@ class DebuggerTests(unittest.TestCase):
5 # Generate a list of commands in gdb's language:
6 commands = ['set breakpoint pending yes',
7 'break %s' % breakpoint,
8 +
9 + # GDB as of Fedora 17 onwards can distinguish between the
10 + # value of a variable at entry vs current value:
11 + # http://sourceware.org/gdb/onlinedocs/gdb/Variables.html
12 + # which leads to the selftests failing with errors like this:
13 + # AssertionError: 'v@entry=()' != '()'
14 + # Disable this:
15 + 'set print entry-values no',
16 +
17 'run']
18 if cmds_after_breakpoint:
19 commands += cmds_after_breakpoint
20 @@ -154,8 +163,16 @@ class DebuggerTests(unittest.TestCase):
21 err = err.replace("warning: Cannot initialize thread debugging"
22 " library: Debugger service failed\n",
23 '')
24 -
25 + err = '\n'.join([line
26 + for line in err.splitlines()
27 + if not line.startswith('warning: Unable to open')
28 + if not line.startswith('Missing separate debuginfo for')
29 + if not line.startswith('Try: yum --disablerepo=')
30 + # In case 'set print entry-values no' failed:
31 + if not line.startswith('Undefined set print command')])
32 +
33 # Ensure no unexpected error messages:
34 + self.maxDiff = None
35 self.assertEqual(err, '')
36 return out
37