Creating a task that runs a limited amount of tests

Say I tag some of my tests
@tag mustexec: true

I can then run mix test --only mustexec to only run those tests

I want to make it a little easier by creating a mix task that does that. From what I understand, a task should implement this function:

def run(args) do

What should I put in there?

You could take a look in the source of Mix.Tasks.Test to get some inspiration.

If you just need mix mustexec to execute mix test --only mustexec you can write an alias.