Closed blamario closed 1 year ago
We could make sydtest-discover
smart enough to ignore a file if its first line is such an ignore pragma! PR welcome.
Another would be to mark ignorable test modules with
{-# SydTest ignore #-}
or something.
This wouldn't work for our situation, because we want to conditionally ignore a module based on whether it is GHC 8.10 or 9.2.
Cabal-aware discovery is ideal, but I don't know what that will take (if it is possible at all) for a GHC plugin.
It sounds like maybe not using sydtest-discover
is the best option for you. I'd prefer to keep sydtest-discover
very stupid.
You can have sydtest-discover
ignore files by not naming them with a Spec
suffix.
We have a hack around this problem in Plutarch, but it's not complete.
The trouble is that some test modules are supposed to be run only in certain environments. Cabal has conditional sections for this purpose, but
sydtest-discover
doesn't use Cabal API to discover the modules. Changing that would be one way to fix the issue. Another would be to mark ignorable test modules with{-# SydTest ignore #-}
or something.