Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-07

Running Unit tests for all projects

12 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marcos Douglas B. Santos

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170718/513103f9/attachment.html>

Reply by email

Graeme Geldenhuys
to Marcos Douglas B. Santos
Marcos Douglas B. Santos 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

Reply by email

Marcos Douglas B. Santos
to Graeme Geldenhuys
Graeme Geldenhuys wrote 5 lines
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.

Show quoted text 8 lines
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

Reply by email

Martin Schreiber
to Marcos Douglas B. Santos
Marcos Douglas B. Santos wrote 12 lines
On Tue, Jul 18, 2017 at 11:11 AM, Graeme Geldenhuys via Lazarus 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

Reply by email

Marcos Douglas B. Santos
to Mattias Gaertner: On Wed, 19 Jul 2017 09:43:02 -0300 "Marcos Douglas B. Santos via Lazarus" You can either…
Mattias Gaertner wrote 10 lines
On Wed, 19 Jul 2017 09:43:02 -0300 "Marcos Douglas B. Santos via Lazarus" 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

Reply by email

Mattias Gaertner
to Marcos Douglas B. Santos

On Wed, 19 Jul 2017 10:23:16 -0300
"Marcos Douglas B. Santos via Lazarus"

[...] 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

Reply by email

Paul Breneman
to Marcos Douglas B. Santos: On Wed, Jul 19, 2017 at 9:53 AM, Martin Schreiber via Lazarus It looks like it's about…
Marcos Douglas B. Santos wrote 15 lines
On Wed, Jul 19, 2017 at 9:53 AM, Martin Schreiber via Lazarus 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.

Reply by email

Martin Schreiber
to Marcos Douglas B. Santos: On Wed, Jul 19, 2017 at 9:53 AM, Martin Schreiber via Lazarus It looks like it's about…
Marcos Douglas B. Santos wrote 13 lines
On Wed, Jul 19, 2017 at 9:53 AM, Martin Schreiber via Lazarus 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

Reply by email

Marcos Douglas B. Santos
to Martin Schreiber
Martin Schreiber wrote 9 lines
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

Reply by email

pdigonzelli-softs
to Martin Schreiber: Why do you think so? The screenshot shows the unittests of MSElang. Another screenshot…

unsubscribe

Martin Schreiber wrote 18 lines
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 > > 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: Cel: 543815982714 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170719/ad752a4c/attachment.html>

Reply by email