From 4730f82236a661862370c0dca02017d27c6c123e Mon Sep 17 00:00:00 2001 From: Jeremie Fraeys Date: Mon, 23 Mar 2026 15:22:29 -0400 Subject: [PATCH] feat(scripts/testing): support both C++ and Rust native libraries in Redis tests Update test-native-with-redis.sh to detect and use both native implementations: - Extend library detection to check both native/build/ (C++) and native_rust/target/release/ (Rust) - Default to building Rust libraries if neither found (make rust-build) - Check for .so (Linux) and .dylib (macOS) extensions for both implementations --- scripts/testing/test-native-with-redis.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/testing/test-native-with-redis.sh b/scripts/testing/test-native-with-redis.sh index 63ad8ff..d21951d 100755 --- a/scripts/testing/test-native-with-redis.sh +++ b/scripts/testing/test-native-with-redis.sh @@ -7,10 +7,11 @@ set -e echo "=== FetchML Native Library Test with Redis ===" echo "" -# Check if native libraries are built -if [ ! -f "native/build/libqueue_index.so" ] && [ ! -f "native/build/libqueue_index.dylib" ]; then - echo "Building native libraries..." - make native-build +# Check if C++ or Rust native libraries are built +if [ ! -f "native/build/libqueue_index.so" ] && [ ! -f "native/build/libqueue_index.dylib" ] && \ + [ ! -f "native_rust/target/release/libqueue_index.so" ] && [ ! -f "native_rust/target/release/libqueue_index.dylib" ]; then + echo "Building Rust native libraries..." + make rust-build fi compose_cmd=$(command -v docker compose >/dev/null 2>&1 && echo "docker compose" || echo "docker compose")