-
Notifications
You must be signed in to change notification settings - Fork 2k
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
tests/riotboot_flashwrite: add python test script #11808
Conversation
e2af9cc
to
b74417c
Compare
b74417c
to
48468bb
Compare
46f4285
to
b05e98b
Compare
@kaspar030 there are no dependencies anymore! |
5033f8e
to
f267f5f
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.
Having the suit testing in the queue, which implicitly tests riotboot_flashwrite, does it make sense to have another test application?
@@ -1,6 +1,8 @@ | |||
DEVELHELP ?= 0 | |||
# If no BOARD is found in the environment, use this default: |
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.
tests usually include ../Makefile.tests_common
.
That sets BOARD and DEVELHELP to defaults, and also configures the application name to something that cannot clash. As is, this application would be called riotboot_flashwrite
, same as the module.
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.
It is still included I just moved it to the bottom. The first commit only does that, to group things better (although that is just my personal taste I guess), but I can always drop that commit.
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.
Ahok. Then please move it back to the top, for consistency. Just put the variables that override it above.
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.
IMO although suit implicitly tests Also, although suit attempts to be a standard, it might not be used, people might still implement there own OTA mechanism, because they want something smaller/simplet, or because they think having something privative is more secure (I'm not stating an opinion here), or whatever reason. I think saying a I also think that running And as a developer I find it useful do have an automatic script I can launch whenever I change |
BTW, if you'd like to test just this test on murdock without rebuilding, you can add a "REMOVEME" commit that adds a filter to "./.murdock", somewhere at the top:
That should limit the build to that one application/board. |
OK! (I just saw like 80% duplication in Makefile and test...) |
(and the flash/reflash tests over network block the board for >two minutes, compared to ~20sec for a regular test) |
Yes I know... :( maybe the solution could be to modify the suit test.. so it proceeds with the update even if some part of suit verification fails? The test scipt would fail but only on the suit part and not the flashwrite part? |
Cool! Thanks! |
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.
Looks good but would need a rebase to get the latest development made in the test scripts behavior recently (test_interactive_sync).
tests/riotboot_flashwrite/Makefile
Outdated
# create final binaries with specific APP_VER values. The CI RasPi test workers | ||
# don't compile themselves, thus add the required files here so they will be | ||
# submitted along with the test jobs. | ||
TEST_EXTRA_FILES=$(SLOT_RIOT_ELFS) |
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.
TEST_EXTRA_FILES=$(SLOT_RIOT_ELFS) | |
TEST_EXTRA_FILES = $(SLOT_RIOT_ELFS) |
tests/riotboot_flashwrite/main.c
Outdated
printf("Current slot=%d\n", current_slot); | ||
riotboot_slot_print_hdr(current_slot); | ||
if (current_slot != -1) { | ||
/* Sometimes, udhcp output messes up the following printfs. That |
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.
/* Sometimes, udhcp output messes up the following printfs. That | |
/* Sometimes, udhcp output messes up the following printfs. That |
"-b", | ||
"64", | ||
] | ||
subprocess.Popen(cmd, cwd=BINDIR) |
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.
Why not :
subprocess.Popen(cmd, cwd=BINDIR) | |
subprocess.call(cmd, cwd=BINDIR) |
?
with eventually the use of an assert.
"""For one board test if specified application is updatable""" | ||
|
||
# Initial Setup and wait for address configuration | ||
child.expect_exact("main(): This is RIOT!") |
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.
This is not needed now with the test_interactive_sync
module.
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
23b3e27
to
b6b20f4
Compare
Rebased but there are some issue with the script will address later. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
still useful but might need a refresh |
Staled, doesn't work anymore. |
What is not working ? |
See #11808 (comment) |
You mean "there are some issue with the script will address later." This is a bit vague ;) |
Contribution description
This PR adds a test script for
riotboot_flashwrite
.It it still missing a lot of dependencies PR's from @kaspar030.NOTE: the autthorship in the first 6 commits is only @kaspar030 it's a residue ofcherry-pick
.Testing procedure
Follow the README and test over ethos and wireless.
Issues/PRs references
Depends on
#11707,#11690and#11816.