From 5293857394fd2bfd72c4ec9b2b01d5fa6bebeafe Mon Sep 17 00:00:00 2001 From: Sopwit <131982697+Sopwit@users.noreply.github.com> Date: Mon, 30 Mar 2026 17:01:37 +0300 Subject: [PATCH 1/2] fix: stabilize system integration test temp scripts --- tests/test_system_integration.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/test_system_integration.cpp b/tests/test_system_integration.cpp index e25f3b8..fa6b9c8 100644 --- a/tests/test_system_integration.cpp +++ b/tests/test_system_integration.cpp @@ -9,12 +9,22 @@ #include "system/dnfmanager.h" #include "system/polkit.h" +namespace { + +QTemporaryDir createExecutableTempDir() { + const QString basePath = + QDir::cleanPath(QDir::currentPath() + QStringLiteral("/ro-control-test-XXXXXX")); + return QTemporaryDir(basePath); +} + +} + class TestSystemIntegration : public QObject { Q_OBJECT private slots: void testCommandRunnerUsesProgramOverride() { - QTemporaryDir tempDir; + QTemporaryDir tempDir = createExecutableTempDir(); QVERIFY(tempDir.isValid()); const QString scriptPath = tempDir.filePath(QStringLiteral("fake-dnf.sh")); @@ -37,7 +47,7 @@ private slots: } void testCapabilityProbeUsesProgramOverride() { - QTemporaryDir tempDir; + QTemporaryDir tempDir = createExecutableTempDir(); QVERIFY(tempDir.isValid()); const QString scriptPath = From 66955ae32ed3c2c408a3ebb071ac9d39521cf951 Mon Sep 17 00:00:00 2001 From: Sopwit <131982697+Sopwit@users.noreply.github.com> Date: Mon, 30 Mar 2026 17:21:45 +0300 Subject: [PATCH 2/2] release: prepare 0.2.0 Fedora KDE build and CI fixes --- .github/workflows/ci.yml | 15 +- .github/workflows/release.yml | 13 +- CHANGELOG.md | 12 ++ CMakeLists.txt | 23 +-- ...github.projectroasd.rocontrol.metainfo.xml | 2 +- docs/man/ro-control.1 | 2 +- packaging/rpm/README.md | 2 +- packaging/rpm/ro-control.spec | 7 +- src/main.cpp | 2 +- src/qml/Main.qml | 48 +++++- src/qml/pages/DriverPage.qml | 15 +- src/qml/pages/MonitorPage.qml | 2 + src/qml/pages/SettingsPage.qml | 157 ++++++++++++++++++ tests/test_cli.cpp | 38 ++--- tests/test_metadata.cpp | 8 + tests/test_system_integration.cpp | 10 ++ 16 files changed, 309 insertions(+), 47 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef845cc..72f1d11 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: push: - branches: [main, dev, feature/**, fix/**] + branches: [main, dev, feat/**, feature/**, fix/**, hotfix/**, chore/**] pull_request: branches: [main, dev] @@ -42,7 +42,9 @@ jobs: kf6-qqc2-desktop-style \ polkit-devel \ clang-tools-extra \ - qt6-qtbase-private-devel + qt6-qtbase-private-devel \ + desktop-file-utils \ + appstream - name: Configure (CMake) run: | @@ -58,6 +60,11 @@ jobs: - name: Run tests run: ctest --test-dir build --output-on-failure + - name: Validate desktop metadata + run: | + desktop-file-validate data/icons/io.github.projectroasd.rocontrol.desktop + appstreamcli validate --no-net data/icons/io.github.projectroasd.rocontrol.metainfo.xml + - name: Check formatting (clang-format) run: | find src \( -name "*.cpp" -o -name "*.h" \) -print0 | \ @@ -92,12 +99,14 @@ jobs: polkit-devel - name: Prepare source tarball + id: prep run: | VERSION="$(sed -n 's/^[[:space:]]*VERSION[[:space:]]\([0-9.][0-9.]*\)$/\1/p' CMakeLists.txt | head -n1)" if [[ -z "${VERSION}" ]]; then echo "Failed to read project version from CMakeLists.txt" >&2 exit 1 fi + echo "version=${VERSION}" >> "${GITHUB_OUTPUT}" ARCHIVE_BASENAME="ro-control-${VERSION}" mkdir -p ~/rpmbuild/SOURCES ~/rpmbuild/SPECS STAGE_DIR="$(mktemp -d)" @@ -113,7 +122,7 @@ jobs: run: | rpmbuild -ba "${HOME}/rpmbuild/SPECS/ro-control.spec" \ --define "_topdir ${HOME}/rpmbuild" \ - --define "upstream_version ${VERSION}" + --define "upstream_version ${{ steps.prep.outputs.version }}" - name: Lint built RPMs run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 399ab30..e5e9a8f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -128,7 +128,9 @@ jobs: qt6-qttools-devel \ qt6-qtwayland-devel \ kf6-qqc2-desktop-style \ - polkit-devel + polkit-devel \ + desktop-file-utils \ + appstream - name: Build RPM artifacts env: @@ -164,6 +166,12 @@ jobs: rpm -qp --info "${RPM_FILE}" > "dist/rpm/ro-control-${VERSION}-${RPM_ARCH}-info.txt" rpm -qp --requires "${RPM_FILE}" | sort > "dist/rpm/ro-control-${VERSION}-${RPM_ARCH}-requires.txt" + rpm -qlp "${RPM_FILE}" | sort > "dist/rpm/ro-control-${VERSION}-${RPM_ARCH}-files.txt" + + - name: Validate desktop metadata + run: | + desktop-file-validate data/icons/io.github.projectroasd.rocontrol.desktop + appstreamcli validate --no-net data/icons/io.github.projectroasd.rocontrol.metainfo.xml - name: Install and smoke-test RPM env: @@ -201,6 +209,7 @@ jobs: RPM_FILE="$(find dist/rpm -maxdepth 1 -type f -name "*.${RPM_ARCH}.rpm" | head -n1)" INFO_FILE="dist/rpm/ro-control-${VERSION}-${RPM_ARCH}-info.txt" REQUIRES_FILE="dist/rpm/ro-control-${VERSION}-${RPM_ARCH}-requires.txt" + FILES_FILE="dist/rpm/ro-control-${VERSION}-${RPM_ARCH}-files.txt" CHECKSUM_FILE="dist/rpm/ro-control-${VERSION}-${RPM_ARCH}-SHA256SUMS.txt" BUNDLE_DIR="dist/release/ro-control-${VERSION}-${RPM_ARCH}" BUNDLE_NAME="ro-control-${VERSION}-${RPM_ARCH}-fedora42.tar.gz" @@ -214,6 +223,7 @@ jobs: cp "${RPM_FILE}" "${BUNDLE_DIR}/" cp "${INFO_FILE}" "${BUNDLE_DIR}/" cp "${REQUIRES_FILE}" "${BUNDLE_DIR}/" + cp "${FILES_FILE}" "${BUNDLE_DIR}/" cp "${CHECKSUM_FILE}" "${BUNDLE_DIR}/" tar -C dist/release -czf "dist/release/${BUNDLE_NAME}" "ro-control-${VERSION}-${RPM_ARCH}" @@ -254,4 +264,5 @@ jobs: dist/*SHA256SUMS.txt dist/*-requires.txt dist/*-info.txt + dist/*-files.txt dist/*-fedora42.tar.gz diff --git a/CHANGELOG.md b/CHANGELOG.md index 01c7128..ce25c79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.2.0] - 2026-03-30 + +### Changed +- KDE desktop preferences now apply at runtime, including saved theme mode selection +- Fedora CI now validates desktop/AppStream metadata and follows `feat/*` branches +- Release packaging now records installed RPM file manifests for smoke validation + +### Fixed +- Installed builds now resolve the privileged helper from the correct libexec path +- RPM CI now propagates the detected project version correctly into `rpmbuild` +- System integration tests no longer depend on executable `/tmp` mounts + ### Added - NVIDIA detection pipeline with driver/module verification report - Secure Boot detection and session type (Wayland/X11) detection diff --git a/CMakeLists.txt b/CMakeLists.txt index f378c9d..aa7e9a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.22) project(ro-control - VERSION 0.1.0 + VERSION 0.2.0 DESCRIPTION "Smart NVIDIA Driver Manager & System Monitor for Linux" HOMEPAGE_URL "https://github.com/Project-Ro-ASD/ro-Control" LANGUAGES CXX @@ -83,6 +83,16 @@ set(APP_SOURCES src/cli/cli.cpp ) +# ─── Install Paths ──────────────────────────────────────────────────────────── +include(GNUInstallDirs) + +set(RO_CONTROL_HELPER_INSTALL_PATH + "${CMAKE_INSTALL_FULL_LIBEXECDIR}/${RO_CONTROL_HELPER_NAME}" +) +set(RO_CONTROL_POLICY_BUILD_PATH + "${CMAKE_CURRENT_BINARY_DIR}/io.github.ProjectRoASD.rocontrol.policy" +) + # ─── QML Resources ──────────────────────────────────────────────────────────── add_library(ro-control-backend STATIC ${BACKEND_SOURCES}) @@ -173,16 +183,6 @@ target_compile_options(ro-control PRIVATE $<$:-O2> ) -# ─── Install Targets ────────────────────────────────────────────────────────── -include(GNUInstallDirs) - -set(RO_CONTROL_HELPER_INSTALL_PATH - "${CMAKE_INSTALL_FULL_LIBEXECDIR}/${RO_CONTROL_HELPER_NAME}" -) -set(RO_CONTROL_POLICY_BUILD_PATH - "${CMAKE_CURRENT_BINARY_DIR}/io.github.ProjectRoASD.rocontrol.policy" -) - # ─── Include Directories ────────────────────────────────────────────────────── target_include_directories(ro-control PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src @@ -191,6 +191,7 @@ target_include_directories(ro-control PRIVATE target_compile_definitions(ro-control PRIVATE RO_CONTROL_POLICY_ID="${RO_CONTROL_POLICY_ID}" + RO_CONTROL_APP_VERSION="${PROJECT_VERSION}" ) configure_file( diff --git a/data/icons/io.github.projectroasd.rocontrol.metainfo.xml b/data/icons/io.github.projectroasd.rocontrol.metainfo.xml index b988bbb..6f23ec8 100644 --- a/data/icons/io.github.projectroasd.rocontrol.metainfo.xml +++ b/data/icons/io.github.projectroasd.rocontrol.metainfo.xml @@ -38,7 +38,7 @@ - + diff --git a/docs/man/ro-control.1 b/docs/man/ro-control.1 index df8934f..343741c 100644 --- a/docs/man/ro-control.1 +++ b/docs/man/ro-control.1 @@ -1,4 +1,4 @@ -.TH RO-CONTROL 1 "March 2026" "ro-control 0.1.0" "User Commands" +.TH RO-CONTROL 1 "March 2026" "ro-control 0.2.0" "User Commands" .SH NAME ro-control \- NVIDIA driver management and diagnostics CLI .SH SYNOPSIS diff --git a/packaging/rpm/README.md b/packaging/rpm/README.md index b260891..adf0a11 100644 --- a/packaging/rpm/README.md +++ b/packaging/rpm/README.md @@ -40,7 +40,7 @@ macro explicitly: ```bash rpmbuild -ba packaging/rpm/ro-control.spec \ - --define "upstream_version 0.1.0" + --define "upstream_version 0.2.0" ``` If you build from a Git checkout instead of a published source archive, create diff --git a/packaging/rpm/ro-control.spec b/packaging/rpm/ro-control.spec index a7e286f..d7b705c 100644 --- a/packaging/rpm/ro-control.spec +++ b/packaging/rpm/ro-control.spec @@ -1,4 +1,4 @@ -%global upstream_version %{!?upstream_version:0.1.0}%{?upstream_version} +%global upstream_version %{!?upstream_version:0.2.0}%{?upstream_version} %global debug_package %{nil} Name: ro-control @@ -76,6 +76,11 @@ tar -xzf %{SOURCE0} --strip-components=1 %{_datadir}/polkit-1/actions/io.github.ProjectRoASD.rocontrol.policy %changelog +* Mon Mar 30 2026 ro-Control Maintainers - 0.2.0-1 +- Fix installed helper path resolution for privileged operations on system installs +- Activate saved KDE-friendly interface preferences and theme switching in the UI +- Harden Fedora CI and release validation for metadata and RPM packaging + * Sun Mar 22 2026 ro-Control Maintainers - 0.1.0-1 - Prepare first GitHub Release RPMs for i686, x86_64, and aarch64 - Add explicit Fedora runtime command dependencies and recommendations diff --git a/src/main.cpp b/src/main.cpp index 2142579..86b7131 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -193,7 +193,7 @@ void configureGuiGraphicsEnvironment() { int main(int argc, char *argv[]) { constexpr auto kApplicationName = "ro-control"; constexpr auto kDisplayName = "ro-Control"; - constexpr auto kApplicationVersion = "0.1.0"; + constexpr auto kApplicationVersion = RO_CONTROL_APP_VERSION; const QString applicationDescription = QStringLiteral("ro-Control GPU driver manager and diagnostics CLI."); diff --git a/src/qml/Main.qml b/src/qml/Main.qml index ac45f90..a09ab1e 100644 --- a/src/qml/Main.qml +++ b/src/qml/Main.qml @@ -12,11 +12,53 @@ ApplicationWindow { title: qsTr("ro-Control") font.family: "Noto Sans" - readonly property string themeMode: "light" - readonly property bool darkMode: false + SystemPalette { + id: systemPalette + colorGroup: SystemPalette.Active + } + + function isColorDark(colorValue) { + return ((0.2126 * colorValue.r) + (0.7152 * colorValue.g) + (0.0722 * colorValue.b)) < 0.5; + } + + readonly property string themeMode: uiPreferences.themeMode + readonly property bool darkMode: themeMode === "dark" + || (themeMode === "system" && root.isColorDark(systemPalette.window)) readonly property bool compactMode: uiPreferences.compactMode readonly property bool showAdvancedInfo: uiPreferences.showAdvancedInfo - readonly property var theme: ({ + readonly property var theme: darkMode ? ({ + window: "#141922", + shell: "#10151d", + card: "#1b2330", + cardStrong: "#212b3a", + border: "#2c3748", + text: "#edf3ff", + textMuted: "#b2bdd1", + textSoft: "#8f9bb1", + accentA: "#7e90ff", + accentB: "#34c7a1", + accentC: "#ffbf47", + success: "#36c691", + warning: "#f2ae2d", + danger: "#f17575", + successBg: "#173529", + warningBg: "#3a2e12", + dangerBg: "#3d2024", + infoBg: "#1c2941", + sidebarBg: "#111722", + sidebarText: "#eef3ff", + sidebarMuted: "#95a3bb", + sidebarAccent: "#7e90ff", + sidebarActive: "#1d2940", + sidebarHover: "#182131", + sidebarBorder: "#253141", + sidebarHint: "#8898b0", + topbarBg: "#171e29", + topbarChip: "#222c3a", + topbarValue: "#eef3ff", + contentBg: "#121822", + contentGlow: "#182131" + }) : ({ window: "#f3f6fb", shell: "#edf2f8", card: "#ffffff", diff --git a/src/qml/pages/DriverPage.qml b/src/qml/pages/DriverPage.qml index d380cd3..28e8e6a 100644 --- a/src/qml/pages/DriverPage.qml +++ b/src/qml/pages/DriverPage.qml @@ -239,6 +239,7 @@ Item { color: page.theme.card border.width: 1 border.color: page.theme.border + opacity: page.backendBusy || !page.canInstallLatestRemoteDriver ? 0.7 : 1.0 implicitHeight: expressColumn.implicitHeight + 34 ColumnLayout { @@ -311,9 +312,12 @@ Item { Label { Layout.fillWidth: true - text: "nvidia-" + page.recommendedVersion + " • " - + (nvidiaDetector.gpuFound ? qsTr("Verified Compatible") : page.detectedHardwareLabel) - color: page.theme.success + text: page.canInstallLatestRemoteDriver + ? "nvidia-" + page.recommendedVersion + " • " + qsTr("Verified Compatible") + : (page.remoteDriverCatalogAvailable + ? qsTr("Compatible NVIDIA hardware not detected") + : qsTr("Scanning the Fedora repositories...")) + color: page.canInstallLatestRemoteDriver ? page.theme.success : page.theme.textMuted font.pixelSize: 13 font.weight: Font.DemiBold elide: Text.ElideRight @@ -324,8 +328,8 @@ Item { MouseArea { anchors.fill: parent - cursorShape: page.backendBusy ? Qt.ArrowCursor : Qt.PointingHandCursor - enabled: !page.backendBusy + cursorShape: !enabled ? Qt.ArrowCursor : Qt.PointingHandCursor + enabled: !page.backendBusy && page.canInstallLatestRemoteDriver onClicked: { page.setOperationState(qsTr("Installer"), qsTr("Installing the proprietary NVIDIA driver (akmod-nvidia)..."), "info", true); nvidiaInstaller.installProprietary(true); @@ -425,6 +429,7 @@ Item { Rectangle { Layout.fillWidth: true Layout.columnSpan: page.wideLayout ? 2 : 1 + visible: page.showAdvancedInfo radius: 26 color: Qt.tint(page.theme.warningBg, page.darkMode ? "#11ffffff" : "#22ffffff") border.width: 1 diff --git a/src/qml/pages/MonitorPage.qml b/src/qml/pages/MonitorPage.qml index b7d47d6..db95b68 100644 --- a/src/qml/pages/MonitorPage.qml +++ b/src/qml/pages/MonitorPage.qml @@ -243,6 +243,7 @@ Item { Label { text: qsTr("System Information") + visible: page.showAdvancedInfo color: page.theme.text font.pixelSize: 28 font.weight: Font.DemiBold @@ -250,6 +251,7 @@ Item { GridLayout { Layout.fillWidth: true + visible: page.showAdvancedInfo columns: 2 columnSpacing: 16 rowSpacing: 16 diff --git a/src/qml/pages/SettingsPage.qml b/src/qml/pages/SettingsPage.qml index b70d699..0e29ea1 100644 --- a/src/qml/pages/SettingsPage.qml +++ b/src/qml/pages/SettingsPage.qml @@ -298,6 +298,111 @@ Item { } } + component PreferenceChoice: Rectangle { + id: preferenceChoice + required property string title + required property string subtitle + required property bool selected + required property var action + + radius: 18 + color: selected ? page.theme.infoBg : page.theme.cardStrong + border.width: selected ? 2 : 1 + border.color: selected ? page.theme.accentA : page.theme.border + implicitHeight: 68 + + ColumnLayout { + anchors.fill: parent + anchors.leftMargin: 16 + anchors.rightMargin: 16 + anchors.topMargin: 12 + anchors.bottomMargin: 12 + spacing: 3 + + Label { + text: preferenceChoice.title + color: page.theme.text + font.pixelSize: 15 + font.weight: Font.DemiBold + } + + Label { + text: preferenceChoice.subtitle + color: page.theme.textSoft + font.pixelSize: 12 + wrapMode: Text.Wrap + } + } + + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: preferenceChoice.action() + } + } + + component PreferenceToggle: Rectangle { + id: preferenceToggle + required property string title + required property string subtitle + required property bool checked + required property var action + + radius: 18 + color: page.theme.cardStrong + border.width: 1 + border.color: page.theme.border + implicitHeight: 76 + + RowLayout { + anchors.fill: parent + anchors.leftMargin: 16 + anchors.rightMargin: 16 + spacing: 14 + + ColumnLayout { + Layout.fillWidth: true + spacing: 2 + + Label { + text: preferenceToggle.title + color: page.theme.text + font.pixelSize: 15 + font.weight: Font.DemiBold + } + + Label { + text: preferenceToggle.subtitle + color: page.theme.textSoft + font.pixelSize: 12 + wrapMode: Text.Wrap + } + } + + Rectangle { + width: 46 + height: 28 + radius: 14 + color: preferenceToggle.checked ? page.theme.accentA : page.theme.border + + Rectangle { + x: preferenceToggle.checked ? parent.width - width - 3 : 3 + y: 3 + width: 22 + height: 22 + radius: 11 + color: "#ffffff" + } + } + } + + MouseArea { + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: preferenceToggle.action() + } + } + ScrollView { id: pageScroll anchors.fill: parent @@ -321,6 +426,58 @@ Item { columnSpacing: 16 rowSpacing: 16 + SectionPanel { + Layout.fillWidth: true + Layout.columnSpan: page.wideLayout ? 2 : 1 + theme: page.theme + title: qsTr("Interface Preferences") + subtitle: qsTr("Control the application appearance and density") + + Flow { + Layout.fillWidth: true + spacing: 12 + + Repeater { + model: uiPreferences.availableThemeModes + + delegate: PreferenceChoice { + width: page.wideLayout ? ((parent.width - 24) / 3) : parent.width + title: modelData.label + subtitle: modelData.code === "system" + ? qsTr("Match the current desktop appearance") + : modelData.code === "dark" + ? qsTr("Use the darker application palette") + : qsTr("Use the brighter application palette") + selected: uiPreferences.themeMode === modelData.code + action: function() { uiPreferences.setThemeMode(modelData.code); } + } + } + } + + PreferenceToggle { + Layout.fillWidth: true + title: qsTr("Compact Layout") + subtitle: qsTr("Reduce outer spacing for denser dashboard layouts") + checked: uiPreferences.compactMode + action: function() { uiPreferences.setCompactMode(!uiPreferences.compactMode); } + } + + PreferenceToggle { + Layout.fillWidth: true + title: qsTr("Show Advanced Information") + subtitle: qsTr("Display expert hardware and diagnostic context across pages") + checked: uiPreferences.showAdvancedInfo + action: function() { uiPreferences.setShowAdvancedInfo(!uiPreferences.showAdvancedInfo); } + } + + ActionButton { + theme: page.theme + text: qsTr("Reset Interface Defaults") + tone: "neutral" + onClicked: uiPreferences.resetToDefaults() + } + } + ColumnLayout { Layout.fillWidth: true spacing: 12 diff --git a/tests/test_cli.cpp b/tests/test_cli.cpp index f6fdfff..bd47489 100644 --- a/tests/test_cli.cpp +++ b/tests/test_cli.cpp @@ -12,7 +12,7 @@ private slots: RoControlCli::parseArguments({QStringLiteral("ro-control"), QStringLiteral("--help")}, QStringLiteral("ro-control"), - QStringLiteral("0.1.0"), + QStringLiteral("0.2.0"), QStringLiteral("CLI test")); QCOMPARE(command.action, RoControlCli::CommandAction::PrintHelp); QVERIFY(command.payload.contains(QStringLiteral("driver install"))); @@ -24,10 +24,10 @@ private slots: RoControlCli::parseArguments({QStringLiteral("ro-control"), QStringLiteral("--version")}, QStringLiteral("ro-control"), - QStringLiteral("0.1.0"), + QStringLiteral("0.2.0"), QStringLiteral("CLI test")); QCOMPARE(command.action, RoControlCli::CommandAction::PrintVersion); - QCOMPARE(command.payload, QStringLiteral("0.1.0")); + QCOMPARE(command.payload, QStringLiteral("0.2.0")); } void testJsonRequiresDiagnostics() { @@ -35,7 +35,7 @@ private slots: RoControlCli::parseArguments({QStringLiteral("ro-control"), QStringLiteral("--json")}, QStringLiteral("ro-control"), - QStringLiteral("0.1.0"), + QStringLiteral("0.2.0"), QStringLiteral("CLI test")); QCOMPARE(command.action, RoControlCli::CommandAction::Invalid); QVERIFY(command.payload.contains(QStringLiteral("--json"))); @@ -46,7 +46,7 @@ private slots: RoControlCli::parseArguments({QStringLiteral("ro-control"), QStringLiteral("status")}, QStringLiteral("ro-control"), - QStringLiteral("0.1.0"), + QStringLiteral("0.2.0"), QStringLiteral("CLI test")); QCOMPARE(command.action, RoControlCli::CommandAction::PrintStatusText); } @@ -57,7 +57,7 @@ private slots: QStringLiteral("status"), QStringLiteral("--json")}, QStringLiteral("ro-control"), - QStringLiteral("0.1.0"), + QStringLiteral("0.2.0"), QStringLiteral("CLI test")); QCOMPARE(command.action, RoControlCli::CommandAction::PrintStatusJson); } @@ -67,7 +67,7 @@ private slots: RoControlCli::parseArguments({QStringLiteral("ro-control"), QStringLiteral("diagnostics")}, QStringLiteral("ro-control"), - QStringLiteral("0.1.0"), + QStringLiteral("0.2.0"), QStringLiteral("CLI test")); QCOMPARE(command.action, RoControlCli::CommandAction::PrintDiagnosticsText); } @@ -78,7 +78,7 @@ private slots: QStringLiteral("diagnostics"), QStringLiteral("--json")}, QStringLiteral("ro-control"), - QStringLiteral("0.1.0"), + QStringLiteral("0.2.0"), QStringLiteral("CLI test")); QCOMPARE(command.action, RoControlCli::CommandAction::PrintDiagnosticsJson); } @@ -89,7 +89,7 @@ private slots: QStringLiteral("--diagnostics"), QStringLiteral("--json")}, QStringLiteral("ro-control"), - QStringLiteral("0.1.0"), + QStringLiteral("0.2.0"), QStringLiteral("CLI test")); QCOMPARE(command.action, RoControlCli::CommandAction::PrintDiagnosticsJson); } @@ -100,7 +100,7 @@ private slots: QStringLiteral("driver"), QStringLiteral("install")}, QStringLiteral("ro-control"), - QStringLiteral("0.1.0"), + QStringLiteral("0.2.0"), QStringLiteral("CLI test")); QCOMPARE(command.action, RoControlCli::CommandAction::InstallProprietaryDriver); @@ -114,7 +114,7 @@ private slots: QStringLiteral("install"), QStringLiteral("--open-source")}, QStringLiteral("ro-control"), - QStringLiteral("0.1.0"), + QStringLiteral("0.2.0"), QStringLiteral("CLI test")); QCOMPARE(command.action, RoControlCli::CommandAction::InstallOpenSourceDriver); @@ -128,7 +128,7 @@ private slots: QStringLiteral("--proprietary"), QStringLiteral("--accept-license")}, QStringLiteral("ro-control"), - QStringLiteral("0.1.0"), + QStringLiteral("0.2.0"), QStringLiteral("CLI test")); QCOMPARE(command.action, RoControlCli::CommandAction::InstallProprietaryDriver); @@ -141,7 +141,7 @@ private slots: QStringLiteral("driver"), QStringLiteral("update")}, QStringLiteral("ro-control"), - QStringLiteral("0.1.0"), + QStringLiteral("0.2.0"), QStringLiteral("CLI test")); QCOMPARE(command.action, RoControlCli::CommandAction::UpdateDriver); } @@ -153,7 +153,7 @@ private slots: QStringLiteral("install"), QStringLiteral("--json")}, QStringLiteral("ro-control"), - QStringLiteral("0.1.0"), + QStringLiteral("0.2.0"), QStringLiteral("CLI test")); QCOMPARE(command.action, RoControlCli::CommandAction::Invalid); QVERIFY(command.payload.contains(QStringLiteral("--json"))); @@ -167,7 +167,7 @@ private slots: QStringLiteral("--proprietary"), QStringLiteral("--open-source")}, QStringLiteral("ro-control"), - QStringLiteral("0.1.0"), + QStringLiteral("0.2.0"), QStringLiteral("CLI test")); QCOMPARE(command.action, RoControlCli::CommandAction::Invalid); QVERIFY(command.payload.contains(QStringLiteral("cannot be used together"))); @@ -176,7 +176,7 @@ private slots: void testRenderDiagnosticsText() { RoControlCli::DiagnosticsSnapshot snapshot; snapshot.applicationName = QStringLiteral("ro-control"); - snapshot.applicationVersion = QStringLiteral("0.1.0"); + snapshot.applicationVersion = QStringLiteral("0.2.0"); snapshot.locale = QStringLiteral("en_US"); snapshot.gpuFound = true; snapshot.gpuName = QStringLiteral("Example GPU"); @@ -193,7 +193,7 @@ private slots: void testRenderStatusText() { RoControlCli::DiagnosticsSnapshot snapshot; snapshot.applicationName = QStringLiteral("ro-control"); - snapshot.applicationVersion = QStringLiteral("0.1.0"); + snapshot.applicationVersion = QStringLiteral("0.2.0"); snapshot.activeDriver = QStringLiteral("Proprietary"); snapshot.updateAvailable = true; @@ -206,7 +206,7 @@ private slots: void testRenderDiagnosticsJsonObject() { RoControlCli::DiagnosticsSnapshot snapshot; snapshot.applicationName = QStringLiteral("ro-control"); - snapshot.applicationVersion = QStringLiteral("0.1.0"); + snapshot.applicationVersion = QStringLiteral("0.2.0"); snapshot.gpuFound = true; snapshot.ramUsagePercent = 42; @@ -221,7 +221,7 @@ private slots: void testRenderStatusJsonObject() { RoControlCli::DiagnosticsSnapshot snapshot; snapshot.applicationName = QStringLiteral("ro-control"); - snapshot.applicationVersion = QStringLiteral("0.1.0"); + snapshot.applicationVersion = QStringLiteral("0.2.0"); snapshot.updateAvailable = true; const QJsonObject object = RoControlCli::renderStatusJsonObject(snapshot); diff --git a/tests/test_metadata.cpp b/tests/test_metadata.cpp index fc0ff70..bbd237c 100644 --- a/tests/test_metadata.cpp +++ b/tests/test_metadata.cpp @@ -70,6 +70,14 @@ private slots: QVERIFY(screenshotRe.match(metainfo).hasMatch()); } + void testAppStreamContainsCurrentReleaseVersion() { + const QString metainfo = readFile(QStringLiteral( + "data/icons/io.github.projectroasd.rocontrol.metainfo.xml")); + QVERIFY(!metainfo.isEmpty()); + QVERIFY(metainfo.contains( + QStringLiteral(""))); + } + void testCliDocumentationAssetsExist() { const QString manPage = readFile(QStringLiteral("docs/man/ro-control.1")); const QString bashCompletion = diff --git a/tests/test_system_integration.cpp b/tests/test_system_integration.cpp index fa6b9c8..8af3e60 100644 --- a/tests/test_system_integration.cpp +++ b/tests/test_system_integration.cpp @@ -165,6 +165,16 @@ private slots: runner.run(QStringLiteral("nvidia-smi"), {QStringLiteral("--help")}); QVERIFY(result.success() || result.exitCode == 0); } + + void testHelperPathsAreCompiledForBuildAndInstallModes() { + const QString helperBuildPath = QStringLiteral(RO_CONTROL_HELPER_BUILD_PATH); + const QString helperInstallPath = + QStringLiteral(RO_CONTROL_HELPER_INSTALL_PATH); + + QVERIFY(!helperBuildPath.trimmed().isEmpty()); + QVERIFY(!helperInstallPath.trimmed().isEmpty()); + QVERIFY(helperInstallPath.contains(QStringLiteral("ro-control-helper"))); + } }; QTEST_MAIN(TestSystemIntegration)