about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSteven Malis <smmalis37@gmail.com>2019-11-13 17:11:16 -0800
committerSteven Malis <smmalis37@gmail.com>2019-11-13 17:11:16 -0800
commitf37f423ac1be81dabfa1d08bc7b08e9fbd828a16 (patch)
tree34555e6809d0733cf44e24807cc84012b964be6b
parentded5ee0013f6126f885baf5e072c20ba8b86ee6a (diff)
downloadrust-f37f423ac1be81dabfa1d08bc7b08e9fbd828a16.tar.gz
rust-f37f423ac1be81dabfa1d08bc7b08e9fbd828a16.zip
Make a test compatible across python versions.
-rw-r--r--src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile2
-rw-r--r--src/test/run-make-fulldeps/sysroot-crates-are-unstable/test.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
index a35174b3c2a..87bbab2427b 100644
--- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
+++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
@@ -1,2 +1,2 @@
 all:
-	python2.7 test.py
+	python test.py
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))