-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Automate spec08 task03 contiki interop tests #292
Conversation
21071dd
to
8063ca3
Compare
08-interop/test_spec08.py
Outdated
|
||
# get the address of the contiki node, ie a substring after "-- " | ||
res = contiki_node.cmd("ip-addr") | ||
contiki_addr = res[res.find("-- ") + 3 :] |
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.
Let's make flake8 happy :-)
contiki_addr = res[res.find("-- ") + 3 :] | |
contiki_addr = res[(res.find("-- ") + 3):] |
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.
Come to think of it: don't you rather want to do it as a regex? E.g.
contiki_addr = res[res.find("-- ") + 3 :] | |
match = re.search("-- ...(.+)", res) | |
assert match | |
contiki_addr = match[1] |
8063ca3
to
9bbc957
Compare
Ok, local tests worked and the static tests are happy. Anyone else have feedback? |
08-interop/test_spec08.py
Outdated
) | ||
def test_task03(riot_ctrl): | ||
# run `./compile_contiki.sh` relative to this file | ||
subprocess.check_call(["./compile_contiki.sh"], cwd=__file__[: __file__.rfind("/")]) |
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.
Let's make this more pythonic and portable
subprocess.check_call(["./compile_contiki.sh"], cwd=__file__[: __file__.rfind("/")]) | |
subprocess.check_call( | |
["./compile_contiki.sh"], | |
cwd=os.path.dirname(os.path.realpath(__file__)), | |
) |
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.
Other than that, I think this is good to go
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.
Ping?
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.
Oops ya that makes sense
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.
done
9bbc957
to
dd8ee94
Compare
I just removed some unneeded copy pasta flags in the docker command in the contiki script |
dd8ee94
to
e83224e
Compare
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.
ACK
Thanks! |
This is based off the work @jia200x did.
Still a WIP but here are the issues I have found so far.
FLASHFILE
to use the existingriotctrl
infrastructure butiotlabs
actually usesBINFILE
to speed things up... that took me a whileflash-only
step maybe that could be cleanedThis is a quick (not really that quick) and dirty way and I would appreciate suggestions on how to clean it up.