summaryrefslogtreecommitdiff
path: root/tests/runtest.py
diff options
context:
space:
mode:
authorEgor Chesakov <Egor.Chesakov@microsoft.com>2018-11-17 10:20:13 -0800
committerGitHub <noreply@github.com>2018-11-17 10:20:13 -0800
commit3d64a3b3c34866358072ce21579052f37f833050 (patch)
treedb20a0e7e700e95093db43eb19263b3835b36aca /tests/runtest.py
parent477c252380c28279cab68ebc3cdc0ae8075750b1 (diff)
downloadcoreclr-3d64a3b3c34866358072ce21579052f37f833050.tar.gz
coreclr-3d64a3b3c34866358072ce21579052f37f833050.tar.bz2
coreclr-3d64a3b3c34866358072ce21579052f37f833050.zip
Force Unicode in test_location parameter in delete_existing_wrappers() (#21056)
Diffstat (limited to 'tests/runtest.py')
-rwxr-xr-xtests/runtest.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/runtest.py b/tests/runtest.py
index ce04eb2073..dee7c3a934 100755
--- a/tests/runtest.py
+++ b/tests/runtest.py
@@ -1467,6 +1467,13 @@ def setup_core_root(host_os,
return True
+if sys.version_info.major < 3:
+ def to_unicode(s):
+ return unicode(s, "utf-8")
+else:
+ def to_unicode(s):
+ return str(s, "utf-8")
+
def delete_existing_wrappers(test_location):
""" Delete the existing xunit wrappers
@@ -1511,7 +1518,7 @@ def build_test_wrappers(host_os,
"""
global g_verbose
- delete_existing_wrappers(test_location)
+ delete_existing_wrappers(to_unicode(test_location))
# Setup the dotnetcli location
dotnetcli_location = os.path.join(coreclr_repo_location, "Tools", "dotnetcli", "dotnet%s" % (".exe" if host_os == "Windows_NT" else ""))