[commit: ghc] ghc-7.10: Move the function strip_quotes to testutil.py (65753a9)

git at git.haskell.org git at git.haskell.org
Sat Mar 14 08:11:08 UTC 2015


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

On branch  : ghc-7.10
Link       : http://ghc.haskell.org/trac/ghc/changeset/65753a9d3414d52b9a97cb23e3c8cff84f7528e5/ghc

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

commit 65753a9d3414d52b9a97cb23e3c8cff84f7528e5
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Fri Mar 13 21:07:15 2015 +0100

    Move the function strip_quotes to testutil.py
    
    If one runs the testsuite with a profiling compiler, during the import
    of `testlib.py`, `testlib.py` sets the global variable `gs_working`. To
    do so, it executes a few statements which require the function
    `strip_quotes` to be in scope. But that function only gets defined at
    the very end of testlib.py.
    
    This patch moves the definition of `strip_quotes` to testutil.py, which
    is imported at the very top of testlib.py. This unbreaks the nightly
    builders.
    
    (cherry picked from commit cc07a0ba64b554ffd1ff85757b02cd79d30ed57a)


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

65753a9d3414d52b9a97cb23e3c8cff84f7528e5
 testsuite/driver/testlib.py  | 4 ----
 testsuite/driver/testutil.py | 3 +++
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index fcf86dd..58375c1 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -2271,7 +2271,3 @@ def getStdout(cmd):
         return stdout
     else:
         raise Exception("Need subprocess to get stdout, but don't have it")
-
-def strip_quotes(s):
-    # Don't wrap commands to subprocess.call/Popen in quotes.
-    return s.strip('\'"')
diff --git a/testsuite/driver/testutil.py b/testsuite/driver/testutil.py
index ec45e93..2cfa8f1 100644
--- a/testsuite/driver/testutil.py
+++ b/testsuite/driver/testutil.py
@@ -15,3 +15,6 @@ def version_gt(x, y):
 def version_ge(x, y):
     return version_to_ints(x) >= version_to_ints(y)
 
+def strip_quotes(s):
+    # Don't wrap commands to subprocess.call/Popen in quotes.
+    return s.strip('\'"')



More information about the ghc-commits mailing list