From f37f423ac1be81dabfa1d08bc7b08e9fbd828a16 Mon Sep 17 00:00:00 2001 From: Steven Malis Date: Wed, 13 Nov 2019 17:11:16 -0800 Subject: [PATCH] Make a test compatible across python versions. --- src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 2 +- src/test/run-make-fulldeps/sysroot-crates-are-unstable/test.py | 2 +- 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))