[commit: ghc] master: Make the test fail if compiled without -threaded (c77551a)

git at git.haskell.org git at git.haskell.org
Tue Mar 28 10:32:50 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/c77551abd42a346d03826d23df710ebf9eacb19f/ghc

>---------------------------------------------------------------

commit c77551abd42a346d03826d23df710ebf9eacb19f
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Mon Mar 27 16:09:23 2017 +0100

    Make the test fail if compiled without -threaded
    
    Test Plan: validate
    
    Reviewers: bgamari, austin, erikd
    
    Subscribers: rwbarton, thomie
    
    Differential Revision: https://phabricator.haskell.org/D3387


>---------------------------------------------------------------

c77551abd42a346d03826d23df710ebf9eacb19f
 testsuite/tests/concurrent/should_run/hs_try_putmvar003.hs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/testsuite/tests/concurrent/should_run/hs_try_putmvar003.hs b/testsuite/tests/concurrent/should_run/hs_try_putmvar003.hs
index d74a9cb..4442698 100644
--- a/testsuite/tests/concurrent/should_run/hs_try_putmvar003.hs
+++ b/testsuite/tests/concurrent/should_run/hs_try_putmvar003.hs
@@ -10,6 +10,7 @@ import GHC.Conc
 import GHC.MVar (MVar(..))
 import GHC.Prim
 import System.Environment
+import System.Exit
 
 -- Measure C to Haskell callback throughput under a workload with
 -- several dimensions:
@@ -29,6 +30,8 @@ import System.Environment
 -- hs_try_putmvar() is 9x faster with these parameters.
 
 main = do
+   when (not rtsSupportsBoundThreads) $
+     die "This test requires -threaded"
    args <- getArgs
    case args of
      ["1",x,y,z] -> experiment False (read x) (read y) (read z)



More information about the ghc-commits mailing list