Skip to content

Commit

Permalink
Rollup merge of rust-lang#66396 - smmalis37:pythontest, r=alexcrichton
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tmandry authored Nov 14, 2019
2 parents 407968d + f37f423 commit ab8e0df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
all:
python2.7 test.py
python test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit ab8e0df

Please sign in to comment.