Skip to content

Commit

Permalink
common_test: cth surefire skip group fix
Browse files Browse the repository at this point in the history
  • Loading branch information
u3s committed Nov 19, 2024
1 parent 0418c10 commit 8f342c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/common_test/src/cth_surefire.erl
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ get_line_from_result(_, _) ->
on_tc_skip(Suite,TC,Result,Proxy) when is_pid(Proxy) ->
_ = gen_server:call(Proxy,{?FUNCTION_NAME, [Suite,TC,Result]}),
Proxy;
on_tc_skip(Suite,{ConfigFunc = end_per_group,_GrName}, Res, State) ->
on_tc_skip(Suite,ConfigFunc, Res,
State#state{curr_group = tl(State#state.curr_group)});
on_tc_skip(Suite,{ConfigFunc,_GrName}, Res, State) ->
on_tc_skip(Suite,ConfigFunc, Res, State);
on_tc_skip(Suite,Tc, Res, State0) ->
Expand Down
2 changes: 2 additions & 0 deletions lib/common_test/test/ct_surefire_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ skip_suite_in_spec(Config) ->
%%%-----------------------------------------------------------------
run(Case,CTHs,Report,Config) ->
run(Case,CTHs,Report,Config,[]).

run(Case,CTHs,Report,Config,ExtraOpts) ->
DataDir = ?config(data_dir, Config),
Suite = filename:join(DataDir, "surefire_SUITE"),
run(Case,CTHs,Report,Config,ExtraOpts,Suite).

run(Case,CTHs,Report,Config,ExtraOpts,Suite) ->
Test = [{suite,Suite},{ct_hooks,CTHs},{label,Case}|ExtraOpts],
do_run(Case, Report, Test, Config).
Expand Down

0 comments on commit 8f342c9

Please sign in to comment.