Sign in Join

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

Mailing lists / fpc-devel / 2020-02

Running individual tests

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

J. Gareth Moreton

Hi everyone,

This might be a bit of a silly question, but is there a way to run individual tests from the test suite using the "make" command? I ask because Florian has pointed out some failures on one of my patches and I rather run those tests individually than wait 4 hours running the lot and comparing the log to the trunk.

Gareth aka. Kit

Reply by email

Sven Barth
to J. Gareth Moreton

J. Gareth Moreton schrieb am Mi., 12. Feb.
2020, 23:48:

Show quoted text 8 lines
Hi everyone, This might be a bit of a silly question, but is there a way to run individual tests from the test suite using the "make" command? I ask because Florian has pointed out some failures on one of my patches and I rather run those tests individually than wait 4 hours running the lot and comparing the log to the trunk.

As the tests are just simple programs (or units or libraries) I usually just compile and run those tests manually (check for any compile time options that are set inside the test with %OPT at the top). Some tests might need that you add additional unit paths.

Some examples (working directory is the source top level directory, "testoutput" is just my "catch all" output directory):

.\compiler\x86_64\pp.exe -n -Furtl\units\x86_64-win64 -viwn - FEtestoutput .\tests\test\tthlp1.pp

Or if some further units are required:

.\compiler\x86_64\pp.exe -n -Furtl\units\x86_64-win64 -viwn - FEtestoutput -Fupackages\rtl-objpas\units\x86_64-win64 .\tests\test\tthlp1.pp

Then run the test as .\testoutput\tthlp1.exe and maybe check the exit code.

Of course you can use the compile commands directly as start parameters inside Lazarus as well (without the compiler binary).

Regards,
Sven

Reply by email