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

Ben Gamari gitlab at gitlab.haskell.org
Sat Jun 22 04:11:29 UTC 2019



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


Commits:
4d12c289 by Ben Gamari at 2019-06-22T04:11:03Z
Fix

- - - - -


1 changed file:

- testsuite/driver/testutil.py


Changes:

=====================================
testsuite/driver/testutil.py
=====================================
@@ -55,10 +55,10 @@ def lndir(srcdir: Path, dstdir: Path):
         src = srcdir / filename
         dst = dstdir / filename
         if src.is_file():
-            link_or_copy_file(str(src), str(dst))
+            link_or_copy_file(src, dst)
         else:
             dst.mkdir()
-            lndir(str(src), str(dst))
+            lndir(src, dst)
 
 # All possible test metric strings.
 def testing_metrics():
@@ -72,9 +72,11 @@ def testing_metrics():
 # We define the following function to make this magic more
 # explicit/discoverable. You are enouraged to use it instead of os.symlink.
 if platform.system() == 'Windows' and os.getenv('FORCE_SYMLINKS') == None:
-    link_or_copy_file = lambda src, dst: shutil.copyfile(src, dst)
+    def link_or_copy_file(src: Path, dst: Path):
+        shutil.copyfile(str(src), str(dst))
 else:
-    link_or_copy_file = lambda src, dst: os.symlink(src, dst)
+    def link_or_copy_file(src: Path, dst: Path):
+        os.symlink(str(src), str(dst))
 
 class Watcher(object):
     def __init__(self, count: int):



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/4d12c289d8fddbc305315c96f0e536dd26657915
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/20190622/649772f9/attachment-0001.html>


More information about the ghc-commits mailing list