[erlang-questions] common_test usability enhancement

Darach Ennis <>
Thu Jan 24 03:24:37 CET 2013


Hi Loïc,

I've been using ct a lot recently and would like to be able to see the same behaviour.

Removing the time stamp from latest results would save a lot of navigation & reloads.

Another issue is configuring 'total coverage' reports & merging ct with eunit reports. The incantations are not obvious...

If the default URLs represented 'latest' and the timestamped URLs were preserved, wouldn't that be ideal?

Regards,

Darach.

On 24 Jan 2013, at 02:21, Loïc Hoguin <> wrote:

> Hello,
> 
> I've been wondering how to have a common url for repeated ct tests. For example if I'm fixing a few things I'd like to just refresh the browser to see how far I got. Problem is timestamps prevent that.
> 
> Instead of this URL:
> 
> file://localhost/home/essen/extend/cowboy/logs/ct_run.ct@localhost.2013-01-24_03.10.49/extend.cowboy.eunit_SUITE.logs/run.2013-01-24_03.10.50/eunit_suite.eunit.html
> 
> I want something like this:
> 
> file://localhost/home/essen/extend/cowboy/logs/last.ct@localhost/extend.cowboy.eunit_SUITE.logs/run/eunit_suite.eunit.html
> 
> I started fixing the first part with a naive enough patch as follow:
> 
> diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl
> index 0b7a8bb..95e85c5 100644
> --- a/lib/common_test/src/ct_logs.erl
> +++ b/lib/common_test/src/ct_logs.erl
> @@ -536,6 +536,11 @@ logger(Parent, Mode, Verbosity) ->
>     AbsDir = ?abs(Dir),
>     put(ct_run_dir, AbsDir),
> 
> +    %% create a symlink always pointing to the last run
> +    New = "last-" ++ atom_to_list(node()),
> +    _ = file:delete(New),
> +    _ = file:make_symlink(Dir, New),
> +
>     case basic_html() of
>    true ->
>        put(basic_html, true);
> 
> I think it could be accepted into OTP easily, but this only fixes half the problem. The other part is harder.
> 
> I'd very much like to receive guidance on how to achieve my goal and have it be good enough to be included in OTP. Perhaps it'd require an option to disable the timestamp in the second part of the URL? I don't know. Any pointers would help.
> 
> Thanks.
> 
> -- 
> Loïc Hoguin
> Erlang Cowboy
> Nine Nines
> http://ninenines.eu
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list