diff --git a/README.md b/README.md index f8afcb1..91b63b3 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Refer to the [releases page](https://github.com/CodSpeedHQ/runner/releases) to s ## Usage > [!NOTE] -> For now, the CLI only supports Ubuntu 20.04, 22.04, and Debian 11, 12. +> For now, the CLI only supports Ubuntu 20.04, 22.04, 24.04 and Debian 11, 12. First, authenticate with your CodSpeed account: diff --git a/src/main.rs b/src/main.rs index a471763..5ffebb0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,7 +16,7 @@ use log::log_enabled; pub const VERSION: &str = env!("CARGO_PKG_VERSION"); pub const MONGODB_TRACER_VERSION: &str = "cs-mongo-tracer-v0.2.0"; -pub const VALGRIND_CODSPEED_VERSION: &str = "3.21.0-0codspeed2"; +pub const VALGRIND_CODSPEED_VERSION: &str = "3.21.0-0codspeed3"; #[tokio::main(flavor = "current_thread")] async fn main() { diff --git a/src/run/check_system.rs b/src/run/check_system.rs index ed15ee0..759bccb 100644 --- a/src/run/check_system.rs +++ b/src/run/check_system.rs @@ -100,6 +100,7 @@ lazy_static! { HashSet::from([ ("Ubuntu", "20.04", "x86_64"), ("Ubuntu", "22.04", "x86_64"), + ("Ubuntu", "24.04", "x86_64"), ("Ubuntu", "22.04", "aarch64"), ("Debian", "11", "x86_64"), ("Debian", "12", "x86_64"), diff --git a/src/run/runner/valgrind/.setup.rs.pending-snap b/src/run/runner/valgrind/.setup.rs.pending-snap new file mode 100644 index 0000000..267a309 --- /dev/null +++ b/src/run/runner/valgrind/.setup.rs.pending-snap @@ -0,0 +1,7 @@ +{"run_id":"1728893449-688468000","line":184,"new":{"module_name":"codspeed__run__runner__valgrind__setup__tests","snapshot_name":"system_info_to_codspeed_valgrind_version_ubuntu_arm","metadata":{"source":"src/run/runner/valgrind/setup.rs","assertion_line":184,"expression":"get_codspeed_valgrind_filename(&system_info).unwrap()"},"snapshot":"valgrind_3.21.0-0codspeed3_ubuntu-22.04_arm64.deb"},"old":{"module_name":"codspeed__run__runner__valgrind__setup__tests","metadata":{},"snapshot":"valgrind_3.21.0-0codspeed2_ubuntu-22.04_arm64.deb"}} +{"run_id":"1728893449-688468000","line":170,"new":{"module_name":"codspeed__run__runner__valgrind__setup__tests","snapshot_name":"system_info_to_codspeed_valgrind_version_debian","metadata":{"source":"src/run/runner/valgrind/setup.rs","assertion_line":170,"expression":"get_codspeed_valgrind_filename(&system_info).unwrap()"},"snapshot":"valgrind_3.21.0-0codspeed3_ubuntu-20.04_amd64.deb"},"old":{"module_name":"codspeed__run__runner__valgrind__setup__tests","metadata":{},"snapshot":"valgrind_3.21.0-0codspeed2_ubuntu-20.04_amd64.deb"}} +{"run_id":"1728893449-688468000","line":156,"new":{"module_name":"codspeed__run__runner__valgrind__setup__tests","snapshot_name":"system_info_to_codspeed_valgrind_version_ubuntu","metadata":{"source":"src/run/runner/valgrind/setup.rs","assertion_line":156,"expression":"get_codspeed_valgrind_filename(&system_info).unwrap()"},"snapshot":"valgrind_3.21.0-0codspeed3_ubuntu-22.04_amd64.deb"},"old":{"module_name":"codspeed__run__runner__valgrind__setup__tests","metadata":{},"snapshot":"valgrind_3.21.0-0codspeed2_ubuntu-22.04_amd64.deb"}} +{"run_id":"1728893505-912480000","line":184,"new":null,"old":null} +{"run_id":"1728893505-912480000","line":156,"new":null,"old":null} +{"run_id":"1728893505-912480000","line":170,"new":null,"old":null} +{"run_id":"1728893505-912480000","line":198,"new":null,"old":null} diff --git a/src/run/runner/valgrind/setup.rs b/src/run/runner/valgrind/setup.rs index dfe5dad..f15443d 100644 --- a/src/run/runner/valgrind/setup.rs +++ b/src/run/runner/valgrind/setup.rs @@ -48,6 +48,7 @@ fn get_codspeed_valgrind_filename(system_info: &SystemInfo) -> Result { ("20.04", "amd64") } ("Ubuntu", "22.04", "x86_64") => ("22.04", "amd64"), + ("Ubuntu", "24.04", "x86_64") => ("24.04", "amd64"), ("Ubuntu", "22.04", "aarch64") => ("22.04", "arm64"), _ => bail!("Unsupported system"), }; @@ -154,7 +155,21 @@ mod tests { }; assert_snapshot!( get_codspeed_valgrind_filename(&system_info).unwrap(), - @"valgrind_3.21.0-0codspeed2_ubuntu-22.04_amd64.deb" + @"valgrind_3.21.0-0codspeed3_ubuntu-22.04_amd64.deb" + ); + } + + #[test] + fn test_system_info_to_codspeed_valgrind_version_ubuntu_24() { + let system_info = SystemInfo { + os: "Ubuntu".to_string(), + os_version: "24.04".to_string(), + arch: "x86_64".to_string(), + ..SystemInfo::test() + }; + assert_snapshot!( + get_codspeed_valgrind_filename(&system_info).unwrap(), + @"valgrind_3.21.0-0codspeed3_ubuntu-24.04_amd64.deb" ); } @@ -168,7 +183,7 @@ mod tests { }; assert_snapshot!( get_codspeed_valgrind_filename(&system_info).unwrap(), - @"valgrind_3.21.0-0codspeed2_ubuntu-20.04_amd64.deb" + @"valgrind_3.21.0-0codspeed3_ubuntu-20.04_amd64.deb" ); } @@ -182,7 +197,7 @@ mod tests { }; assert_snapshot!( get_codspeed_valgrind_filename(&system_info).unwrap(), - @"valgrind_3.21.0-0codspeed2_ubuntu-22.04_arm64.deb" + @"valgrind_3.21.0-0codspeed3_ubuntu-22.04_arm64.deb" ); } }