You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is no simple way to write a tasty ingredient (ingredient transformer, to be precise), which affects order of test execution. Two common applications are:
Randomize order of tests to detect implicit dependencies between them.
Execute the longest running tests first, maximizing multithreaded CPU utilization.
I do not propose to implement such mechanisms in tasty itself, we should keep the core minimalistic. The missing part, which inhibits third parties from providing such functionality, is to provide a way to configure the order of [TestAction] in launchTestTree:
One could extend launchTestTree with an argument (OptionSet -> [TestAction] -> [TestAction]), but that would require us to expose data TestAction, which I deem undesirable:
--^ Some action, typically 'UnresolvedAction', 'ResolvedAction', or 'Action'.
, testPath::Path
--^ Path pointing to this action (a series of group names + a test name)
, testDeps::SeqDependency
--^ Dependencies introduced by AWK-like patterns
, testStatus::TVarStatus
--^ Status var that can be used to monitor test progress
}
Instead I suggest adding an argument of type (OptionSet -> (a -> Path) -> [a] -> [a]: "if you tell me how to extract Path from a, I'll be able to reorder [a]".
How does it sound?
The text was updated successfully, but these errors were encountered:
Currently there is no simple way to write a
tasty
ingredient (ingredient transformer, to be precise), which affects order of test execution. Two common applications are:I do not propose to implement such mechanisms in
tasty
itself, we should keep the core minimalistic. The missing part, which inhibits third parties from providing such functionality, is to provide a way to configure the order of[TestAction]
inlaunchTestTree
:tasty/core/Test/Tasty/Run.hs
Lines 605 to 610 in f73ce42
One could extend
launchTestTree
with an argument(OptionSet -> [TestAction] -> [TestAction])
, but that would require us to exposedata TestAction
, which I deem undesirable:tasty/core/Test/Tasty/Run.hs
Lines 304 to 313 in f73ce42
Instead I suggest adding an argument of type
(OptionSet -> (a -> Path) -> [a] -> [a]
: "if you tell me how to extractPath
froma
, I'll be able to reorder[a]
".How does it sound?
The text was updated successfully, but these errors were encountered: