remove git-annex test runner segfault workarounds
authorJoey Hess <joeyh@joeyh.name>
Wed, 18 May 2022 20:45:27 +0000 (16:45 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 18 May 2022 20:45:27 +0000 (16:45 -0400)
Those segfaults were caused by setEnv, which should have been fixed by
commits 79017c612e16653d00253f6862b925b287102624 and
ebb76f0486030e1e6bae43b5f05d00d63a968681.

Sponsored-by: Dartmouth College's Datalad project
Test/Framework.hs

index 13bfc87929910e21d9293bad8797cc72a237378e..1ddec7a5bcfc3258fb6985873599e7ddc37ad3db 100644 (file)
@@ -12,7 +12,6 @@ module Test.Framework where
 import Test.Tasty
 import Test.Tasty.Runners
 import Test.Tasty.HUnit
-import Test.Tasty.QuickCheck
 import Test.Tasty.Options
 import Test.Tasty.Ingredients.Rerun
 import Test.Tasty.Ingredients.ConsoleReporter
@@ -765,13 +764,7 @@ parallelTestRunner' numjobs opts mkts
                                , cwd = Just subdir
                                }
                        (_, _, _, pid) <- createProcessConcurrent p
-                       ret <- waitForProcess pid
-                       -- Work around this strange issue
-                       -- https://github.com/UnkindPartition/tasty/issues/326
-                       -- when other workaround does not work.
-                       if ret == ExitFailure (-11)
-                               then runone n
-                               else return ret
+                       waitForProcess pid
                nvar <- newTVarIO (1, length ts)
                exitcodes <- forConcurrently [1..numjobs] $ \_ -> 
                        worker [] nvar runone
@@ -787,22 +780,15 @@ parallelTestRunner' numjobs opts mkts
                                exitFailure
        go (Just subenvval) = case readish subenvval of
                Nothing -> error ("Bad " ++ subenv)
-               Just (n, crippledfilesystem, adjustedbranchok) -> isolateGitConfig $ do
+               Just (n, crippledfilesystem, adjustedbranchok) -> setTestEnv $ do
                        let ts = mkts numparts crippledfilesystem adjustedbranchok opts
-                       let t = topLevelTestGroup 
-                               -- Work around this strange issue
-                               -- https://github.com/UnkindPartition/tasty/issues/326
-                               [ testGroup "Tasty" 
-                                       [ testProperty "tasty self-check" True
-                                       ]
-                               , ts !! (n - 1)
-                               ]
+                       let t = topLevelTestGroup [ ts !! (n - 1) ]
                        case tryIngredients ingredients (tastyOptionSet opts) t of
                                Nothing -> error "No tests found!?"
                                Just act -> ifM act
                                        ( exitSuccess
                                        , exitFailure
-                                                       )
+                                       )
 
 topLevelTestGroup :: [TestTree] -> TestTree
 topLevelTestGroup = testGroup "Tests"