Commit f257a24
committed
test_bootloader: Fix sporadic failure
This test is broken in multiple ways. Either:
1) Execution of diff races against the named temporary file being
removed when the context manager is left, resulting in no output from
diff and the test "passes" (diff exits with status 2).
2) diff generates output and the call to assertRegexpMatches() fails
because it was renamed in Python 3.2.
Fix this by ensuring diff finishes before leaving the context manager,
asserting the exact diff expected, and checking the return code.
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>1 parent c8e4a37 commit f257a24
1 file changed
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 20 | | |
25 | | - | |
26 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
27 | 34 | | |
28 | 35 | | |
29 | 36 | | |
| |||
0 commit comments