diff --git a/CHANGELOG b/CHANGELOG index 1072e9390f..12a330bd22 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -31,6 +31,7 @@ git-annex (8.20200502) UNRELEASED; urgency=medium * Fix bug that made enableremote of S3 and webdav remotes, that have embedcreds=yes, fail to set up the embedded creds, so accessing the remotes failed. (Regression introduced in version 7.20200202.7) + * Support building with tasty-1.3. -- Joey Hess Mon, 04 May 2020 12:46:11 -0400 diff --git a/Test.hs b/Test.hs index 7f79fafdd6..0873bb14ed 100644 --- a/Test.hs +++ b/Test.hs @@ -1,6 +1,6 @@ {- git-annex test suite - - - Copyright 2010-2019 Joey Hess + - Copyright 2010-2020 Joey Hess - - Licensed under the GNU AGPL version 3 or higher. -} @@ -19,6 +19,7 @@ import Test.Tasty.Runners import Test.Tasty.HUnit import Test.Tasty.QuickCheck import Test.Tasty.Ingredients.Rerun +import Test.Tasty.Options import Options.Applicative (switch, long, help, internal) import qualified Data.Map as M @@ -96,7 +97,7 @@ import qualified Types.Remote optParser :: Parser TestOptions optParser = TestOptions - <$> suiteOptionParser ingredients (tests False True mempty) + <$> snd tastyParser <*> switch ( long "keep-failures" <> help "preserve repositories on test failure" @@ -107,6 +108,15 @@ optParser = TestOptions ) <*> cmdParams "non-options are for internal use only" +tastyParser :: ([String], Parser Test.Tasty.Options.OptionSet) +#if MIN_VERSION_tasty(1,3,0) +tastyParser = go +#else +tastyParser = ([], go) +#endif + where + go = suiteOptionParser ingredients (tests False True mempty) + runner :: TestOptions -> IO () runner opts | fakeSsh opts = runFakeSsh (internalData opts) @@ -118,6 +128,10 @@ runner opts -- suite. subenv = "GIT_ANNEX_TEST_SUBPROCESS" runsubprocesstests Nothing = do + let warnings = fst tastyParser + unless (null warnings) $ do + hPutStrLn stderr "warnings from tasty:" + mapM_ (hPutStrLn stderr) warnings pp <- Annex.Path.programPath Utility.Env.Set.setEnv subenv "1" True ps <- getArgs diff --git a/doc/bugs/Build_failures_with_tasty_1.3.mdwn b/doc/bugs/Build_failures_with_tasty_1.3.mdwn index e7f33f00a0..0ca3c12f03 100644 --- a/doc/bugs/Build_failures_with_tasty_1.3.mdwn +++ b/doc/bugs/Build_failures_with_tasty_1.3.mdwn @@ -146,3 +146,4 @@ Build git-annex with tasty-1.3 ### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders) Yes. +> [[fixed|done]] --[[Joey]]