-
Notifications
You must be signed in to change notification settings - Fork 3k
Fixing import paths of memap.py when excuted as a script #7673
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
Fixing import paths of memap.py when excuted as a script #7673
Conversation
cc: @jflynn129 |
LGTM, but what I don't get is why other tools aren't affected in the same way. An example: https://github.com/ARMmbed/mbed-os/blob/master/tools/build_api.py#L36 |
I believe its because those files aren't directly invoked. Instead, they're imported by the "front-line" scripts ( Lines 566 to 582 in 8755e56
The frontline scripts add the proper directories to the path so all the imported files get the same path. |
tools/memap.py
Outdated
@@ -18,7 +23,7 @@ | |||
from jinja2 import FileSystemLoader, StrictUndefined | |||
from jinja2.environment import Environment | |||
|
|||
from .utils import (argparse_filestring_type, argparse_lowercase_hyphen_type, | |||
from tools.utils import (argparse_filestring_type, argparse_lowercase_hyphen_type, | |||
argparse_uppercase_type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct indentation please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I updated it to match build_api.py
.
25e5135
to
59427db
Compare
Do you mean the equeue test? It's a little test of the internal event queue logic using POSIX calls. This was probably a mistake, because if Travis is under heavy load or just not processing jobs, the timing functions can sway >100ms and cause the tests to fail. Last time this happened was ~5 months ago. We should move the equeue tests to just simulate the timer on a tick. |
/morph build |
Build : SUCCESSBuild number : 2797 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 2427 |
/morph test |
Crud. Looks like this needs a rebase. |
59427db
to
b5a187d
Compare
Rebased! |
/morph build |
Build : SUCCESSBuild number : 2844 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 2471 |
/morph test |
Timing failure points to issue not being with PR. /morph test |
/morph test |
Based on top of changes that only went into 5.10 and this fix will already be present there. |
Description
This allows the
memap.py
script to be executed directly. On master, it currently throws an error:This patch was tested with Python version 2.7.13.
FYI @dlfryar
Pull request type