From 1292f3f31848e68f699ae8b732ec58bb5038d931 Mon Sep 17 00:00:00 2001 From: Ilya Zlobintsev Date: Sat, 1 Feb 2025 20:37:14 +0200 Subject: [PATCH] chore: bump version, update tests --- Cargo.lock | 12 +++++----- lact-cli/Cargo.toml | 2 +- lact-client/Cargo.toml | 2 +- lact-daemon/Cargo.toml | 2 +- .../lact_daemon__tests__intel__a380-i915.snap | 5 ++++ .../lact_daemon__tests__intel__a380-xe.snap | 5 ++++ .../lact_daemon__tests__intel__cometlake.snap | 5 ++++ .../lact_daemon__tests__intel__tigerlake.snap | 5 ++++ lact-gui/Cargo.toml | 4 ++-- lact-schema/Cargo.toml | 2 +- lact-schema/src/request.rs | 23 +++++++++++++++++++ lact/Cargo.toml | 2 +- pkg/recipes/lact-headless/recipe.yml | 2 +- pkg/recipes/lact-libadwaita/recipe.yml | 2 +- pkg/recipes/lact/recipe.yml | 2 +- 15 files changed, 59 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f4ea680..62d624c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1279,7 +1279,7 @@ dependencies = [ [[package]] name = "lact" -version = "0.7.0" +version = "0.7.1" dependencies = [ "anyhow", "lact-cli", @@ -1290,7 +1290,7 @@ dependencies = [ [[package]] name = "lact-cli" -version = "0.7.0" +version = "0.7.1" dependencies = [ "anyhow", "lact-client", @@ -1300,7 +1300,7 @@ dependencies = [ [[package]] name = "lact-client" -version = "0.7.0" +version = "0.7.1" dependencies = [ "amdgpu-sysfs", "anyhow", @@ -1315,7 +1315,7 @@ dependencies = [ [[package]] name = "lact-daemon" -version = "0.7.0" +version = "0.7.1" dependencies = [ "amdgpu-sysfs", "anyhow", @@ -1352,7 +1352,7 @@ dependencies = [ [[package]] name = "lact-gui" -version = "0.7.0" +version = "0.7.1" dependencies = [ "amdgpu-sysfs", "anyhow", @@ -1376,7 +1376,7 @@ dependencies = [ [[package]] name = "lact-schema" -version = "0.7.0" +version = "0.7.1" dependencies = [ "amdgpu-sysfs", "anyhow", diff --git a/lact-cli/Cargo.toml b/lact-cli/Cargo.toml index 2872da1..4749daa 100644 --- a/lact-cli/Cargo.toml +++ b/lact-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lact-cli" -version = "0.7.0" +version = "0.7.1" edition = "2021" [dependencies] diff --git a/lact-client/Cargo.toml b/lact-client/Cargo.toml index 0231949..e642e3d 100644 --- a/lact-client/Cargo.toml +++ b/lact-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lact-client" -version = "0.7.0" +version = "0.7.1" edition = "2021" [dependencies] diff --git a/lact-daemon/Cargo.toml b/lact-daemon/Cargo.toml index 8320e7c..9f7d116 100644 --- a/lact-daemon/Cargo.toml +++ b/lact-daemon/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lact-daemon" -version = "0.7.0" +version = "0.7.1" edition = "2021" [features] diff --git a/lact-daemon/src/tests/snapshots/lact_daemon__tests__intel__a380-i915.snap b/lact-daemon/src/tests/snapshots/lact_daemon__tests__intel__a380-i915.snap index e529117..7451e54 100644 --- a/lact-daemon/src/tests/snapshots/lact_daemon__tests__intel__a380-i915.snap +++ b/lact-daemon/src/tests/snapshots/lact_daemon__tests__intel__a380-i915.snap @@ -20,6 +20,11 @@ expression: device_info "info": { "driver": "i915", "drm_info": { + "memory_info": { + "cpu_accessible_total": 0, + "cpu_accessible_used": 0, + "resizeable_bar": true + }, "vram_clock_ratio": 1.0 }, "link_info": {}, diff --git a/lact-daemon/src/tests/snapshots/lact_daemon__tests__intel__a380-xe.snap b/lact-daemon/src/tests/snapshots/lact_daemon__tests__intel__a380-xe.snap index 34e3f92..1ce6117 100644 --- a/lact-daemon/src/tests/snapshots/lact_daemon__tests__intel__a380-xe.snap +++ b/lact-daemon/src/tests/snapshots/lact_daemon__tests__intel__a380-xe.snap @@ -20,6 +20,11 @@ expression: device_info "info": { "driver": "xe", "drm_info": { + "memory_info": { + "cpu_accessible_total": 0, + "cpu_accessible_used": 0, + "resizeable_bar": true + }, "vram_clock_ratio": 1.0 }, "link_info": {}, diff --git a/lact-daemon/src/tests/snapshots/lact_daemon__tests__intel__cometlake.snap b/lact-daemon/src/tests/snapshots/lact_daemon__tests__intel__cometlake.snap index b47eb05..b3c7572 100644 --- a/lact-daemon/src/tests/snapshots/lact_daemon__tests__intel__cometlake.snap +++ b/lact-daemon/src/tests/snapshots/lact_daemon__tests__intel__cometlake.snap @@ -20,6 +20,11 @@ expression: device_info "info": { "driver": "i915", "drm_info": { + "memory_info": { + "cpu_accessible_total": 0, + "cpu_accessible_used": 0, + "resizeable_bar": true + }, "vram_clock_ratio": 1.0 }, "link_info": {}, diff --git a/lact-daemon/src/tests/snapshots/lact_daemon__tests__intel__tigerlake.snap b/lact-daemon/src/tests/snapshots/lact_daemon__tests__intel__tigerlake.snap index 7857fef..417029e 100644 --- a/lact-daemon/src/tests/snapshots/lact_daemon__tests__intel__tigerlake.snap +++ b/lact-daemon/src/tests/snapshots/lact_daemon__tests__intel__tigerlake.snap @@ -20,6 +20,11 @@ expression: device_info "info": { "driver": "xe", "drm_info": { + "memory_info": { + "cpu_accessible_total": 0, + "cpu_accessible_used": 0, + "resizeable_bar": true + }, "vram_clock_ratio": 1.0 }, "link_info": {}, diff --git a/lact-gui/Cargo.toml b/lact-gui/Cargo.toml index e9138d7..b746f70 100644 --- a/lact-gui/Cargo.toml +++ b/lact-gui/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lact-gui" -version = "0.7.0" +version = "0.7.1" authors = ["Ilya Zlobintsev "] edition = "2021" @@ -21,7 +21,7 @@ tracing-subscriber = { workspace = true } chrono = { workspace = true } gtk = { version = "0.9", package = "gtk4", features = ["v4_6", "blueprint"] } -adw = { package = "libadwaita", version = "0.7.0", features = [ +adw = { package = "libadwaita", version = "0.7.1", features = [ "v1_4", ], optional = true } relm4 = { version = "0.9.0", default-features = false } diff --git a/lact-schema/Cargo.toml b/lact-schema/Cargo.toml index 34e176a..de4c782 100644 --- a/lact-schema/Cargo.toml +++ b/lact-schema/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lact-schema" -version = "0.7.0" +version = "0.7.1" edition = "2021" [features] diff --git a/lact-schema/src/request.rs b/lact-schema/src/request.rs index ee24e80..af15522 100644 --- a/lact-schema/src/request.rs +++ b/lact-schema/src/request.rs @@ -146,3 +146,26 @@ impl fmt::Display for ProfileBase { text.fmt(f) } } + +#[cfg(test)] +mod tests { + use crate::{ + request::{ClockspeedType, SetClocksCommand}, + Request, + }; + + #[test] + fn deserialize_requests() { + assert_eq!( + Request::SetClocksValue { + id: "asd", + command: SetClocksCommand { + r#type: ClockspeedType::MaxCoreClock, + value: Some(2000) + } + }, + serde_json::from_str(r#"{"command": "set_clocks_value", "args": {"id": "asd", "command": {"type": "max_core_clock", "value": 2000}}}"#) + .unwrap() + ); + } +} diff --git a/lact/Cargo.toml b/lact/Cargo.toml index 2669ad3..7d114cc 100644 --- a/lact/Cargo.toml +++ b/lact/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lact" -version = "0.7.0" +version = "0.7.1" edition = "2021" [features] diff --git a/pkg/recipes/lact-headless/recipe.yml b/pkg/recipes/lact-headless/recipe.yml index fadf29b..a56c248 100644 --- a/pkg/recipes/lact-headless/recipe.yml +++ b/pkg/recipes/lact-headless/recipe.yml @@ -3,7 +3,7 @@ metadata: description: AMDGPU control utility arch: x86_64 license: MIT - version: 0.7.0 + version: 0.7.1 maintainer: ilya-zlobintsev url: https://github.com/ilya-zlobintsev/lact source: diff --git a/pkg/recipes/lact-libadwaita/recipe.yml b/pkg/recipes/lact-libadwaita/recipe.yml index c01ba21..3375248 100644 --- a/pkg/recipes/lact-libadwaita/recipe.yml +++ b/pkg/recipes/lact-libadwaita/recipe.yml @@ -3,7 +3,7 @@ metadata: description: AMDGPU control utility arch: x86_64 license: MIT - version: 0.7.0 + version: 0.7.1 maintainer: ilya-zlobintsev url: https://github.com/ilya-zlobintsev/lact source: diff --git a/pkg/recipes/lact/recipe.yml b/pkg/recipes/lact/recipe.yml index 5ab111a..aebddc1 100644 --- a/pkg/recipes/lact/recipe.yml +++ b/pkg/recipes/lact/recipe.yml @@ -3,7 +3,7 @@ metadata: description: AMDGPU control utility arch: x86_64 license: MIT - version: 0.7.0 + version: 0.7.1 maintainer: ilya-zlobintsev url: https://github.com/ilya-zlobintsev/lact source: