Skip to content

Py3 fixes and Travis CI enablement #9521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jan 30, 2019
Merged

Conversation

cmonr
Copy link
Contributor

@cmonr cmonr commented Jan 28, 2019

Description

Came across some issues when setting up a testing env for Windows Python build issues (https://travis-ci.org/cmonr/mbed-os/builds/485516791), so fixed them as I went along.

This PR only contains the Py3 fixes along with finally enabling Py3 tests in Travis CI.

A Travis CI refactor will followup once this is brought in.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@cmonr cmonr requested review from a team January 28, 2019 19:41
@@ -1204,7 +1204,8 @@ def validate_config(self):
min = int(str(min), 0) if min is not None else None
max = int(str(max), 0) if max is not None else None

if (value < min or (value > max if max is not None else False)):
if ((value < min if min is not None else False) or
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be written:

Suggested change
if ((value < min if min is not None else False) or
if ((min is not None and value < min) or

@@ -1204,7 +1204,8 @@ def validate_config(self):
min = int(str(min), 0) if min is not None else None
max = int(str(max), 0) if max is not None else None

if (value < min or (value > max if max is not None else False)):
if ((value < min if min is not None else False) or
(value > max if max is not None else False)):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(value > max if max is not None else False)):
(max is not None and value > max)):

Cruz Monrreal II added 2 commits January 28, 2019 13:54
@cmonr
Copy link
Contributor Author

cmonr commented Jan 29, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Jan 29, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 1
Build artifacts

@bridadan
Copy link
Contributor

This PR seems to have broken building with Python 3 for the 5.11.4 release. This is causing errors in the Mbed CLI CI: https://circleci.com/gh/ARMmbed/mbed-cli/1319?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

@cmonr
Copy link
Contributor Author

cmonr commented Feb 15, 2019

@bridadan I'd be curious if #9673 manages to fix the issue, since the error string looks similar to other issues that 9673 fixed.

@cmonr
Copy link
Contributor Author

cmonr commented Feb 15, 2019

(I'm working on adding a compile step after the pytests to make sure this kind of thing is hard to reproduce, but I'll be damned if I'm going to do it while relying on apt-get)

@bridadan
Copy link
Contributor

The fix in #9673 fixed it locally for me, and the CI test will be very welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants