Skip to content
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/devfs: move tests-devfs out of unittests #11855

Merged
merged 1 commit into from
Jul 17, 2019

Conversation

cladmi
Copy link
Contributor

@cladmi cladmi commented Jul 17, 2019

Contribution description

This moves unittests/tests-devfs to its own test.
It prevents requiring periph_hwrng in the unittests.

Testing procedure

I tried compiling the test with buildtest and BUILD_IN_DOCKER and all supported boards compiled. This will be tested by CI.

The test also succeeds on both native and nrf52dk locally, and should also in CI.

RIOT_CI_BUILD=1 BOARD=nrf52dk make --no-print-directory -C tests/devfs/ flash test
RIOT_CI_BUILD=1 BOARD=nrf52dk make --no-print-directory -C tests/devfs/ flash test
Building application "tests_devfs" for "nrf52dk" with MCU "nrf52".

   text    data     bss     dec     hex filename       
  13536     244    3012   16792    4198 /home/harter/work/git/RIOT/tests/devfs/bin/nrf52dk/tests_devfs.elf
/home/harter/work/git/RIOT/dist/tools/jlink/jlink.sh flash /home/harter/work/git/RIOT/tests/devfs/bin/nrf52dk/tests_devfs.bin
### Flashing Target ###
### Flashing at base address 0x0 with offset 0 ###
SEGGER J-Link Commander V6.42d (Compiled Feb 15 2019 13:56:53)
DLL version V6.42d, compiled Feb 15 2019 13:56:43
...

Script processing completed.

/home/harter/work/git/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "115200"
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2019-07-17 14:45:30,462 - INFO # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
2019-07-17 14:45:33,817 - INFO # main(): This is RIOT! (Version: buildtest)
2019-07-17 14:45:33,818 - INFO # ....
2019-07-17 14:45:33,819 - INFO # OK (4 tests)

The iotlab-m3 can again compile and succeed with the tests/unittests.

RIOT_CI_BUILD=1 BOARD=iotlab-m3 make -C tests/unittests/ flash test
RIOT_CI_BUILD=1 BOARD=iotlab-m3 make -C tests/unittests/ flash test
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2019-07-17 14:41:35,364 - INFO # Connect to serial port /dev/ttyUSB1
Welcome to pyterm!
Type '/exit' to exit.
2019-07-17 14:41:38,741 - INFO # �main(): This is RIOT! (Version: buildtest)
2019-07-17 14:42:39,903 - INFO # ...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
2019-07-17 14:42:39,904 - INFO # OK (943 tests)

Issues/PRs references

unittests not compiling on iotlab-m3 was found during Release testing 2019.07-RC1
RIOT-OS/Release-Specs#128 (comment)

Splitting the test out was mentioned in the introduction PR #7421 (review)

@miri64 miri64 added Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation labels Jul 17, 2019
@miri64 miri64 added this to the Release 2019.07 milestone Jul 17, 2019
@@ -23,9 +23,7 @@
#include "fs/devfs.h"
#include "random.h"

#include "embUnit/embUnit.h"

#include "tests-devfs.h"
Copy link
Member

Choose a reason for hiding this comment

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

Since you removed the include, I guess the header you moved can also be removed instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, I thought I removed it.

@miri64
Copy link
Member

miri64 commented Jul 17, 2019

Confirmed unittests to be running again on iotlab-m3 and ran tests/devfs on native and pba-d-01-kw2x. All working.

@miri64 miri64 added Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines labels Jul 17, 2019
Copy link
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

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

ACK, please squash

@miri64 miri64 added Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines labels Jul 17, 2019
This moves unittests/tests-devfs to its own test.
It prevents requiring `periph_hwrng` in the `unittests`.
@cladmi cladmi force-pushed the pr/tests/unittest/split/devfs branch from 8bd378d to 78ca09d Compare July 17, 2019 14:05
@cladmi
Copy link
Contributor Author

cladmi commented Jul 17, 2019

PR squashed. @MrKevinWeiss do you want to backport it too ?

@miri64 miri64 merged commit 6320fde into RIOT-OS:master Jul 17, 2019
@cladmi
Copy link
Contributor Author

cladmi commented Jul 17, 2019

Thank you for the review.

@cladmi cladmi deleted the pr/tests/unittest/split/devfs branch July 17, 2019 14:56
@MrKevinWeiss MrKevinWeiss added the Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch label Jul 17, 2019
@cladmi
Copy link
Contributor Author

cladmi commented Jul 17, 2019

Backport provided in #11858

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: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants