diff --git a/Test/Tasty/CmdLine.hs b/Test/Tasty/CmdLine.hs
--- a/Test/Tasty/CmdLine.hs
+++ b/Test/Tasty/CmdLine.hs
@@ -13,6 +13,7 @@
 import qualified Data.Map as Map
 import Data.Typeable
 import Control.Arrow
+import System.Exit
 
 import Test.Tasty.Core
 import Test.Tasty.CoreOptions
@@ -40,4 +41,5 @@
     ( fullDesc <>
       header "Mmm... tasty test suite"
     )
-  runner opts testTree =<< launchTestTree opts testTree
+  ok <- execRunner runner opts testTree
+  if ok then exitSuccess else exitFailure
diff --git a/Test/Tasty/Run.hs b/Test/Tasty/Run.hs
--- a/Test/Tasty/Run.hs
+++ b/Test/Tasty/Run.hs
@@ -3,6 +3,7 @@
   ( Status(..)
   , StatusMap
   , Runner
+  , execRunner
   , launchTestTree
   ) where
 
@@ -52,9 +53,8 @@
 -- and all it needs to do is notifying the user about the progress and
 -- then displaying the overall results in the end.
 --
--- It is also the runner's responsibility to exit with an appropriate
--- exit code.
-type Runner = OptionSet -> TestTree -> StatusMap -> IO ()
+-- The function's result should indicate whether all the tests passed.
+type Runner = OptionSet -> TestTree -> StatusMap -> IO Bool
 
 -- | Start executing a test
 executeTest
@@ -126,3 +126,10 @@
   let NumThreads numTheads = lookupOption opts
   launchTests numTheads tmap
   return $ fmap snd smap
+
+-- | Execute a 'Runner'.
+--
+-- This is a shortcut which runs 'launchTestTree' behind the scenes.
+execRunner :: Runner -> OptionSet -> TestTree -> IO Bool
+execRunner runner opts testTree =
+  runner opts testTree =<< launchTestTree opts testTree
diff --git a/Test/Tasty/UI.hs b/Test/Tasty/UI.hs
--- a/Test/Tasty/UI.hs
+++ b/Test/Tasty/UI.hs
@@ -13,7 +13,6 @@
 import qualified Data.IntMap as IntMap
 import Data.Maybe
 import Data.Monoid
-import System.Exit
 import System.IO
 
 #ifdef COLORS
@@ -112,11 +111,11 @@
   case failures st of
     0 -> do
       ok $ printf "All %d tests passed\n" (ix st)
-      exitSuccess
+      return True
 
     fs -> do
       fail $ printf "%d out of %d tests failed\n" fs (ix st)
-      exitFailure
+      return False
 
   where
     alignment = computeAlignment opts tree
diff --git a/tasty.cabal b/tasty.cabal
--- a/tasty.cabal
+++ b/tasty.cabal
@@ -2,7 +2,7 @@
 --  see http://haskell.org/cabal/users-guide/
 
 name:                tasty
-version:             0.1.1
+version:             0.2
 synopsis:            Modern and extensible testing framework
 description:         See <http://documentup.com/feuerbach/tasty>
 license:             MIT
