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

unittests: do not use auto_init #1594

Merged
merged 1 commit into from
Aug 21, 2014

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Aug 21, 2014

Unittests should not use auto_init. In most use-cases it would be called multiple times in the test's setup-function anyways.

@Kijewski
Copy link
Contributor

ACK, auto_init should already have been deactivated.

Kijewski added a commit that referenced this pull request Aug 21, 2014
@Kijewski Kijewski merged commit eaed2f1 into RIOT-OS:master Aug 21, 2014
@miri64 miri64 deleted the unittests-no-auto-init branch August 21, 2014 23:41
@Enoch247
Copy link
Contributor

Enoch247 commented Nov 4, 2024

10 years after this PR, the question of why it was done came up. Perhaps in 10 more years, it will be asked again, and nobody will be around who remembers. So documenting that now. You are welcome those reading this in the year 2034. :)

The reason why we deactivated the auto_init in unittests has multiple reasons:

  1. The unittests used to, and to a degree still are a „catch-all“ application, that includes a lot of modules in the hopes to catch conflicts between them (that's why they also can be build separately with make test-.
  2. We might want to test module initialization in the unittests
  3. auto_init might cause side-effects for certain tests that expect another module to be deactivated (I remember that there was a problem with the old xtimer module, but I do not remember the specfics)

The above was taken from here:
https://matrix.to/#/!pqHdpanAvkJvlCwUDE:matrix.org/$2et3pDijENpQgXui_RPIMWqjrFlkj7z7W-Ce4la41KQ?via=matrix.org&via=tu-dresden.de&via=utwente.io

@miri64
Copy link
Member Author

miri64 commented Nov 4, 2024

@Enoch247 Thanks!

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 Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants