Parallel for serial_test

5 Jun 2022

Rust  serial_test 

Three years ago I wrote a little library called serial_test, and a year later I was very happy about it hitting 100,000 downloads. Fast forwards to today, and serial_test now has just shy of 4 million downloads (and at current speeds will probably hit it this week).

I've just released 0.7.0, which adds in support for a parallel attribute. At first glance, you may think "why do you need that, Rust tests are parallel by default", and that's entirely true. Except that a couple of the users had a case where they needed to have some tests that could happily run in parallel, but not at the same time as a serial marked test, and so needed a way to group them. After basically rewriting the entire internal locking mechanism, I've now made this possible, which is the main new feature of 0.7.0. 0.6.0 also added file-based locking for cases where multiple programs needed to run in serial (e.g. doc tests).

AFAIK this is now pretty much the entire functionality this library needs (well, maybe parallelised file locking) and so I'm intending on letting 0.7.0 bed in for a few months, and if nothing else comes up, then re-releasing that as a 1.0 version finally.

It's been an interesting ride working on this over the last few years, and I'm glad that my building out this little library has turned out to be of use to so many people.

Previously: Tuvix: Experimental hermetic build engine with Starlark Next: Like LinkedIn, but you get paid to read the recruiter emails