Removed the testsuite build flag

Test suite is always included.

Building with this flag disabled has actually been broken for some time,
since Command.TestRemote uses tasty. Fewer build flags are better, so good
time to drop it.

This commit was sponsored by Thomas Hochstein on Patreon.
This commit is contained in:
Joey Hess 2017-12-20 12:25:03 -04:00
parent f5f561bd49
commit 79857d7e9f
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
9 changed files with 14 additions and 43 deletions

View file

@ -33,11 +33,6 @@ buildFlags = filter (not . null)
#else #else
#warning Building without local pairing. #warning Building without local pairing.
#endif #endif
#ifdef WITH_TESTSUITE
, "Testsuite"
#else
#warning Building without the testsuite.
#endif
#ifdef WITH_S3 #ifdef WITH_S3
, "S3" , "S3"
#if MIN_VERSION_aws(0,10,6) #if MIN_VERSION_aws(0,10,6)
@ -83,6 +78,7 @@ buildFlags = filter (not . null)
-- Always enabled now, but users may be used to seeing these flags -- Always enabled now, but users may be used to seeing these flags
-- listed. -- listed.
, "Feeds" , "Feeds"
, "Testsuite"
] ]
-- Not a complete list, let alone a listing transitive deps, but only -- Not a complete list, let alone a listing transitive deps, but only

View file

@ -1,3 +1,9 @@
git-annex (6.20171215) UNRELEASED; urgency=medium
* Removed the testsuite build flag; test suite is always included.
-- Joey Hess <id@joeyh.name> Wed, 20 Dec 2017 12:11:46 -0400
git-annex (6.20171214) unstable; urgency=medium git-annex (6.20171214) unstable; urgency=medium
* Use youtube-dl rather than quvi to download media from web pages, * Use youtube-dl rather than quvi to download media from web pages,

View file

@ -116,10 +116,8 @@ import qualified Command.WebApp
#endif #endif
#endif #endif
import qualified Command.Test import qualified Command.Test
#ifdef WITH_TESTSUITE
import qualified Command.FuzzTest import qualified Command.FuzzTest
import qualified Command.TestRemote import qualified Command.TestRemote
#endif
#ifdef WITH_BENCHMARK #ifdef WITH_BENCHMARK
import qualified Command.Benchmark import qualified Command.Benchmark
#endif #endif
@ -226,10 +224,8 @@ cmds testoptparser testrunner =
#endif #endif
#endif #endif
, Command.Test.cmd testoptparser testrunner , Command.Test.cmd testoptparser testrunner
#ifdef WITH_TESTSUITE
, Command.FuzzTest.cmd , Command.FuzzTest.cmd
, Command.TestRemote.cmd , Command.TestRemote.cmd
#endif
#ifdef WITH_BENCHMARK #ifdef WITH_BENCHMARK
, Command.Benchmark.cmd , Command.Benchmark.cmd
#endif #endif

View file

@ -299,7 +299,7 @@ dist/caballog: git-annex.cabal
# TODO should be possible to derive this from caballog. # TODO should be possible to derive this from caballog.
hdevtools: hdevtools:
hdevtools --stop-server || true hdevtools --stop-server || true
hdevtools check git-annex.hs -g -cpp -g -i -g -idist/build/git-annex/git-annex-tmp -g -i. -g -idist/build/autogen -g -Idist/build/autogen -g -Idist/build/git-annex/git-annex-tmp -g -IUtility -g -DWITH_TESTSUITE -g -DWITH_S3 -g -DWITH_ASSISTANT -g -DWITH_INOTIFY -g -DWITH_DBUS -g -DWITH_PAIRING -g -g -optP-include -g -optPdist/build/autogen/cabal_macros.h -g -odir -g dist/build/git-annex/git-annex-tmp -g -hidir -g dist/build/git-annex/git-annex-tmp -g -stubdir -g dist/build/git-annex/git-annex-tmp -g -threaded -g -Wall -g -XHaskell98 -g -XPackageImports -g -XLambdaCase hdevtools check git-annex.hs -g -cpp -g -i -g -idist/build/git-annex/git-annex-tmp -g -i. -g -idist/build/autogen -g -Idist/build/autogen -g -Idist/build/git-annex/git-annex-tmp -g -IUtility -g -DWITH_S3 -g -DWITH_ASSISTANT -g -DWITH_INOTIFY -g -DWITH_DBUS -g -DWITH_PAIRING -g -g -optP-include -g -optPdist/build/autogen/cabal_macros.h -g -odir -g dist/build/git-annex/git-annex-tmp -g -hidir -g dist/build/git-annex/git-annex-tmp -g -stubdir -g dist/build/git-annex/git-annex-tmp -g -threaded -g -Wall -g -XHaskell98 -g -XPackageImports -g -XLambdaCase
distributionupdate: distributionupdate:
git pull git pull

14
Test.hs
View file

@ -12,18 +12,6 @@ module Test where
import Types.Test import Types.Test
import Options.Applicative.Types import Options.Applicative.Types
#ifndef WITH_TESTSUITE
import Options.Applicative (pure)
optParser :: Parser ()
optParser = pure ()
runner :: Maybe (() -> IO ())
runner = Nothing
#else
import Test.Tasty import Test.Tasty
import Test.Tasty.Runners import Test.Tasty.Runners
import Test.Tasty.HUnit import Test.Tasty.HUnit
@ -2235,5 +2223,3 @@ getKey b f = fromJust <$> annexeval go
, Types.KeySource.contentLocation = f , Types.KeySource.contentLocation = f
, Types.KeySource.inodeCache = Nothing , Types.KeySource.inodeCache = Nothing
} }
#endif

View file

@ -5,18 +5,13 @@
- Licensed under the GNU GPL version 3 or higher. - Licensed under the GNU GPL version 3 or higher.
-} -}
{-# LANGUAGE CPP #-}
module Types.Test where module Types.Test where
#ifdef WITH_TESTSUITE
import Test.Tasty.Options import Test.Tasty.Options
import Data.Monoid import Data.Monoid
import Prelude import Prelude
import Types.Command import Types.Command
#endif
#ifdef WITH_TESTSUITE
data TestOptions = TestOptions data TestOptions = TestOptions
{ tastyOptionSet :: OptionSet { tastyOptionSet :: OptionSet
, keepFailuresOption :: Bool , keepFailuresOption :: Bool
@ -32,8 +27,5 @@ instance Monoid TestOptions where
(fakeSsh a || fakeSsh b) (fakeSsh a || fakeSsh b)
(internalData a <> internalData b) (internalData a <> internalData b)
#else
type TestOptions = ()
#endif
type TestRunner = TestOptions -> IO () type TestRunner = TestOptions -> IO ()

View file

@ -277,9 +277,6 @@ Flag AndroidSplice
Description: Building to get TH splices for Android Description: Building to get TH splices for Android
Default: False Default: False
Flag TestSuite
Description: Embed the test suite into git-annex
Flag TorrentParser Flag TorrentParser
Description: Use haskell torrent library to parse torrent files Description: Use haskell torrent library to parse torrent files
@ -311,7 +308,6 @@ Executable git-annex
optparse-applicative (>= 0.11.0), optparse-applicative (>= 0.11.0),
containers (>= 0.5.0.0), containers (>= 0.5.0.0),
exceptions (>= 0.6), exceptions (>= 0.6),
QuickCheck (>= 2.1),
stm (>= 2.3), stm (>= 2.3),
mtl (>= 2), mtl (>= 2),
uuid (>= 1.2.6), uuid (>= 1.2.6),
@ -359,7 +355,12 @@ Executable git-annex
crypto-api, crypto-api,
cryptonite, cryptonite,
memory, memory,
split split,
QuickCheck (>= 2.1),
tasty (>= 0.7),
tasty-hunit,
tasty-quickcheck,
tasty-rerun
CC-Options: -Wall CC-Options: -Wall
GHC-Options: -Wall -fno-warn-tabs GHC-Options: -Wall -fno-warn-tabs
Extensions: PackageImports, LambdaCase Extensions: PackageImports, LambdaCase
@ -392,10 +393,6 @@ Executable git-annex
if impl(ghc <= 7.6.3) if impl(ghc <= 7.6.3)
Other-Modules: Utility.Touch.Old Other-Modules: Utility.Touch.Old
if flag(TestSuite)
Build-Depends: tasty (>= 0.7), tasty-hunit, tasty-quickcheck, tasty-rerun
CPP-Options: -DWITH_TESTSUITE
if flag(S3) if flag(S3)
Build-Depends: conduit, conduit-extra, aws (>= 0.9.2) Build-Depends: conduit, conduit-extra, aws (>= 0.9.2)
CPP-Options: -DWITH_S3 CPP-Options: -DWITH_S3

View file

@ -6,7 +6,6 @@ flags:
pairing: true pairing: true
network-uri: true network-uri: true
s3: true s3: true
testsuite: true
webdav: true webdav: true
torrentparser: true torrentparser: true
webapp: true webapp: true

View file

@ -6,7 +6,6 @@ flags:
pairing: true pairing: true
network-uri: true network-uri: true
s3: true s3: true
testsuite: true
webdav: true webdav: true
torrentparser: true torrentparser: true
webapp: true webapp: true