New submission from Ben Franksen <[email protected]>:

The previous UI wasn't very usable after all, since failing tests can be
either regular shell tests or network tests and I regularly became confused
as to what options are needed to run a particular failing test. I hope it is
more obvious now how to do that.

1 patch for repository https://darcs.net/screened:

patch 5e3c8abba8b2616c61c1c8adabe3a76d89b2927a
Author: Ben Franksen <[email protected]>
Date:   Sat Apr 29 23:24:09 CEST 2023
  * harness: back to separate option for failing tests

  This removes "f" from the possible suites and re-adds a --failing option,
  this time with a SET argument so we can failing, succeeding, or both.

----------
files: harness_-back-to-separate-option-for-failing-tests.dpatch, 
patch-preview.txt
messages: 24157
nosy: bfrk
status: needs-screening
title: harness: back to separate option for failing tests

__________________________________
Darcs bug tracker <[email protected]>
<https://bugs.darcs.net/patch2450>
__________________________________
[harness: back to separate option for failing tests
Ben Franksen <[email protected]>**20230429212409
 Ignore-this: 4bdfb7fca32173e3942759d959ba2220a1abbd96623e2a7a9dd28ea021fc62484044e3037ddbb460
 
 This removes "f" from the possible suites and re-adds a --failing option,
 this time with a SET argument so we can failing, succeeding, or both.
] hunk ./harness/test.hs 37
+                     , failing :: String
hunk ./harness/test.hs 54
-     [ suites        := "snu"    += help "Select which test suites to run: (s=shell, n=network, u=unit, f=failing, h=hashed) [snu]" += typ "SET"
+     [ suites        := "snu"    += help "Select which test suites to run: (s=shell, n=network, u=unit, h=hashed) [snu]" += typ "SET"
hunk ./harness/test.hs 59
+     , failing       := "n"      += help "Select whether to use failing tests (n=no, y=yes) [n]" += typ "SET"
hunk ./harness/test.hs 123
-        failing  = 'f' `elem` suites conf
hunk ./harness/test.hs 140
+        withFailing    = 'y' `elem` failing conf
+        withSucceeding = 'n' `elem` failing conf
+
hunk ./harness/test.hs 147
-    when (shell || network || failing) $ do
+    when (shell || network) $ do
hunk ./harness/test.hs 174
-              if failing
-                then id
-                else filter $ not . ("failing-" `isPrefixOf`) . takeBaseName
+              case (withFailing, withSucceeding) of
+                (True,True) -> id -- "yn"
+                (False,True) -> -- "n"
+                  filter $ not . ("failing-" `isPrefixOf`) . takeBaseName
+                (True,False) -> -- "y"
+                  filter $ ("failing-" `isPrefixOf`) . takeBaseName
+                (False,False) -> const [] -- ""

Attachment: harness_-back-to-separate-option-for-failing-tests.dpatch
Description: application/darcs-patch

_______________________________________________
darcs-devel mailing list
[email protected]
https://lists.darcs.net/mailman/listinfo/darcs-devel

Reply via email to