Commit cc07a0ba authored by thomie's avatar thomie
Browse files

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.

Reviewed By: austin

Differential Revision: https://phabricator.haskell.org/D728
parent 71fcc4c0
......@@ -2283,7 +2283,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('\'"')
......@@ -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('\'"')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment