Common Test logs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Common Test logs

Loïc Hoguin-3
Hello,

I am looking for a Common Test option that allows me to restrict the
number of logs Common Test keeps around.

In practice I don't always care about the test runs I did last month, I
only want the 10 or so most recents. I would like to configure Common
Test so that it deletes older runs automatically. Today I eventually "rm
-rf logs" when it gets too big, but it would be good if I didn't have to
think about it.

Is there such an option (perhaps undocumented) and if not, can it be
considered adding it? This way when ct_run starts it can cleanup
automatically.

Thanks,

--
Loïc Hoguin
https://ninenines.eu
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Common Test logs

Leo Liu-2
On 2017-01-30 18:30 +0100, Loïc Hoguin wrote:
> In practice I don't always care about the test runs I did last month,
> I only want the 10 or so most recents. I would like to configure
> Common Test so that it deletes older runs automatically. Today I
> eventually "rm -rf logs" when it gets too big, but it would be good if
> I didn't have to think about it.

I have been wanting the same thing a few times. Thanks for putting this
forward.

Leo

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Common Test logs

Éric Pailleau
In reply to this post by Loïc Hoguin-3
+1

I currently extends the erlang.mk clean target :

clean::
        -@find logs -type d -mtime +15 -delete

but it is only a workaround.
The timestamp part of directory name is hardcoded in ct_logs.erl .

regards

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Common Test logs

Peter Andersson-4
In reply to this post by Loïc Hoguin-3

Hi Loïc,

This seems lika quite a useful feature, and a reasonable one to
implement. I'll add a ticket for it!

Best regards,
Peter

Ericsson AB, Erlang/OTP


On 01/30/2017 06:30 PM, Loïc Hoguin wrote:

> Hello,
>
> I am looking for a Common Test option that allows me to restrict the
> number of logs Common Test keeps around.
>
> In practice I don't always care about the test runs I did last month,
> I only want the 10 or so most recents. I would like to configure
> Common Test so that it deletes older runs automatically. Today I
> eventually "rm -rf logs" when it gets too big, but it would be good if
> I didn't have to think about it.
>
> Is there such an option (perhaps undocumented) and if not, can it be
> considered adding it? This way when ct_run starts it can cleanup
> automatically.
>
> Thanks,
>


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Common Test logs

Siri Hansen
Hi, I've started looking at this and I wonder how the limit should best be specified. Should it be

* keep N log directories
* keep N log directories per 'test name'
* keep all log directories with timestamps newer than a given datetime
* keep all log directories with timestamps newer than a number of days, hours, minutes, seconds back in time?

Any thoughts or wishes?

Regards
/siri

2017-02-02 7:52 GMT+01:00 Peter Andersson E <[hidden email]>:

Hi Loïc,

This seems lika quite a useful feature, and a reasonable one to implement. I'll add a ticket for it!

Best regards,
Peter

Ericsson AB, Erlang/OTP


On 01/30/2017 06:30 PM, Loïc Hoguin wrote:
Hello,

I am looking for a Common Test option that allows me to restrict the number of logs Common Test keeps around.

In practice I don't always care about the test runs I did last month, I only want the 10 or so most recents. I would like to configure Common Test so that it deletes older runs automatically. Today I eventually "rm -rf logs" when it gets too big, but it would be good if I didn't have to think about it.

Is there such an option (perhaps undocumented) and if not, can it be considered adding it? This way when ct_run starts it can cleanup automatically.

Thanks,



_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Common Test logs

Loïc Hoguin-3
Thanks for looking into this!

Personally, keep N log directories would be enough. It would be useful
on my development machine where I run tests a lot and rarely need to
look back at much more than the past 2 or 3 runs.

But for my purposes, the 4th option also works (for example if I could
say '-keep_logs_only_from_the_past 2days' or something).

For CI I simply keep everything, but organize it differently (
logs/$PROJECT/$RUNID/$OS/ and then Common Test has one test run per
supported Erlang version, eg
https://builds.ninenines.eu/logs/cowboy/125/archlinux/ ) so I would not
use it there.

Cheers,

On 03/10/2017 03:41 PM, Siri Hansen wrote:

> Hi, I've started looking at this and I wonder how the limit should best
> be specified. Should it be
>
> * keep N log directories
> * keep N log directories per 'test name'
> * keep all log directories with timestamps newer than a given datetime
> * keep all log directories with timestamps newer than a number of days,
> hours, minutes, seconds back in time?
>
> Any thoughts or wishes?
>
> Regards
> /siri
>
> 2017-02-02 7:52 GMT+01:00 Peter Andersson E <[hidden email]
> <mailto:[hidden email]>>:
>
>
>     Hi Loïc,
>
>     This seems lika quite a useful feature, and a reasonable one to
>     implement. I'll add a ticket for it!
>
>     Best regards,
>     Peter
>
>     Ericsson AB, Erlang/OTP
>
>
>     On 01/30/2017 06:30 PM, Loïc Hoguin wrote:
>
>         Hello,
>
>         I am looking for a Common Test option that allows me to restrict
>         the number of logs Common Test keeps around.
>
>         In practice I don't always care about the test runs I did last
>         month, I only want the 10 or so most recents. I would like to
>         configure Common Test so that it deletes older runs
>         automatically. Today I eventually "rm -rf logs" when it gets too
>         big, but it would be good if I didn't have to think about it.
>
>         Is there such an option (perhaps undocumented) and if not, can
>         it be considered adding it? This way when ct_run starts it can
>         cleanup automatically.
>
>         Thanks,
>
>
>
>     _______________________________________________
>     erlang-questions mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://erlang.org/mailman/listinfo/erlang-questions
>     <http://erlang.org/mailman/listinfo/erlang-questions>
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
>

--
Loïc Hoguin
https://ninenines.eu
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Common Test logs

Max Lapshin-2
The most annoying thing in CT logs for me is that when I run:

ct_run -logdir logs/ -dir apps/dvr/test -suite dvr_SUITE -case h264_recording 


it creates new row in index.html, not updating existing row for  dvr app.


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions