From f37f423ac1be81dabfa1d08bc7b08e9fbd828a16 Mon Sep 17 00:00:00 2001 From: Steven Malis Date: Wed, 13 Nov 2019 17:11:16 -0800 Subject: [PATCH 1/2] 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 a35174b3c2ac4..87bbab2427bc7 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 855b6421cf822..927edff4c22a5 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)) From 56f9212b724cb00f4fc59ec676e4e97a127d586d Mon Sep 17 00:00:00 2001 From: Steven Malis Date: Fri, 15 Nov 2019 11:19:13 -0800 Subject: [PATCH 2/2] Change makefile back to python27. --- src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 87bbab2427bc7..a35174b3c2ac4 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: - python test.py + python2.7 test.py