[commit: testsuite] master: Add better support for .cmm test files. (8dbd01a)

Austin Seipp mad.one at gmail.com
Thu Jan 17 07:03:03 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/8dbd01a092885ad732bd78ecdebc526088f85a56

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

commit 8dbd01a092885ad732bd78ecdebc526088f85a56
Author: Austin Seipp <mad.one at gmail.com>
Date:   Sun Jan 13 03:41:29 2013 -0600

    Add better support for .cmm test files.
    
    Fixes Trac #7573.
    
    Signed-off-by: Austin Seipp <mad.one at gmail.com>

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

 driver/testglobals.py |    3 +++
 driver/testlib.py     |    8 +++++++-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/driver/testglobals.py b/driver/testglobals.py
index 10a1105..500e7f4 100644
--- a/driver/testglobals.py
+++ b/driver/testglobals.py
@@ -237,6 +237,9 @@ class TestOptions:
        self.objc_src   = 0
        self.objcpp_src = 0
 
+       # Does this test use a .cmm file?
+       self.cmm_src    = 0
+
        # Should we put .hi/.o files in a subdirectory?
        self.outputdir = None
 
diff --git a/driver/testlib.py b/driver/testlib.py
index 0332d92..fd11be1 100644
--- a/driver/testlib.py
+++ b/driver/testlib.py
@@ -517,6 +517,9 @@ def objc_src( opts ):
 def objcpp_src( opts ):
     opts.objcpp_src = 1;
 
+def cmm_src( opts ):
+    opts.cmm_src = 1;
+
 def outputdir( odir ):
     return lambda opts, d=odir: _outputdir(opts, d)
 
@@ -1205,7 +1208,8 @@ def simple_build( name, way, extra_hc_opts, should_fail, top_mod, link, addsuf,
     # Required by GHC 7.3+, harmless for earlier versions:
     if (getTestOpts().c_src or
         getTestOpts().objc_src or
-        getTestOpts().objcpp_src):
+        getTestOpts().objcpp_src or
+        getTestOpts().cmm_src):
         extra_hc_opts += ' -no-hs-main '
 
     if getTestOpts().compile_cmd_prefix == '':
@@ -2111,6 +2115,8 @@ def add_suffix( name, suffix ):
 def add_hs_lhs_suffix(name):
     if getTestOpts().c_src:
         return add_suffix(name, 'c')
+    elif getTestOpts().cmm_src:
+        return add_suffix(name, 'cmm')
     elif getTestOpts().objc_src:
         return add_suffix(name, 'm')
     elif getTestOpts().objcpp_src:





More information about the ghc-commits mailing list