[Git][ghc/ghc][wip/junit-fixes] Fixes

Ben Gamari gitlab at gitlab.haskell.org
Sun Jun 23 23:28:18 UTC 2019



Ben Gamari pushed to branch wip/junit-fixes at Glasgow Haskell Compiler / GHC


Commits:
f19b3d51 by Ben Gamari at 2019-06-23T23:28:11Z
Fixes

- - - - -


2 changed files:

- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py


Changes:

=====================================
testsuite/driver/testglobals.py
=====================================
@@ -382,7 +382,7 @@ class TestOptions:
 
        # The directory where the runtime statistics output from Haddock are
        # found.
-       self.stats_file_dir = None
+       self.stats_files_dir = None
 
 # The default set of options
 global default_testopts


=====================================
testsuite/driver/testlib.py
=====================================
@@ -1156,8 +1156,8 @@ def do_compile(name, way, should_fail, top_mod, extra_mods, extra_hc_opts, **kwa
                            whitespace_normaliser=getattr(getTestOpts(),
                                                          "whitespace_normaliser",
                                                          normalise_whitespace)):
-        stderr = open(diff_file_name, 'rb').read()
-        os.remove(diff_file_name)
+        stderr = diff_file_name.read_bytes()
+        diff_file_name.unlink()
         return failBecauseStderr('stderr mismatch', stderr=stderr )
 
 
@@ -1314,7 +1314,7 @@ def extras_build( way, extra_mods, extra_hc_opts ):
     for mod, opts in extra_mods:
         result = simple_build(mod, way, opts + ' ' + extra_hc_opts, 0, '', 0, 0)
         if not (mod.endswith('.hs') or mod.endswith('.lhs')):
-            extra_hc_opts += ' ' + Path(mod).with_suffix('.o')
+            extra_hc_opts += ' %s' % Path(mod).with_suffix('.o')
         if badResult(result):
             return result
 
@@ -2157,9 +2157,9 @@ def in_srcdir(name: Union[Path, str], suffix: str='') -> Path:
     return getTestOpts().srcdir / add_suffix(name, suffix)
 
 def in_statsdir(name: Union[Path, str], suffix: str='') -> Path:
-    dir = getTestOpts().stats_file_dir
+    dir = getTestOpts().stats_files_dir
     if dir is None:
-        raise TypeError('stats_file_dir is not set')
+        raise TypeError('stats_files_dir is not set')
     return dir / add_suffix(name, suffix)
 
 # Finding the sample output.  The filename is of the form



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/f19b3d51b32793fe79ea6a2d1e8536d7eedf9eff

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/f19b3d51b32793fe79ea6a2d1e8536d7eedf9eff
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190623/34ac49d5/attachment-0001.html>


More information about the ghc-commits mailing list