diff options
Diffstat (limited to 'src/arm')
-rw-r--r-- | src/arm/test_gnunet_arm.py.in | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/arm/test_gnunet_arm.py.in b/src/arm/test_gnunet_arm.py.in index 1d067b5d9..9605c4eae 100644 --- a/src/arm/test_gnunet_arm.py.in +++ b/src/arm/test_gnunet_arm.py.in | |||
@@ -56,25 +56,41 @@ def fail(result): | |||
56 | def end_arm_failer(command, rc, stdo, stde, normal): | 56 | def end_arm_failer(command, rc, stdo, stde, normal): |
57 | if normal: | 57 | if normal: |
58 | if rc != 0: | 58 | if rc != 0: |
59 | fail("FAIL: error running {}\nCommand output was:\n{}\n{}".format(command, stdo, stde)) | 59 | fail( |
60 | "FAIL: error running {}\nCommand output was:\n{}\n{}".format( | ||
61 | command, stdo, stde | ||
62 | ) | ||
63 | ) | ||
60 | else: | 64 | else: |
61 | if rc == 0: | 65 | if rc == 0: |
62 | fail("FAIL: expected error while running {}\nCommand output was:\n{}\n{}".format(command, stdo, stde)) | 66 | fail( |
67 | "FAIL: expected error while running {}\nCommand output was:\n{}\n{}" | ||
68 | .format(command, stdo, stde) | ||
69 | ) | ||
63 | 70 | ||
64 | 71 | ||
65 | def print_only_failer(command, rc, stdo, stde, normal): | 72 | def print_only_failer(command, rc, stdo, stde, normal): |
66 | if normal: | 73 | if normal: |
67 | if rc != 0: | 74 | if rc != 0: |
68 | print("FAIL: error running {}\nCommand output was:\n{}\n{}".format(command, stdo, stde)) | 75 | print( |
76 | "FAIL: error running {}\nCommand output was:\n{}\n{}".format( | ||
77 | command, stdo, stde | ||
78 | ) | ||
79 | ) | ||
69 | sys.exit(1) | 80 | sys.exit(1) |
70 | else: | 81 | else: |
71 | if rc == 0: | 82 | if rc == 0: |
72 | print("FAIL: expected error while running {}\nCommand output was:\n{}\n{}".format(command, stdo, stde)) | 83 | print( |
84 | "FAIL: expected error while running {}\nCommand output was:\n{}\n{}" | ||
85 | .format(command, stdo, stde) | ||
86 | ) | ||
73 | sys.exit(1) | 87 | sys.exit(1) |
74 | 88 | ||
75 | 89 | ||
76 | def r_something(to_run, extra_args, failer=None, normal=True, **kw): | 90 | def r_something(to_run, extra_args, failer=None, normal=True, **kw): |
77 | rc, stdo, stde = sub_run(to_run + extra_args, nofail=True, want_stde=True, **kw) | 91 | rc, stdo, stde = sub_run( |
92 | to_run + extra_args, nofail=True, want_stde=True, **kw | ||
93 | ) | ||
78 | if failer is not None: | 94 | if failer is not None: |
79 | failer(to_run + extra_args, rc, stdo, stde, normal) | 95 | failer(to_run + extra_args, rc, stdo, stde, normal) |
80 | return (rc, stdo, stde) | 96 | return (rc, stdo, stde) |