diff options
Diffstat (limited to 'src/arm/test_gnunet_arm.py.in')
-rw-r--r-- | src/arm/test_gnunet_arm.py.in | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/arm/test_gnunet_arm.py.in b/src/arm/test_gnunet_arm.py.in index e657d4a3f..2b30b6b97 100644 --- a/src/arm/test_gnunet_arm.py.in +++ b/src/arm/test_gnunet_arm.py.in | |||
@@ -53,7 +53,7 @@ def fail(result): | |||
53 | sys.exit(1) | 53 | sys.exit(1) |
54 | 54 | ||
55 | 55 | ||
56 | def end_arm_failer(command, rc, stdo, stde, normal): | 56 | def end_arm_failure(command, rc, stdo, stde, normal): |
57 | if normal: | 57 | if normal: |
58 | if rc != 0: | 58 | if rc != 0: |
59 | fail( | 59 | fail( |
@@ -69,7 +69,7 @@ def end_arm_failer(command, rc, stdo, stde, normal): | |||
69 | ) | 69 | ) |
70 | 70 | ||
71 | 71 | ||
72 | def print_only_failer(command, rc, stdo, stde, normal): | 72 | def print_only_failure(command, rc, stdo, stde, normal): |
73 | if normal: | 73 | if normal: |
74 | if rc != 0: | 74 | if rc != 0: |
75 | print( | 75 | print( |
@@ -87,12 +87,12 @@ def print_only_failer(command, rc, stdo, stde, normal): | |||
87 | sys.exit(1) | 87 | sys.exit(1) |
88 | 88 | ||
89 | 89 | ||
90 | def r_something(to_run, extra_args, failer=None, normal=True, **kw): | 90 | def r_something(to_run, extra_args, failure=None, normal=True, **kw): |
91 | rc, stdo, stde = sub_run( | 91 | rc, stdo, stde = sub_run( |
92 | to_run + extra_args, nofail=True, want_stde=True, **kw | 92 | to_run + extra_args, nofail=True, want_stde=True, **kw |
93 | ) | 93 | ) |
94 | if failer is not None: | 94 | if failure is not None: |
95 | failer(to_run + extra_args, rc, stdo, stde, normal) | 95 | failure(to_run + extra_args, rc, stdo, stde, normal) |
96 | return (rc, stdo, stde) | 96 | return (rc, stdo, stde) |
97 | 97 | ||
98 | 98 | ||
@@ -103,26 +103,26 @@ def r_arm(extra_args, **kw): | |||
103 | cleanup() | 103 | cleanup() |
104 | 104 | ||
105 | print("TEST: Bad argument checking...", end='') | 105 | print("TEST: Bad argument checking...", end='') |
106 | r_arm(['-x'], normal=False, failer=print_only_failer) | 106 | r_arm(['-x'], normal=False, failure=print_only_failure) |
107 | print("PASS") | 107 | print("PASS") |
108 | 108 | ||
109 | print("TEST: Start ARM...", end='') | 109 | print("TEST: Start ARM...", end='') |
110 | r_arm(['-s'], failer=print_only_failer) | 110 | r_arm(['-s'], failure=print_only_failure) |
111 | time.sleep(1) | 111 | time.sleep(1) |
112 | print("PASS") | 112 | print("PASS") |
113 | 113 | ||
114 | print("TEST: Start another service...", end='') | 114 | print("TEST: Start another service...", end='') |
115 | r_arm(['-i', 'resolver'], failer=end_arm_failer) | 115 | r_arm(['-i', 'resolver'], failure=end_arm_failure) |
116 | time.sleep(1) | 116 | time.sleep(1) |
117 | print("PASS") | 117 | print("PASS") |
118 | 118 | ||
119 | print("TEST: Stop a service...", end='') | 119 | print("TEST: Stop a service...", end='') |
120 | r_arm(['-k', 'resolver'], failer=end_arm_failer) | 120 | r_arm(['-k', 'resolver'], failure=end_arm_failure) |
121 | time.sleep(1) | 121 | time.sleep(1) |
122 | print("PASS") | 122 | print("PASS") |
123 | 123 | ||
124 | print("TEST: Stop ARM...", end='') | 124 | print("TEST: Stop ARM...", end='') |
125 | r_arm(['-e'], failer=print_only_failer) | 125 | r_arm(['-e'], failure=print_only_failure) |
126 | time.sleep(1) | 126 | time.sleep(1) |
127 | print("PASS") | 127 | print("PASS") |
128 | 128 | ||