filter out ExitSuccess
authorJoey Hess <joeyh@joeyh.name>
Mon, 2 May 2022 18:09:37 +0000 (14:09 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 2 May 2022 18:09:37 +0000 (14:09 -0400)
This avoids displaying the unexpected exit codes message when
the list is eg [ExitSuccess, ExitFailure 1].

Sponsored-by: Dartmouth College's Datalad project
Test/Framework.hs
doc/bugs/sporadic___40____63____41___fail_of_crypto_test__63__.mdwn
doc/bugs/sporadic___40____63____41___fail_of_crypto_test__63__/comment_3_89e9d65073a58188024290a2b32fda2e._comment [new file with mode: 0644]

index 25be2164086fdc4d4ee327177adc7218c48a3aeb..3bb9c2d1d643ab16c5ff111922908e135fefddd0 100644 (file)
@@ -744,8 +744,8 @@ parallelTestRunner' numjobs opts mkts
                exitcodes <- forConcurrently [1..numjobs] $ \_ -> 
                        worker [] nvar runone
                unless (keepFailuresOption opts) finalCleanup
-               case nub (concat exitcodes) of
-                       [ExitSuccess] -> exitSuccess
+               case nub (filter (/= ExitSuccess) (concat exitcodes)) of
+                       [] -> exitSuccess
                        [ExitFailure 1] -> do
                                putStrLn "  (Failures above could be due to a bug in git-annex, or an incompatibility"
                                putStrLn "   with utilities, such as git, installed on this system.)"
index 9585b1c030b14bf8e6a7e759e85672cf63b1f959..95220dc79bd4ed70cd5a9e8bd368bd1ee04f0b99 100644 (file)
@@ -34,3 +34,5 @@ cron-20220418/build-ubuntu.yaml-665-0346631d-failed/test-annex (nfs-home, ubuntu
 
 [[!meta author=yoh]]
 [[!tag projects/datalad]]
+
+> [[fixed|done]] --[[Joey]] 
diff --git a/doc/bugs/sporadic___40____63____41___fail_of_crypto_test__63__/comment_3_89e9d65073a58188024290a2b32fda2e._comment b/doc/bugs/sporadic___40____63____41___fail_of_crypto_test__63__/comment_3_89e9d65073a58188024290a2b32fda2e._comment
new file mode 100644 (file)
index 0000000..4467555
--- /dev/null
@@ -0,0 +1,22 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 3"""
+ date="2022-05-02T17:57:21Z"
+ content="""
+Noticed this:
+       
+       Test subprocesses exited with unexpected exit codes: [ExitSuccess,ExitSuccess,ExitSuccess,ExitSuccess,ExitSuccess,ExitSuccess,ExitSuccess,ExitSuccess,ExitSuccess,ExitSuccess,ExitSuccess,ExitSuccess,ExitSuccess,ExitFailure 1,ExitSuccess,ExitSuccess,ExitSuccess,ExitSuccess,ExitSuccess,ExitSuccess]
+
+In this test run: <https://github.com/datalad/git-annex/runs/6251550145?check_suite_focus=true>
+
+There was a test failure indeed there, which was another bug that
+is now fixed. But notice the `ExitFailure 1` in the list of exit codes.
+
+The code around handing exit codes has changed from before, and still had a bug,
+because a list with `ExitFailure 1` will cause that message, incorrectly.
+(Now fixed that.)
+
+But, this seems to show that it's no longer hiding the actual problem
+exit code when a test fails, which it was somehow apparently doing before.
+So I think this bug can be closed as fully fixed now.
+"""]]