Skip to content

Commit dffc6e0

Browse files
authored
Rollup merge of rust-lang#66396 - smmalis37:pythontest, r=alexcrichton
Make a test compatible across python versions. Progress on rust-lang#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.
2 parents 632a5c6 + f37f423 commit dffc6e0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
all:
2-
python2.7 test.py
2+
python test.py

src/test/run-make-fulldeps/sysroot-crates-are-unstable/test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def check_lib(lib):
3333
print('verifying if {} is an unstable crate'.format(lib['name']))
3434
stdout, stderr = exec_command([os.environ['RUSTC'], '-', '--crate-type', 'rlib',
3535
'--extern', '{}={}'.format(lib['name'], lib['path'])],
36-
to_input='extern crate {};'.format(lib['name']))
36+
to_input=('extern crate {};'.format(lib['name'])).encode('utf-8'))
3737
if not 'use of unstable library feature' in '{}{}'.format(stdout, stderr):
3838
print('crate {} "{}" is not unstable'.format(lib['name'], lib['path']))
3939
print('{}{}'.format(stdout, stderr))

0 commit comments

Comments
 (0)