[fpc-devel] Running individual tests

Sven Barth pascaldragon at googlemail.com
Thu Feb 13 00:05:11 CET 2020


J. Gareth Moreton <gareth at moreton-family.com> schrieb am Mi., 12. Feb.
2020, 23:48:

> 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

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20200213/34ee2e33/attachment.html>


More information about the fpc-devel mailing list