aboutsummaryrefslogtreecommitdiff
path: root/Command/Test.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-02-27 15:48:26 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-02-27 15:51:28 -0400
commitd23d4ff9d994b4ac4de0ec133601aa03eb01a961 (patch)
treee61d9506ee3654a1d9d7811f2874b00d28677681 /Command/Test.hs
parentf812dd12aff241585bad2f4e064e44d795a53813 (diff)
break dependency cycle by special casing running of test command
Diffstat (limited to 'Command/Test.hs')
-rw-r--r--Command/Test.hs20
1 files changed, 5 insertions, 15 deletions
diff --git a/Command/Test.hs b/Command/Test.hs
index 839829e0a..7ff9f2963 100644
--- a/Command/Test.hs
+++ b/Command/Test.hs
@@ -7,27 +7,17 @@
module Command.Test where
-import Common.Annex
import Command
-import qualified Command.Init
-import qualified Command.Add
-import qualified Command.Drop
-import qualified Command.Get
-import qualified Command.Move
-import qualified Command.Copy
-import qualified Command.Sync
-import qualified Command.Whereis
-import qualified Command.Fsck
-import qualified Test
def :: [Command]
-def = [noCommit $ noRepo showHelp $ dontCheck repoExists $
+def = [ dontCheck repoExists $
command "test" paramNothing seek "run built-in test suite"]
seek :: [CommandSeek]
seek = [withWords start]
+{- We don't actually run the test suite here because of a dependency loop.
+ - The main program notices when the command is test and runs it; this
+ - function is never run if that works. -}
start :: [String] -> CommandStart
-start _ = do
- liftIO $ Test.main
- stop
+start _ = error "Cannot specify any additional parameters when running test"