Skip to content

Conversation

kaspar030
Copy link
Contributor

@kaspar030 kaspar030 commented Jun 17, 2019

Contribution description

This PR adds a script that automatically tests riotboot's image selection.
It expects slot0, APP_VER=0 be pre-flashed on the device (and verifies that). This is what happens when "make flash" is run, and also happens on the CI.

A following "make test" will:

  1. verify slot0, APP_VER=0
  2. flash slot1, APP_VER=1, verify it is booting
  3. flash slot0, APP_VER=2, verify it is booting

Testing procedure

  1. look at CI output
  2. try local make -Ctests/riotboot flash test

Issues/PRs references

Needs #11697 and #11690.

@kaspar030 kaspar030 added Area: tests Area: tests and testing framework State: waiting for other PR State: The PR requires another PR to be merged first CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR labels Jun 17, 2019
@kaspar030 kaspar030 requested a review from fjmolinas June 17, 2019 15:40
Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

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

Tested locally, it works after slot1 is compiled separetly (see comment below). Sticking to the changes of this PR related to the tests it looks good, just need to address my single comment. Commits might need to be fixed by there is still much noise from the other PR's, so let's wait for them.

@kaspar030 kaspar030 force-pushed the add_riotboot_test_script branch from 837bec4 to fbdfffe Compare June 18, 2019 09:27
@kaspar030 kaspar030 force-pushed the add_riotboot_test_script branch from b31accb to 55bf6af Compare June 27, 2019 13:22
kaspar030 added a commit to kaspar030/RIOT that referenced this pull request Jul 8, 2019
kaspar030 added a commit to kaspar030/RIOT that referenced this pull request Jul 10, 2019
@kaspar030 kaspar030 force-pushed the add_riotboot_test_script branch from 55bf6af to 1d73c87 Compare July 12, 2019 08:12
kaspar030 added a commit to kaspar030/RIOT that referenced this pull request Jul 12, 2019
@fjmolinas
Copy link
Contributor

@kaspar030 please rebase so I can give a fresh round of testing on monday.

@kaspar030 kaspar030 force-pushed the add_riotboot_test_script branch from fee339f to dc33043 Compare July 15, 2019 08:31
@kaspar030 kaspar030 removed the State: waiting for other PR State: The PR requires another PR to be merged first label Jul 15, 2019
@kaspar030
Copy link
Contributor Author

  • rebased, not waiting for other PR's anymore!

kaspar030 added a commit to kaspar030/RIOT that referenced this pull request Jul 15, 2019
Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

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

@kaspar030 tested locally and it is working fine, please squash so we can re-lunch the ci, and I will check the output.

This enables "make test" and "make test-murdock" to rely on both images being
present and thus execute without re-compiling.
@kaspar030 kaspar030 force-pushed the add_riotboot_test_script branch from dc33043 to aaa187e Compare July 15, 2019 09:31
@kaspar030 kaspar030 added CI: disable test cache If set, CI will always run all tests regardless of whether they have been run successfully before CI: run tests If set, CI server will run tests on hardware for the labeled PR and removed CI: run tests If set, CI server will run tests on hardware for the labeled PR labels Jul 15, 2019
@fjmolinas
Copy link
Contributor

@kaspar030 kaspar030 added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jul 15, 2019
@kaspar030
Copy link
Contributor Author

@kaspar030 how can I view the same outputs for the new build?

I've triggered a re-build with "disable test cache", that should produce the output.

@fjmolinas
Copy link
Contributor

@kaspar030 out of this PR topic, but does the CI progression bar take into account the time taken to run the tests?

Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

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

I was able to tests locally and verified it ran correctly in the CI on hardware. I think the tests scripts could all be implemented in python, but I leave this for another PR. ACK!

@fjmolinas fjmolinas merged commit 23c9188 into RIOT-OS:master Jul 15, 2019
@kaspar030 kaspar030 deleted the add_riotboot_test_script branch July 15, 2019 11:38
@kaspar030
Copy link
Contributor Author

Thanks for reviewing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: tests Area: tests and testing framework CI: disable test cache If set, CI will always run all tests regardless of whether they have been run successfully before CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants