Repository navigation
fix(tests): build the eRemote and eWiFi tests only with connectivity apps - #57
Conversation
…apps tests/CMakeLists.txt linked test_eremote, test_ewifi and test_ewifi_shellsafe against eremote and ewifi in every configuration, but those libraries only exist when EAPPS_BUILD_CONNECTIVITY is ON. A BUILD_TESTING=ON build of any other single category failed to link with "library 'eremote' not found" and "library 'ewifi' not found". Wrap the three tests in if(EAPPS_BUILD_CONNECTIVITY) and print a status line when they are skipped.
|
ⓘ Your Qodo trial ends soon. Ask your workspace admin to set up billing to keep reviews running after the trial. Manage billing |
You've used all your free Kodus-paid PR reviews 🎁Your trial is still active — this just means the PR reviews we cover during the trial are used up. Connect your own AI key to keep Kody reviewing — unlimited reviews, on any plan (Free included). Want more trial reviews to finish evaluating before adding a key? Talk to our founders. 😎 |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Reviewer's GuideConfigurationGate the eRemote and eWiFi test targets on
DocumentationRecord the connectivity-only test build fix in the changelog.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
PR Summary by QodoBuild eRemote and eWiFi tests only with connectivity apps
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Linked issuesChecked at commit fde3553 #56 [BUG] Test build fails to link unless the connectivity apps are enabled (library 'eremote' / 'ewifi' not found) · 3 of 3 met
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="tests/CMakeLists.txt" line_range="26" />
<code_context>
+# adds apps/eremote and apps/ewifi when EAPPS_BUILD_CONNECTIVITY is ON, so their
+# tests can only be built then. Otherwise the linker is handed the bare names
+# "eremote" and "ewifi" and fails with "library not found".
+if(EAPPS_BUILD_CONNECTIVITY)
+ # eRemote engine tests
+ add_executable(test_eremote test_eremote.c)
</code_context>
<issue_to_address>
**Category link failure can recur unnoticed**
When a later change removes or bypasses the connectivity guard, the category CI job configures without `BUILD_TESTING`, and no committed check builds a non-connectivity category with tests enabled. Removing this guard would therefore restore the link failure without CI detecting it.
Add an automated test-enabled non-connectivity category build to CI so this configuration is checked for link failures.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: tests/CMakeLists.txt:26
| # adds apps/eremote and apps/ewifi when EAPPS_BUILD_CONNECTIVITY is ON, so their | ||
| # tests can only be built then. Otherwise the linker is handed the bare names | ||
| # "eremote" and "ewifi" and fails with "library not found". | ||
| if(EAPPS_BUILD_CONNECTIVITY) |
There was a problem hiding this comment.
🟡 Medium · Category link failure can recur unnoticed
When a later change removes or bypasses the connectivity guard, the category CI job configures without BUILD_TESTING, and no committed check builds a non-connectivity category with tests enabled. Removing this guard would therefore restore the link failure without CI detecting it.
Add an automated test-enabled non-connectivity category build to CI so this configuration is checked for link failures.
Prompt for AI agents
In `tests/CMakeLists.txt` at line 26:
**Category link failure can recur unnoticed**
When a later change removes or bypasses the connectivity guard, the category CI job configures without `BUILD_TESTING`, and no committed check builds a non-connectivity category with tests enabled. Removing this guard would therefore restore the link failure without CI detecting it.
Add an automated test-enabled non-connectivity category build to CI so this configuration is checked for link failures.From TESTING.md L12:
- **Regression** — every fixed defect gets a test that would have caught it.|
Premise: pass — master tests/CMakeLists.txt:23-44 built test_eremote/test_ewifi/test_ewifi_shellsafe unconditionally linking eremote/ewifi, while top-level CMakeLists.txt:130-138 adds apps/eremote + apps/ewifi only under EAPPS_BUILD_CONNECTIVITY; with connectivity off the link failed. |
Pull Request
Closing issue
Fixes #56
Description
A
BUILD_TESTING=ONbuild of any app category other than connectivity failed to link withlibrary 'eremote' not foundandlibrary 'ewifi' not found.tests/CMakeLists.txtbuilttest_eremote,test_ewifiandtest_ewifi_shellsafein every configuration, but theeremoteandewifilibraries only exist whenEAPPS_BUILD_CONNECTIVITYis ON.This PR builds those three tests only when
EAPPS_BUILD_CONNECTIVITYis ON, the same waytest_app_lifecyclealready links only the enabled categories. When the option is OFF, CMake printstest_eremote, test_ewifi, test_ewifi_shellsafe skipped: EAPPS_BUILD_CONNECTIVITY is OFF.Motivation
Building and testing one category on its own is a supported configuration:
ci.ymlhas a job for each category, and theEAPPS_BUILD_<CATEGORY>options exist for it. With tests enabled, every such build except connectivity failed. Details are in the linked issue.Changes
tests/CMakeLists.txt: the three eRemote/eWiFi test targets are wrapped inif(EAPPS_BUILD_CONNECTIVITY), with a status message in theelse()branch. The targets themselves are unchanged.CHANGELOG.md:[Unreleased]/ Fixed entry, asCONTRIBUTING.mdasks.No app or test source changes.
Testing
Run on macOS 26 arm64, Apple clang 21.0.0, CMake 4.4.2, LVGL
release/v9.2(FetchContent),-j2, at commitfde3553. Single-category builds use-DBUILD_TESTING=ON -DEAPPS_BUILD_SUITE=OFFwith the other five categories OFF. Log paths are shortened to<repo>.3bb39d9(productivity, media, games, security, web)cmake -B b -DBUILD_TESTING=ON -DEAPPS_BUILD_SUITE=OFF -DEAPPS_BUILD_<ONE>=ON(others OFF), thencmake --build b -j2ld: library 'eremote' not found(and'ewifi'where the build got that far), exit 2ctest --output-on-failureEAPPS_BUILD_CONNECTIVITY=ONtest_eremote,test_ewifiandtest_ewifi_shellsafecmake -B b -DBUILD_TESTING=ON && cmake --build b -j2 && ctest --output-on-failureci.yml)python3 scripts/validate_apps.py data/apps.json;python3 -m unittest discover -s tests -p "test_app_metadata.py"git diff --check HEAD~1 HEADclang-format,cppcheck,clang-tidyNote: the
Category (...)jobs inci.ymlbuild each category with tests off (no-DBUILD_TESTING=ON), so CI did not catch this and would not catch a recurrence. Adding-DBUILD_TESTING=ONandctestto that matrix is a possible follow-up, kept out of this PR.The image shows the five single-category builds on master and on this branch, and the connectivity-only and full builds on this branch:
Checklist
ctest --test-dir build --output-on-failure)clang-format): no C code changedcppcheck,clang-tidy): NOT RUN, no C code changedSummary by Sourcery
Bug Fixes:
Summary by CodeRabbit