Skip to content

Commit 2a1dbd0

Browse files
authored
Merge pull request #12425 from rabbitmq/loic-fix-parallel-ct-exit-status
Fix the exit status when parallel-ct is used
2 parents 3540541 + 9645fb1 commit 2a1dbd0

File tree

4 files changed

+1011
-4
lines changed

4 files changed

+1011
-4
lines changed

deps/rabbit/Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,12 +239,22 @@ define ct_master.erl
239239
peer:call(Pid2, persistent_term, put, [rabbit_ct_tcp_port_base, 25000]),
240240
peer:call(Pid3, persistent_term, put, [rabbit_ct_tcp_port_base, 27000]),
241241
peer:call(Pid4, persistent_term, put, [rabbit_ct_tcp_port_base, 29000]),
242-
ct_master:run("$1"),
242+
ct_master_fork:run("$1"),
243+
Fail1 = peer:call(Pid1, cth_parallel_ct_detect_failure, has_failures, []),
244+
Fail2 = peer:call(Pid2, cth_parallel_ct_detect_failure, has_failures, []),
245+
Fail3 = peer:call(Pid3, cth_parallel_ct_detect_failure, has_failures, []),
246+
Fail4 = peer:call(Pid4, cth_parallel_ct_detect_failure, has_failures, []),
243247
peer:stop(Pid4),
244248
peer:stop(Pid3),
245249
peer:stop(Pid2),
246250
peer:stop(Pid1),
247-
halt()
251+
if
252+
Fail1 -> halt(1);
253+
Fail2 -> halt(2);
254+
Fail3 -> halt(3);
255+
Fail4 -> halt(4);
256+
true -> halt(0)
257+
end
248258
endef
249259

250260
PARALLEL_CT_SET_1_A = amqp_client unit_cluster_formation_locking_mocks unit_cluster_formation_sort_nodes unit_collections unit_config_value_encryption unit_connection_tracking

0 commit comments

Comments
 (0)