[Git][ghc/ghc][wip/explicit-perf-baseline] Fix it

Ben Gamari gitlab at gitlab.haskell.org
Mon Jul 6 01:23:33 UTC 2020



Ben Gamari pushed to branch wip/explicit-perf-baseline at Glasgow Haskell Compiler / GHC


Commits:
e3e762b6 by Ben Gamari at 2020-07-05T21:23:26-04:00
Fix it

- - - - -


1 changed file:

- testsuite/driver/testlib.py


Changes:

=====================================
testsuite/driver/testlib.py
=====================================
@@ -1945,7 +1945,8 @@ def check_prof_ok(name: TestName, way: WayName) -> bool:
 def compare_outputs(way: WayName,
                     kind: str,
                     normaliser: OutputNormalizer,
-                    expected_file, actual_file, diff_file=None,
+                    expected_file: str, actual_file: str,
+                    diff_file: Optional[str]=None,
                     whitespace_normaliser: OutputNormalizer=lambda x:x) -> bool:
 
     expected_path = in_srcdir(expected_file)
@@ -2000,18 +2001,19 @@ def compare_outputs(way: WayName,
             if_verbose(1, 'Test is expected to fail. Not accepting new output.')
             return False
         elif config.accept and actual_raw:
+            suffix = ''
             if config.accept_platform:
                 if_verbose(1, 'Accepting new output for platform "'
                               + config.platform + '".')
-                expected_path += '-' + config.platform
+                suffix += '-' + config.platform
             elif config.accept_os:
                 if_verbose(1, 'Accepting new output for os "'
                               + config.os + '".')
-                expected_path += '-' + config.os
+                suffix += '-' + config.os
             else:
                 if_verbose(1, 'Accepting new output.')
 
-            write_file(expected_path, actual_raw)
+            write_file(str(expected_path) + suffix, actual_raw)
             return True
         elif config.accept:
             if_verbose(1, 'No output. Deleting "{0}".'.format(expected_path))



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e3e762b635fd3609f91e07a318e5bcd4c14d6c8a
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/20200705/70aac4b2/attachment-0001.html>


More information about the ghc-commits mailing list