[Lazarus] Running Unit tests for all projects

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Lazarus] Running Unit tests for all projects

Free Pascal - Lazarus mailing list
Hi,

I have several projects that have FPCUnit tests.
I would like to know if there is a tool or a simple way to compile, run and catch the results for all projects.

Motivation: When I update FPC, 3rd libs/frameworks and Lazarus, some changes may broke my code, but not in all projects.
I would like to know which projects will be broke before update my stable versions for each compiler/lib/framework/ide.

Best regards,
Marcos Douglas

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Running Unit tests for all projects

Free Pascal - Lazarus mailing list
On 2017-07-18 14:42, Marcos Douglas B. Santos via Lazarus wrote:
> I would like to know if there is a tool or a simple way to compile, run and
> catch the results for all projects.

MSEide+MSEgui has such a tool in its MSEUniverse repository. It's a bit
cryptic to use (and no help as always), but once you get the gist of
things (Martin will surely lend a hand explaining things) it works
pretty well.

For my own projects I simply have batch scripts that execute
automatically via cron jobs every <x> amount of minutes or hours. The
produce XML output which gets processed by XSLT to generate a HTML page
which is automatically published. I also get a unit test summary email
sent to me. The process is very similar to what I do with the tiOPF
project. Take a look at the <tiopf2>/InstallScripts/freebsd/ directory
for an example. Oh yeah, I also use FPTest (a DUnit2 clone but FPC
specific) - instead of FPCUnit, but the latter should be able to do the
above (I think).

Regards,
   Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Running Unit tests for all projects

Free Pascal - Lazarus mailing list
On Tue, Jul 18, 2017 at 11:11 AM, Graeme Geldenhuys via Lazarus
<[hidden email]> wrote:
> On 2017-07-18 14:42, Marcos Douglas B. Santos via Lazarus wrote:
>
> MSEide+MSEgui has such a tool in its MSEUniverse repository. It's a bit
> cryptic to use (and no help as always), but once you get the gist of things
> (Martin will surely lend a hand explaining things) it works pretty well.

Thanks, I'll take a look.

> For my own projects I simply have batch scripts that execute automatically
> via cron jobs every <x> amount of minutes or hours. The produce XML output
> which gets processed by XSLT to generate a HTML page which is automatically
> published. I also get a unit test summary email sent to me. The process is
> very similar to what I do with the tiOPF project. Take a look at the
> <tiopf2>/InstallScripts/freebsd/ directory for an example. Oh yeah, I also
> use FPTest (a DUnit2 clone but FPC specific) - instead of FPCUnit, but the
> latter should be able to do the above (I think).

I saw. It's simple and works to tiOPF. I thought in a program to run
all tests in all my programs... that is it, I should to create a
program, register all project paths and run.

How do you get the compiler arguments for each project? Mabe using the
XML that Lazarus creates for each program?

Best regards,
Marcos Douglas
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Running Unit tests for all projects

Free Pascal - Lazarus mailing list
On Wednesday 19 July 2017 14:43:02 Marcos Douglas B. Santos via Lazarus wrote:

> On Tue, Jul 18, 2017 at 11:11 AM, Graeme Geldenhuys via Lazarus
>
> <[hidden email]> wrote:
> > On 2017-07-18 14:42, Marcos Douglas B. Santos via Lazarus wrote:
> >
> > MSEide+MSEgui has such a tool in its MSEUniverse repository. It's a bit
> > cryptic to use (and no help as always), but once you get the gist of
> > things (Martin will surely lend a hand explaining things) it works pretty
> > well.
>
> Thanks, I'll take a look.
>
Screenshot:
http://mseide-msegui.sourceforge.net/pics/mserun.png
Binaries:
https://sourceforge.net/projects/mseuniverse/files/mserun/
Source:
https://gitlab.com/mseide-msegui/mseuniverse/tree/master/tools/mserun

Martin
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Running Unit tests for all projects

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Wed, 19 Jul 2017 09:43:02 -0300
"Marcos Douglas B. Santos via Lazarus" <[hidden email]>
wrote:

>[...]
> How do you get the compiler arguments for each project? Mabe using the
> XML that Lazarus creates for each program?

You can either compile each project using lazbuild, or you can fetch
the options from the produced .compiled file (xml format).

Mattias
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Running Unit tests for all projects

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Wed, Jul 19, 2017 at 9:53 AM, Martin Schreiber via Lazarus
<[hidden email]> wrote:
>
> Screenshot:
> http://mseide-msegui.sourceforge.net/pics/mserun.png
> Binaries:
> https://sourceforge.net/projects/mseuniverse/files/mserun/
> Source:
> https://gitlab.com/mseide-msegui/mseuniverse/tree/master/tools/mserun

Hi Martin,
It looks like it's about Git, not about testing... right?

Marcos Douglas
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Running Unit tests for all projects

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Wed, Jul 19, 2017 at 9:59 AM, Mattias Gaertner via Lazarus
<[hidden email]> wrote:

> On Wed, 19 Jul 2017 09:43:02 -0300
> "Marcos Douglas B. Santos via Lazarus" <[hidden email]>
> wrote:
>
>>[...]
>> How do you get the compiler arguments for each project? Mabe using the
>> XML that Lazarus creates for each program?
>
> You can either compile each project using lazbuild, or you can fetch
> the options from the produced .compiled file (xml format).

OMG, that is it. I didn't think in that possibility.
Using lazbuild is better because it's smart enough to automatically
compiles required packages.

But I only use lazbuild to build the IDE. I've took a look in this
page http://wiki.lazarus.freepascal.org/lazbuild and I haven't found
an argument related to the project file (lpi or lpr).

Can I just do that?
(sorry, I'm not with my Lazarus environment now to test)
lazbuild [options] /path/myproject.lpi

Regards,
Marcos Douglas

PS.
This is really cool too "--build-mode" and will make my life easier. Thanks
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Running Unit tests for all projects

Free Pascal - Lazarus mailing list
On Wed, 19 Jul 2017 10:23:16 -0300
"Marcos Douglas B. Santos via Lazarus" <[hidden email]>
wrote:

>[...]
> But I only use lazbuild to build the IDE. I've took a look in this
> page http://wiki.lazarus.freepascal.org/lazbuild and I haven't found
> an argument related to the project file (lpi or lpr).

See Synopsis and Description.

 
> Can I just do that?
> (sorry, I'm not with my Lazarus environment now to test)
> lazbuild [options] /path/myproject.lpi

Yes.


> This is really cool too "--build-mode" and will make my life easier. Thanks

You are welcome.

Mattias
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Running Unit tests for all projects

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On 07/19/2017 09:08 AM, Marcos Douglas B. Santos via Lazarus wrote:

> On Wed, Jul 19, 2017 at 9:53 AM, Martin Schreiber via Lazarus
> <[hidden email]> wrote:
>>
>> Screenshot:
>> http://mseide-msegui.sourceforge.net/pics/mserun.png
>> Binaries:
>> https://sourceforge.net/projects/mseuniverse/files/mserun/
>> Source:
>> https://gitlab.com/mseide-msegui/mseuniverse/tree/master/tools/mserun
>
> Hi Martin,
> It looks like it's about Git, not about testing... right?
>
> Marcos Douglas
>

Sourceforge displays the latest file (msegit*) but if you look at the
mserun folders all of the mserun* files are there.
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Running Unit tests for all projects

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Wednesday 19 July 2017 15:08:55 Marcos Douglas B. Santos via Lazarus wrote:

> On Wed, Jul 19, 2017 at 9:53 AM, Martin Schreiber via Lazarus
>
> <[hidden email]> wrote:
> > Screenshot:
> > http://mseide-msegui.sourceforge.net/pics/mserun.png
> > Binaries:
> > https://sourceforge.net/projects/mseuniverse/files/mserun/
> > Source:
> > https://gitlab.com/mseide-msegui/mseuniverse/tree/master/tools/mserun
>
> Hi Martin,
> It looks like it's about Git, not about testing... right?
>
Why do you think so? The screenshot shows the unittests of MSElang.
Another screenshot which shows the run to create MSE* releases.
http://mseide-msegui.sourceforge.net/pics/mserun1.png

Martin
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Running Unit tests for all projects

Free Pascal - Lazarus mailing list
On Wed, Jul 19, 2017 at 10:32 AM, Martin Schreiber via Lazarus
<[hidden email]> wrote:
> On Wednesday 19 July 2017 15:08:55 Marcos Douglas B. Santos via Lazarus wrote:
>> On Wed, Jul 19, 2017 at 9:53 AM, Martin Schreiber via Lazarus
>>
>> Hi Martin,
>> It looks like it's about Git, not about testing... right?
>>
> Why do you think so? The screenshot shows the unittests of MSElang.
> Another screenshot which shows the run to create MSE* releases.
> http://mseide-msegui.sourceforge.net/pics/mserun1.png

Hmm... sorry, my fault.

Martin (and Paul Breneman), I will get the sources and take a look more closer.

Regards,
Marcos Douglas
--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Running Unit tests for all projects

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list

unsubscribe


El 19/07/17 a las 10:32, Martin Schreiber via Lazarus escribió:
On Wednesday 19 July 2017 15:08:55 Marcos Douglas B. Santos via Lazarus wrote:
On Wed, Jul 19, 2017 at 9:53 AM, Martin Schreiber via Lazarus

[hidden email] wrote:
Screenshot:
http://mseide-msegui.sourceforge.net/pics/mserun.png
Binaries:
https://sourceforge.net/projects/mseuniverse/files/mserun/
Source:
https://gitlab.com/mseide-msegui/mseuniverse/tree/master/tools/mserun
Hi Martin,
It looks like it's about Git, not about testing... right?

Why do you think so? The screenshot shows the unittests of MSElang.
Another screenshot which shows the run to create MSE* releases.
http://mseide-msegui.sourceforge.net/pics/mserun1.png

Martin

--
Ing. Pablo Digonzelli
Software Solutions
IP-Solutiones SRL
25 de Mayo 521
Email: [hidden email]
[hidden email]
Cel: 543815982714

--
_______________________________________________
Lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Loading...