about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-11-18 06:09:04 +0000
committerbors <bors@rust-lang.org>2019-11-18 06:09:04 +0000
commit9966af38979379f67d38bf4b2588332d844bd88f (patch)
treea01d9108a6906c5a2e2f52563c42a39afd2ef51c
parentd67ca28354091f4597b03efef2aebb4b6b55e92e (diff)
parent56f9212b724cb00f4fc59ec676e4e97a127d586d (diff)
downloadrust-9966af38979379f67d38bf4b2588332d844bd88f.tar.gz
rust-9966af38979379f67d38bf4b2588332d844bd88f.zip
Auto merge of #66396 - smmalis37:pythontest, r=alexcrichton
Make a test compatible across python versions.

Progress on #65063

This PR allows this test to work on both python2 and python3, ~~and it also allows `./x.py test` to fully complete on my system without python2 installed at all.~~
-rw-r--r--src/test/run-make-fulldeps/sysroot-crates-are-unstable/test.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/test.py b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/test.py
index 855b6421cf8..927edff4c22 100644
--- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/test.py
+++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/test.py
@@ -33,7 +33,7 @@ def check_lib(lib):
     print('verifying if {} is an unstable crate'.format(lib['name']))
     stdout, stderr = exec_command([os.environ['RUSTC'], '-', '--crate-type', 'rlib',
                                    '--extern', '{}={}'.format(lib['name'], lib['path'])],
-                                  to_input='extern crate {};'.format(lib['name']))
+                                  to_input=('extern crate {};'.format(lib['name'])).encode('utf-8'))
     if not 'use of unstable library feature' in '{}{}'.format(stdout, stderr):
         print('crate {} "{}" is not unstable'.format(lib['name'], lib['path']))
         print('{}{}'.format(stdout, stderr))