[commit: ghc] master: Testsuite: delete unused with_namebase (5764ade)

git at git.haskell.org git at git.haskell.org
Tue Jul 14 08:25:04 UTC 2015


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

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

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

commit 5764ade40104db4efacf5a5e452335f0aac1be8d
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Mon Jul 13 11:30:37 2015 +0200

    Testsuite: delete unused with_namebase
    
    It was introduced in 39c6c735c216d259854ee31b15ec87ea653f2b5d (2007).


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

5764ade40104db4efacf5a5e452335f0aac1be8d
 testsuite/driver/testglobals.py |  4 ----
 testsuite/driver/testlib.py     | 43 +++++------------------------------------
 2 files changed, 5 insertions(+), 42 deletions(-)

diff --git a/testsuite/driver/testglobals.py b/testsuite/driver/testglobals.py
index 76d26a3..34767f4 100644
--- a/testsuite/driver/testglobals.py
+++ b/testsuite/driver/testglobals.py
@@ -166,10 +166,6 @@ def getTestRun():
 
 class TestOptions:
    def __init__(self):
-       # if not None then we look for namebase.stderr etc rather than
-       # using the test name
-       self.with_namebase = None
-
        # skip this test?
        self.skip = 0
 
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 0fcb738..cb38949 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -410,14 +410,6 @@ def tag( t ):
 
 # ---
 
-def namebase( nb ):
-   return lambda opts, nb=nb: _namebase(opts, nb)
-
-def _namebase( opts, nb ):
-    opts.with_namebase = nb
-
-# ---
-
 def high_memory_usage(name, opts):
     opts.alone = True
 
@@ -1049,12 +1041,7 @@ def do_compile( name, way, should_fail, top_mod, extra_mods, extra_hc_opts, over
     # of whether we expected the compilation to fail or not (successful
     # compilations may generate warnings).
 
-    if getTestOpts().with_namebase == None:
-        namebase = name
-    else:
-        namebase = getTestOpts().with_namebase
-
-    (platform_specific, expected_stderr_file) = platform_wordsize_qualify(namebase, 'stderr')
+    (platform_specific, expected_stderr_file) = platform_wordsize_qualify(name, 'stderr')
     actual_stderr_file = qualify(name, 'comp.stderr')
 
     if not compare_outputs(way, 'stderr',
@@ -1079,12 +1066,7 @@ def compile_cmp_asm( name, way, extra_hc_opts ):
     # of whether we expected the compilation to fail or not (successful
     # compilations may generate warnings).
 
-    if getTestOpts().with_namebase == None:
-        namebase = name
-    else:
-        namebase = getTestOpts().with_namebase
-
-    (platform_specific, expected_asm_file) = platform_wordsize_qualify(namebase, 'asm')
+    (platform_specific, expected_asm_file) = platform_wordsize_qualify(name, 'asm')
     actual_asm_file = qualify(name, 's')
 
     if not compare_outputs(way, 'asm',
@@ -1530,13 +1512,8 @@ def get_compiler_flags(override_flags, noforce):
     return flags
 
 def check_stdout_ok(name, way):
-   if getTestOpts().with_namebase == None:
-       namebase = name
-   else:
-       namebase = getTestOpts().with_namebase
-
    actual_stdout_file   = qualify(name, 'run.stdout')
-   (platform_specific, expected_stdout_file) = platform_wordsize_qualify(namebase, 'stdout')
+   (platform_specific, expected_stdout_file) = platform_wordsize_qualify(name, 'stdout')
 
    def norm(str):
       if platform_specific:
@@ -1558,13 +1535,8 @@ def dump_stdout( name ):
    print(read_no_crs(qualify(name, 'run.stdout')))
 
 def check_stderr_ok(name, way):
-   if getTestOpts().with_namebase == None:
-       namebase = name
-   else:
-       namebase = getTestOpts().with_namebase
-
    actual_stderr_file   = qualify(name, 'run.stderr')
-   (platform_specific, expected_stderr_file) = platform_wordsize_qualify(namebase, 'stderr')
+   (platform_specific, expected_stderr_file) = platform_wordsize_qualify(name, 'stderr')
 
    def norm(str):
       if platform_specific:
@@ -1634,13 +1606,8 @@ def check_prof_ok(name, way):
         print(prof_file + " is empty")
         return(False)
 
-    if getTestOpts().with_namebase == None:
-        namebase = name
-    else:
-        namebase = getTestOpts().with_namebase
-
     (platform_specific, expected_prof_file) = \
-        platform_wordsize_qualify(namebase, 'prof.sample')
+        platform_wordsize_qualify(name, 'prof.sample')
 
     # sample prof file is not required
     if not os.path.exists(expected_prof_file):



More information about the ghc-commits mailing list