Skip to content

chore: use lizardbyte-common in c++#5356

Merged
ReenigneArcher merged 15 commits into
masterfrom
chore/use-lizardbyte-common-in-c++
Jun 30, 2026
Merged

chore: use lizardbyte-common in c++#5356
ReenigneArcher merged 15 commits into
masterfrom
chore/use-lizardbyte-common-in-c++

Conversation

@ReenigneArcher

@ReenigneArcher ReenigneArcher commented Jun 29, 2026

Copy link
Copy Markdown
Member

Description

Use lizardbyte-common helpers for env functions and test setup. Also updates readme heading per LizardByte/roadmap#168.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 17.85714% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 27.43%. Comparing base (bba6c6c) to head (979e1ea).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/platform/linux/misc.cpp 35.71% 0 Missing and 9 partials ⚠️
src/platform/linux/kwingrab.cpp 0.00% 5 Missing and 2 partials ⚠️
src/platform/linux/wayland.cpp 0.00% 1 Missing and 2 partials ⚠️
src/platform/linux/input/inputtino_seat.cpp 0.00% 1 Missing and 1 partial ⚠️
src/platform/windows/display_base.cpp 0.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5356      +/-   ##
==========================================
- Coverage   27.53%   27.43%   -0.11%     
==========================================
  Files         113      113              
  Lines       25587    25554      -33     
  Branches    11237    11244       +7     
==========================================
- Hits         7046     7011      -35     
+ Misses      15477    15346     -131     
- Partials     3064     3197     +133     
Flag Coverage Δ
Archlinux 0.00% <0.00%> (ø)
FreeBSD-aarch64 ?
FreeBSD-amd64 13.24% <3.84%> (-0.13%) ⬇️
Homebrew-macos-14 21.01% <ø> (-0.05%) ⬇️
Homebrew-macos-15 21.18% <ø> (-0.05%) ⬇️
Homebrew-macos-26 21.29% <ø> (-0.05%) ⬇️
Homebrew-ubuntu-24.04 13.00% <16.00%> (-0.08%) ⬇️
Linux-AppImage 12.34% <16.00%> (-0.09%) ⬇️
Windows-AMD64 15.26% <0.00%> (-0.04%) ⬇️
Windows-ARM64 13.31% <0.00%> (-0.03%) ⬇️
macOS-arm64 19.27% <ø> (-0.04%) ⬇️
macOS-x86_64 18.75% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/common.h 33.59% <ø> (ø)
src/platform/macos/misc.mm 25.51% <ø> (-1.13%) ⬇️
src/platform/windows/misc.cpp 16.05% <ø> (-0.36%) ⬇️
src/platform/linux/input/inputtino_seat.cpp 0.00% <0.00%> (ø)
src/platform/windows/display_base.cpp 36.80% <0.00%> (-0.24%) ⬇️
src/platform/linux/wayland.cpp 2.93% <0.00%> (-0.04%) ⬇️
src/platform/linux/kwingrab.cpp 0.00% <0.00%> (ø)
src/platform/linux/misc.cpp 16.32% <35.71%> (-2.89%) ⬇️

... and 45 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bba6c6c...979e1ea. Read the comment docs.

ReenigneArcher and others added 15 commits June 30, 2026 17:59
Wire `lizardbyte::common` into the build and replace Sunshine’s platform-specific `set_env`/`unset_env` implementations with shared helpers from `lizardbyte-common` (including Linux `append_env` usage for RADV flags). This removes duplicated environment-variable code from platform layers, drops the now-obsolete env wrapper declarations and unit tests, and updates the `third-party/lizardbyte-common` submodule to the revision that provides the shared env utilities.
Switch test infrastructure from the standalone googletest submodule to lizardbyte-common’s bundled GoogleTest and `lizardbyte::test_support`. CMake now enables common test helpers when `BUILD_TESTS` is on, avoids re-adding gtest if it already exists, and removes the `third-party/googletest` submodule. Test fixtures were updated to inherit from `BaseTest` (and `testing::WithParamInterface` for parameterized cases) to align with the shared test framework.
Update `SunshineEventListener` to inherit from `BufferedTestEventListener` and delegate event formatting to the shared base hooks (`logTestEvent`, buffered output getters/clearers). This removes duplicated per-event handling logic in `tests_events.h` while preserving Boost log buffering behavior. The `third-party/lizardbyte-common` submodule is bumped to the revision that provides the new shared listener implementation.
Update `third-party/lizardbyte-common` to commit `d219f38090db20119906c80860833592a6be669a` to pull in the latest upstream changes.
Ensure integration and unit test fixtures invoke BaseTest::SetUp() and BaseTest::TearDown() so shared test initialization/cleanup always runs. This improves test consistency and avoids missing base fixture state. Also applies minor formatting-only cleanup in Windows display_base.cpp.
Bump `third-party/lizardbyte-common` from `d219f380` to `60bf936e` to pull in the latest upstream changes.
Updates the `third-party/lizardbyte-common` submodule reference to commit `3f29834c942d71d626f2daf67323fc61426bf524` from `60bf936e134359c65c8a044369db227f976947e5`.
Replace direct `std::getenv`/custom wrappers with `lizardbyte::common::get_env` across Linux input, KWin grab, misc, and Wayland modules. This removes duplicated env parsing logic, standardizes empty/missing-variable handling, and updates Wayland display connection code to work with the new string-based env access.

Co-Authored-By: Kishi <41839133+Kishi85@users.noreply.github.com>
Switch HOME handling in Linux misc config setup from std::string to fs::path and build fallback/migration paths with path joins. This makes path construction consistent and safer for both the default ~/.config/sunshine location and old-config migration checks.
Use svg icon and badges
Drops the Read the Docs badge from the README status badges and updates the `third-party/lizardbyte-common` submodule to commit `49aa8c6`.
Update `third-party/lizardbyte-common` from `49aa8c60` to `06cd442b` to pull in the latest upstream common-library changes.
@ReenigneArcher ReenigneArcher force-pushed the chore/use-lizardbyte-common-in-c++ branch from 3ddbf5c to 979e1ea Compare June 30, 2026 22:00
@sonarqubecloud

Copy link
Copy Markdown

@ReenigneArcher ReenigneArcher merged commit 09dc9e4 into master Jun 30, 2026
70 of 71 checks passed
@ReenigneArcher ReenigneArcher deleted the chore/use-lizardbyte-common-in-c++ branch June 30, 2026 23:12
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.

c/c++: add env function wrappers for each platform

1 participant