fix: cfg the non-windows test away

This commit is contained in:
Nathan Fiedler
2023-01-28 15:40:17 -08:00
parent cd4f282ce1
commit e52fb7bf90
2 changed files with 4 additions and 5 deletions

View File

@ -33,10 +33,7 @@ Optionally you can set some environment variables before building:
### Build on Windows
On Windows you will need to launch build in Visual Studio Native Tools Command Prompt.
It can be found in *Start menu -> Visual Studio < VERSION > -> Visual Studio Tools -> Windows Desktop Command Prompts*.
Choose the architecture corresponding to architecture of your rust compiler.
This is required for the proper functioning of `rust-bindgen`.
When building on Windows, you will need to set the `IMAGE_MAGICK_DIR` environment variable to point to the ImageMagick installation path. Maybe this is possible with the `set` command, but it may be necessary to set the variable in the system preferences. Without setting `IMAGE_MAGICK_DIR`, the `build.rs` script will try to run `pkg-config` which is a tool generally found on Unix-based systems.
```shell
> set IMAGE_MAGICK_DIR=<path to ImageMagick installation directory>

View File

@ -22,8 +22,8 @@ use std::io::Read;
use std::path::Path;
use std::sync::Once;
use magick_rust::{bindings, magick_wand_genesis, MagickWand, PixelWand};
use magick_rust::{MagickError, ToMagick};
use magick_rust::{bindings, magick_wand_genesis, MagickWand, PixelWand, ResourceType};
// Used to make sure MagickWand is initialized exactly once. Note that we
// do not bother shutting down, we simply exit when the tests are done.
@ -385,7 +385,9 @@ fn test_negate_image() {
}
#[test]
#[cfg(not(windows))]
fn test_resource_limits() {
use magick_rust::ResourceType;
START.call_once(|| {
magick_wand_genesis();
});