From b011bdfc114f7fba2b26c5009368effbba17abd0 Mon Sep 17 00:00:00 2001 From: caleb Date: Sat, 4 Nov 2023 22:23:17 +0300 Subject: [PATCH] crates/opencl: Add tests behind a feature since CI doesn't have opencl installed --- crates/zune-opencl/Cargo.toml | 2 ++ crates/zune-opencl/src/ocl_sobel.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/crates/zune-opencl/Cargo.toml b/crates/zune-opencl/Cargo.toml index 32274a79..6bad2974 100644 --- a/crates/zune-opencl/Cargo.toml +++ b/crates/zune-opencl/Cargo.toml @@ -5,6 +5,8 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[features] +tests=[""] [dependencies] ocl = "0.19.4" zune-image = { path = "../zune-image" } diff --git a/crates/zune-opencl/src/ocl_sobel.rs b/crates/zune-opencl/src/ocl_sobel.rs index c06f5bd6..ee418f39 100644 --- a/crates/zune-opencl/src/ocl_sobel.rs +++ b/crates/zune-opencl/src/ocl_sobel.rs @@ -176,6 +176,7 @@ impl zune_image::traits::OperationsTrait for OclSobel { } #[test] +#[cfg(feature = "tests")] fn test_ocr_sobel() { use zune_core::colorspace::ColorSpace; use zune_image::traits::OperationsTrait;