File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import qualified Data.ByteString as BS
99import qualified Data.ByteString.Char8 as BSC
1010import qualified Data.ByteString.UTF8 as BS8
1111import Data.Char (isSpace )
12- import Data.List (dropWhileEnd , isPrefixOf )
12+ import Data.List (dropWhileEnd , isPrefixOf , sort )
1313import Data.Maybe (catMaybes )
1414import System.Directory (listDirectory , doesDirectoryExist , doesFileExist , removeFile )
1515import System.Exit (ExitCode (.. ))
@@ -301,6 +301,9 @@ testDir oracleTest dir = do
301301 False -> return Nothing
302302 True -> Just <$> testDir oracleTest (dir </> f)
303303 exists <- doesDirectoryExist dir
304- fs <- if exists then listDirectory dir else return []
304+ -- This `sort` is not technically necessary, it just ensures that test cases
305+ -- will be performed in a stable ordering, since `listDirectory` doesn't
306+ -- guarantee such an ordering.
307+ fs <- if exists then sort <$> listDirectory dir else return []
305308 tcs <- mapM gen fs
306309 return (testGroup (takeBaseName dir) (catMaybes tcs))
You can’t perform that action at this time.
0 commit comments