Testing an XS module using Dist :: Zilla

I am working on a Perl module that has a lot of XS code, and also uses Dist::Zilla to control the packaging. What is the best way to test effectively? I know about dzil test , but it is rather slow because it runs a complete build / compile / test cycle every time it is called.

It would be nice to update the parts that need to be updated after the last test, and also be able to run only certain test scripts t/*.t , and not all of them. Does anyone have a solution that they like?

+4
source share
3 answers

In the past, I just took the dzil-generated Build.PL/Makefile.PL file and put it in the original repository as “Makefile_dev.PL” (or “Build_dev.PL”), adding it to MANIFEST.SKIP (or the equivalent based on jilah, generated equivalent) and used it during development.

+2
source

For my XS modules, I use MakeMaker :: Custom or ModuleBuild :: Custom (both of me). If you configure the settings correctly, you can run Makefile.PL or Build.PL directly in your repo without using dzil at all. To run certain tests, you simply create dist and use prove -b testname .

Some examples using ModuleBuild :: Custom: Media-LibMTP-API , Win32-IPC .

An example of using MakeMaker :: Custom: Win32-Setupsup .

+1
source

I know that I am still sitting like an old school, but for these reasons that I do not use Dist :: Zilla: when it works fine, when it does not, it can be very difficult to do it does what you want .

I assume this means that my answer is: when it gets too heavy, just go to one of the main tools that the jil generates, i.e. EUMM or MB.

+1
source

Source: https://habr.com/ru/post/1479800/


All Articles