Skip to content

fix(tests): build the eRemote and eWiFi tests only with connectivity apps - #57

Merged
Aswin-V merged 1 commit into
masterfrom
fix/tests-link-enabled-categories
Nov 10, 2026
Merged

Aswin-V merged 1 commit into
masterfrom
fix/tests-link-enabled-categories

Conversation

@Kartikey1306

@Kartikey1306 Kartikey1306 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

Closing issue

Fixes #56

Description

A BUILD_TESTING=ON build of any app category other than connectivity failed to link with library 'eremote' not found and library 'ewifi' not found. tests/CMakeLists.txt built test_eremote, test_ewifi and test_ewifi_shellsafe in every configuration, but the eremote and ewifi libraries only exist when EAPPS_BUILD_CONNECTIVITY is ON.

This PR builds those three tests only when EAPPS_BUILD_CONNECTIVITY is ON, the same way test_app_lifecycle already links only the enabled categories. When the option is OFF, CMake prints test_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.yml has a job for each category, and the EAPPS_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 in if(EAPPS_BUILD_CONNECTIVITY), with a status message in the else() branch. The targets themselves are unchanged.
  • CHANGELOG.md: [Unreleased] / Fixed entry, as CONTRIBUTING.md asks.

No app or test source changes.

Testing

  • Unit tests added/updated: not applicable; the fix is to the build, and it is proved by the builds below
  • Integration tests added/updated
  • Manual testing performed
  • Tested on SDL2 desktop port: SDL2 not installed here; CI runs it
  • Tested on EoS embedded port (if applicable)
  • Tested on Web/WASM port (if applicable)

Run on macOS 26 arm64, Apple clang 21.0.0, CMake 4.4.2, LVGL release/v9.2 (FetchContent), -j2, at commit fde3553. Single-category builds use -DBUILD_TESTING=ON -DEAPPS_BUILD_SUITE=OFF with the other five categories OFF. Log paths are shortened to <repo>.

Check Command Result
Each single category except connectivity, master 3bb39d9 (productivity, media, games, security, web) cmake -B b -DBUILD_TESTING=ON -DEAPPS_BUILD_SUITE=OFF -DEAPPS_BUILD_<ONE>=ON (others OFF), then cmake --build b -j2 FAIL as expected, all five: ld: library 'eremote' not found (and 'ewifi' where the build got that far), exit 2
Each single category except connectivity, this branch same, then ctest --output-on-failure PASS, all five: skip message printed; build exit 0; 8/8 tests passed
Connectivity only, this branch same with only EAPPS_BUILD_CONNECTIVITY=ON PASS: build exit 0; 11/11 tests passed, including test_eremote, test_ewifi and test_ewifi_shellsafe
All categories (default options), this branch cmake -B b -DBUILD_TESTING=ON && cmake --build b -j2 && ctest --output-on-failure PASS: build exit 0; 11/11 tests passed, the same 11 as master
Catalogue validator (as in ci.yml) python3 scripts/validate_apps.py data/apps.json; python3 -m unittest discover -s tests -p "test_app_metadata.py" PASS: 124 apps valid; 18 tests OK (unaffected by this change)
Whitespace git diff --check HEAD~1 HEAD PASS
clang-format, cppcheck, clang-tidy NOT RUN: no C code changed
Linux and Windows builds NOT RUN locally: macOS only here; CI runs them
CI (Native ×3 OS incl. MSVC, Sanitizers, categories) GitHub Actions NOT RUN locally (runs on this PR)

Note: the Category (...) jobs in ci.yml build each category with tests off (no -DBUILD_TESTING=ON), so CI did not catch this and would not catch a recurrence. Adding -DBUILD_TESTING=ON and ctest to 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:

single-category test build before and after

Checklist

  • Tests pass (ctest --test-dir build --output-on-failure)
  • Code formatted (clang-format): no C code changed
  • Static analysis clean (cppcheck, clang-tidy): NOT RUN, no C code changed
  • Documentation updated (if applicable): not applicable
  • Changelog entry added (if applicable)

Summary by Sourcery

Bug Fixes:

  • Build eRemote and eWiFi tests only when connectivity apps are enabled, preventing link failures in single-category builds without connectivity.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed build failures when connectivity apps are disabled by skipping the related tests in that configuration.
    • The build now reports when those tests are skipped.

…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.
@qodo-code-review

Copy link
Copy Markdown

ⓘ Your Qodo trial ends soon. Ask your workspace admin to set up billing to keep reviews running after the trial. Manage billing

@kody-ai

kody-ai Bot commented Nov 10, 2026

Copy link
Copy Markdown

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. 😎

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The eRemote and eWiFi test targets are now defined only when EAPPS_BUILD_CONNECTIVITY is enabled. When it is disabled, CMake reports that these tests were skipped. The Unreleased changelog documents the conditional build and the prior link failure.

Changes: Connectivity test build

Layer / File(s) Summary
Conditional connectivity test targets
tests/CMakeLists.txt, CHANGELOG.md
CMake defines and registers the three connectivity test targets only when EAPPS_BUILD_CONNECTIVITY is enabled. Otherwise, it reports that the tests were skipped. The changelog records this change and the prior link failure.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: srpatcha

Merge Risk: Minimal · up to fde35

Connectivity tests are skipped when their apps are disabled. No merge-blocking issue is identified.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main change: the eRemote and eWiFi tests build only when connectivity apps are enabled. It is specific and concise.
Linked Issues check Passed Issue #56 requires test-enabled builds to succeed when connectivity is disabled and to build connectivity tests only when their apps are enabled. tests/CMakeLists.txt now adds test_eremote, `test_…
Out of Scope Changes check Passed The changes stay within issue #56. The CHANGELOG.md entry documents the build fix. The CMake change gates only the three connectivity test targets named in the issue. No unrelated changes are report…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Linked Issues check

Explanation

Issue #56 requires test-enabled builds to succeed when connectivity is disabled and to build connectivity tests only when their apps are enabled. tests/CMakeLists.txt now adds test_eremote, test_ewifi, and test_ewifi_shellsafe only when EAPPS_BUILD_CONNECTIVITY is ON, and prints a skip message otherwise. The author reports successful builds and 8/8 tests for each non-connectivity single-category configuration, plus 11/11 tests for connectivity-only and all-category configurations. The existing lifecycle test remains conditioned on enabled categories.

Full details: Out of Scope Changes check

Explanation

The changes stay within issue #56. The CHANGELOG.md entry documents the build fix. The CMake change gates only the three connectivity test targets named in the issue. No unrelated changes are reported.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2f93146b-068b-4e79-854c-776b3d84f846
Commits

Reviewing files that changed from the base of the PR and between 3bb39d9 and fde3553.

Files selected for processing: 2

  • CHANGELOG.md
  • tests/CMakeLists.txt

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@sourcery-ai

sourcery-ai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Configuration

Gate the eRemote and eWiFi test targets on EAPPS_BUILD_CONNECTIVITY so configurations without those app libraries can still build.

  • tests/CMakeLists.txt L22-51, L53 (removed lines)

Documentation

Record the connectivity-only test build fix in the changelog.

  • CHANGELOG.md L11-13

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Build eRemote and eWiFi tests only with connectivity apps

🐞 Bug fix 📝 Documentation 🕐 Less than 10 minutes

Grey Divider

AI Description

• Gate three connectivity tests on the option that builds their required libraries, fixing
 non-connectivity builds.
• Report when those tests are skipped and document the fix in the changelog.
Diagram

graph TD
    C{"Connectivity enabled?"} -->|yes| T["Test configuration"] --> X["Remote WiFi tests"] --> A["Connectivity libraries"]
    C -->|yes| A
    C -->|no| S["Skip status"]
Loading
High-Level Assessment

Keep the option-based guard: it matches the existing condition that creates both libraries and the approach used by the lifecycle test. Conditionally checking for individual targets would add complexity without improving this build configuration.

Files changed (2) +31 / -20

Bug fix (1) +28 / -20
CMakeLists.txtGate eRemote and eWiFi tests on connectivity +28/-20

Gate eRemote and eWiFi tests on connectivity

• Creates and registers test_eremote, test_ewifi, and test_ewifi_shellsafe only when EAPPS_BUILD_CONNECTIVITY is on. Prints a status message when they are skipped; their target definitions are otherwise unchanged.

tests/CMakeLists.txt

Documentation (1) +3 / -0
CHANGELOG.mdDocument the non-connectivity test build fix +3/-0

Document the non-connectivity test build fix

• Adds an Unreleased Fixed entry explaining the missing-library link failures and the new condition for building the three tests.

CHANGELOG.md

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Qodo Logo

@sourcery-ai

sourcery-ai Bot commented Nov 10, 2026

Copy link
Copy Markdown

Linked issues

Checked 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

# Requirement Status Notes
1 Build the eRemote and eWiFi tests only when connectivity apps are enabled. ✅ Met The three test targets are inside if(EAPPS_BUILD_CONNECTIVITY) in tests/CMakeLists.txt.
2 Make test builds succeed for category selections without connectivity while retaining the connectivity tests when that category is enabled. ✅ Met The non-connectivity configurations skip those targets; the PR reports successful builds and tests for five single-category configurations, connectivity-only, and all categories.
3 Build only tests whose apps are enabled. ✅ Met The eRemote/eWiFi tests are gated by the connectivity option, and the existing lifecycle test links only the enabled categories.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread tests/CMakeLists.txt
# 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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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.

@Aswin-V
Aswin-V merged commit e79584d into master Nov 10, 2026
22 checks passed
@Aswin-V
Aswin-V deleted the fix/tests-link-enabled-categories branch November 10, 2026 19:05
@Aswin-V

Aswin-V commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

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.
Contract: n/a — test gating only.
CI: green @fde35533 (22 checks; Category x6 + Native x3 + Sanitizers success; policy success). Follow-up noted: Category CI jobs build with tests off, so no regression coverage for this class.
Integration: Integration-unverified: infra (nightly Unified Build quota failure, 6th night).
Reviewer: loop run 2026-11-10 (stewardship batch 3, premise verified vs live master)
Second look: n/a (not multi-look class)

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.

[BUG] Test build fails to link unless the connectivity apps are enabled (library 'eremote' / 'ewifi' not found)

2 participants