How to stop common test after specific time

Hi all,
I want to limit my common test runtime to specific time, if the test not finish on time, abort remaining test case.
I try running ct_run with flag “-duration HHMMSS -force_stop -skip_rest”, it’s work as my expected, the problem is if the test runtime is less than HHMMSS, the test will be repeated.
I added -repeat 1 flag to ct_run, but it got overwritten by -duration and not working as it should be. The test still repeated.
Anyone know why we can’t use -duration and -repeat at the same time for ct_run ?
Please give me any advise if there is any other way to do it.
Thanks in advance.

ct_suite behavior defines suite/0 callback which you can export and set a timetrap to the test suite.
Example:

-module(my_SUITE).
-export([suite/0]).
...
suite() ->
    [{timetrap, {minutes, 5}}].
...

When you read it carefully, you can see that this timetrap apply for each test case in suite, not the whole suite:

The timetrap time-out value defined by suite/0 is the value that is used for each test case in the suite . A timetrap value defined by group(GroupName) overrides one defined by suite() and is used for each test case in group GroupName , and any of its subgroups.