|
29 | 29 | config_to_testcase_name/2,
|
30 | 30 | testcases/1,
|
31 | 31 | testcase_number/3,
|
| 32 | + testcase_absname/2, testcase_absname/3, |
32 | 33 | testcase_started/2, testcase_finished/2,
|
33 | 34 | exec/1, exec/2,
|
34 | 35 | make/3,
|
@@ -320,20 +321,34 @@ testcase_finished(Config, Testcase) ->
|
320 | 321 | Config.
|
321 | 322 |
|
322 | 323 | config_to_testcase_name(Config, Testcase) ->
|
| 324 | + testcase_absname(Config, Testcase). |
| 325 | + |
| 326 | +testcase_absname(Config, Testcase) -> |
| 327 | + testcase_absname(Config, Testcase, "/"). |
| 328 | + |
| 329 | +testcase_absname(Config, Testcase, Sep) -> |
323 | 330 | Name = rabbit_misc:format("~s", [Testcase]),
|
324 | 331 | case get_config(Config, tc_group_properties) of
|
325 | 332 | [] ->
|
326 | 333 | Name;
|
327 | 334 | Props ->
|
328 |
| - Name1 = rabbit_misc:format("~s/~s", |
329 |
| - [proplists:get_value(name, Props), Name]), |
330 |
| - config_to_testcase_name1(Name1, get_config(Config, tc_group_path)) |
| 335 | + Name1 = case Name of |
| 336 | + "" -> |
| 337 | + rabbit_misc:format("~s", |
| 338 | + [proplists:get_value(name, Props)]); |
| 339 | + _ -> |
| 340 | + rabbit_misc:format("~s~s~s", |
| 341 | + [proplists:get_value(name, Props), Sep, Name]) |
| 342 | + end, |
| 343 | + testcase_absname1(Name1, |
| 344 | + get_config(Config, tc_group_path), Sep) |
331 | 345 | end.
|
332 | 346 |
|
333 |
| -config_to_testcase_name1(Name, [Props | Rest]) -> |
334 |
| - Name1 = rabbit_misc:format("~s/~s", [proplists:get_value(name, Props), Name]), |
335 |
| - config_to_testcase_name1(Name1, Rest); |
336 |
| -config_to_testcase_name1(Name, []) -> |
| 347 | +testcase_absname1(Name, [Props | Rest], Sep) -> |
| 348 | + Name1 = rabbit_misc:format("~s~s~s", |
| 349 | + [proplists:get_value(name, Props), Sep, Name]), |
| 350 | + testcase_absname1(Name1, Rest, Sep); |
| 351 | +testcase_absname1(Name, [], _) -> |
337 | 352 | lists:flatten(Name).
|
338 | 353 |
|
339 | 354 | testcases(Testsuite) ->
|
|
0 commit comments