Skip to content

samples: Improved overlay search#398

Open
soburi wants to merge 1 commit intoarduino:mainfrom
soburi:samples_path_search_improvement
Open

samples: Improved overlay search#398
soburi wants to merge 1 commit intoarduino:mainfrom
soburi:samples_path_search_improvement

Conversation

@soburi
Copy link

@soburi soburi commented Mar 17, 2026

Directories and filenames are now searched in the following order:

  • ${board}_${qualifier}_${revision}
  • ${board}_${qualifier}
  • ${board}

Directories and filenames are now searched in the following order:

- ${board}_${qualifier}_${revision}
- ${board}_${qualifier}
- ${board}

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Copilot AI review requested due to automatic review settings March 17, 2026 19:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates multiple Zephyr sample CMakeLists.txt files to locate the correct board “variant” directory and device-tree overlay file more flexibly, including support for board-revision-specific variant/overlay naming.

Changes:

  • Add variant directory selection logic with fallbacks (${NORMALIZED_BOARD_TARGET}_${BOARD_REVISION}${NORMALIZED_BOARD_TARGET}${BOARD}).
  • Add overlay selection logic with fallbacks (${NORMALIZED_BOARD_TARGET}_${BOARD_REVISION}.overlay${NORMALIZED_BOARD_TARGET}.overlay${BOARD}.overlay).
  • Apply the same overlay-resolution pattern across multiple samples.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
samples/threads_arduino/CMakeLists.txt Add variant dir + overlay fallback selection (incl. board revision).
samples/spi_controller/CMakeLists.txt Add variant dir + overlay fallback selection (incl. board revision).
samples/serial_event/CMakeLists.txt Add variant dir + overlay fallback selection (incl. board revision).
samples/i2cdemo/CMakeLists.txt Add variant dir + overlay fallback selection (incl. board revision).
samples/hello_arduino/CMakeLists.txt Add variant dir + overlay fallback selection (incl. board revision).
samples/fade/CMakeLists.txt Add variant dir + overlay fallback selection (incl. board revision).
samples/button_press_led/CMakeLists.txt Add variant dir + overlay fallback selection (incl. board revision).
samples/blinky_arduino/CMakeLists.txt Add variant dir + overlay fallback selection (incl. board revision).
samples/attach_interrupt/CMakeLists.txt Add variant dir + overlay fallback selection (incl. board revision).
samples/analog_input/CMakeLists.txt Add variant dir + overlay fallback selection (incl. board revision).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@soburi soburi closed this Mar 17, 2026
@soburi soburi reopened this Mar 17, 2026
@github-actions
Copy link

Built 0.53.2-0.dev+5fccd7f5

CI run PASSED 🟢

ArtifactBoardCoreTestsRAMSketchesWarningsErrors
zephyr_contrib ek_ra8d1 📗

11.9%

2--
frdm_mcxn947 3 🏷️

58.0%

2--
frdm_rw612 1 🏷️

83.0%

2--
✔️* zephyr_main giga 4 🏷️ ✅*

54.5%

448-
nano33ble 1 🏷️ ✅*

78.7%

228-
nano_matter 📗 ✔️*

⚠️ 85.7%

208(2*)
niclasense 2 🏷️ ✅*

⚠️ 87.3%

208-
opta 4 🏷️ ✔️*

46.7%

548(2*)
portentac33 3 🏷️ ✔️*

⚠️ 95.1%

568(8*)
portentah7 3 🏷️ ✔️*

47.3%

588(2*)
✅* zephyr_unoq unoq 📗 ✅*

26.4%

608-
Legend

BoardTestStatus description
🔥 🔥 Test run failed to complete.
🔴 Test completed with unexpected errors.
✔️* 🚫 Test completed with errors, but all are known/expected.
✅* 🟡 Test completed with some warnings; no errors detected.
🟢 Test passed successfully, with no warnings or errors.
🌑 🌑 Test was skipped.

@CLAassistant
Copy link

CLAassistant commented Mar 18, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants