diff --git a/rosenpass/Cargo.toml b/rosenpass/Cargo.toml index dd8b07e..be0bf77 100644 --- a/rosenpass/Cargo.toml +++ b/rosenpass/Cargo.toml @@ -26,6 +26,10 @@ required-features = ["experiment_api", "internal_testing"] name = "api-integration-tests-api-setup" required-features = ["experiment_api", "internal_testing"] +[[test]] +name = "gen-ipc-msg-types" +required-features = ["experiment_api", "internal_testing", "internal_bin_gen_ipc_msg_types"] + [[bench]] name = "handshake" harness = false diff --git a/rosenpass/tests/gen-ipc-msg-types.rs b/rosenpass/tests/gen-ipc-msg-types.rs new file mode 100644 index 0000000..3d4629e --- /dev/null +++ b/rosenpass/tests/gen-ipc-msg-types.rs @@ -0,0 +1,15 @@ +use std::{borrow::Borrow, process::Command}; + +#[test] +fn test_gen_ipc_msg_types() -> anyhow::Result<()> { + let out = Command::new(env!("CARGO_BIN_EXE_rosenpass-gen-ipc-msg-types")).output()?; + assert!(out.status.success()); + + let stdout = String::from_utf8(out.stdout)?; + + // Smoke tests only + assert!(stdout.contains("type RawMsgType = u128;")); + assert!(stdout.contains("const SUPPLY_KEYPAIR_RESPONSE : RawMsgType = RawMsgType::from_le_bytes(hex!(\"f2dc 49bd e261 5f10 40b7 3c16 ec61 edb9\"));")); + + Ok(()) +}