Skip to content

tests: replace header guards with #pragma once#21702

Merged
crasbe merged 1 commit intoRIOT-OS:masterfrom
N11cc00:fix-tests-headers
Sep 8, 2025
Merged

tests: replace header guards with #pragma once#21702
crasbe merged 1 commit intoRIOT-OS:masterfrom
N11cc00:fix-tests-headers

Conversation

@N11cc00
Copy link
Copy Markdown
Contributor

@N11cc00 N11cc00 commented Sep 5, 2025

Contribution description

This is part of a greater effort to replace all header guards in RIOT with #pragma once. This PR only affects all headers under tests/, excluding those that have a path that contains /vendor/.

It should now remove double empty lines around the #ifndef block.

Issues/PRs references

Tracking issue #21335

@github-actions github-actions bot added Area: network Area: Networking Area: tests Area: tests and testing framework Area: pkg Area: External package ports Area: BLE Area: Bluetooth Low Energy support Area: LoRa Area: LoRa radio support labels Sep 5, 2025
@github-actions github-actions bot removed Area: network Area: Networking Area: pkg Area: External package ports Area: BLE Area: Bluetooth Low Energy support Area: LoRa Area: LoRa radio support labels Sep 5, 2025
@crasbe crasbe added Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Sep 5, 2025
@riot-ci
Copy link
Copy Markdown

riot-ci commented Sep 5, 2025

Murdock results

✔️ PASSED

9d01323 tests: change header guards to pragma once

Success Failures Total Runtime
10515 0 10516 08m:54s

Artifacts

@N11cc00 N11cc00 force-pushed the fix-tests-headers branch 2 times, most recently from 767a89c to bdd1590 Compare September 6, 2025 11:52
@N11cc00
Copy link
Copy Markdown
Contributor Author

N11cc00 commented Sep 6, 2025

I have changed the script and pushed a new commit. @crasbe

Copy link
Copy Markdown
Contributor

@crasbe crasbe left a comment

Choose a reason for hiding this comment

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

The script does not seem to work 100% reliably yet. Please go through the files again and check for leftover #defines and double blank linkes. I'm not sure why the one case did not get picked up by the static test.

I did not check all files yet, because it appears like the leftover #defines were kind of a pattern.

@N11cc00
Copy link
Copy Markdown
Contributor Author

N11cc00 commented Sep 6, 2025

I messed something up with my script. I fixed that bug and now the guards should be replaced correctly.

Copy link
Copy Markdown
Contributor

@crasbe crasbe left a comment

Choose a reason for hiding this comment

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

Thanks for fixing all the rest of the files. You can squash the changes now :)

@crasbe crasbe enabled auto-merge September 8, 2025 13:27
@crasbe crasbe added this pull request to the merge queue Sep 8, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 8, 2025
@crasbe crasbe added this pull request to the merge queue Sep 8, 2025
Merged via the queue into RIOT-OS:master with commit 8c12a06 Sep 8, 2025
25 checks passed
@benpicco benpicco added this to the Release 2025.10 milestone Dec 3, 2025
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 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.

4 participants