diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3b38e5d..8cf78de 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,6 +49,11 @@ jobs: run: | sudo apt-get update sudo apt-get install -y gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf + # Add OpenSSL dev packages for cross-compilation + sudo apt-get install -y libssl-dev:arm64 libssl-dev:armhf pkg-config + # Configure pkg-config for cross-compilation + echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV + echo "PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig" >> $GITHUB_ENV - name: Cache dependencies uses: actions/cache@v4 diff --git a/tests/cli_test.rs b/tests/cli_test.rs index d85920c..1037bd9 100644 --- a/tests/cli_test.rs +++ b/tests/cli_test.rs @@ -1,14 +1,16 @@ use anyhow::Result; use std::process::Command; use std::time::Duration; +use tokio::process::Command as TokioCommand; use tokio::time::sleep; // Helper function to run the command to avoid rebuilding for each test async fn run_strainer_command(args: &[&str]) -> Result { - Ok(Command::new("cargo") + Ok(TokioCommand::new("cargo") .args(["run", "--"]) .args(args) - .output()?) + .output() + .await?) } #[tokio::test] @@ -61,7 +63,7 @@ async fn test_run_command_rate_limits() -> Result<()> { async fn test_run_command_process_control() -> Result<()> { let mut child = Command::new("cargo") .args(["run", "--"]) - .args(&[ + .args([ "run", "--api-key", "test_key", @@ -115,4 +117,4 @@ async fn test_watch_command() -> Result<()> { // Should fail because watch command is not implemented yet assert!(!output.status.success()); Ok(()) -} \ No newline at end of file +}