From 92be18da39a4637b0f10353452c89e78b045065f Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Wed, 27 Jul 2022 20:58:12 -0400 Subject: [PATCH] Move integration tests behind a feature flag in preparation for CI --- Cargo.toml | 3 +++ README.md | 4 +++- tests/integration_test.rs | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index debd2d9..70a44be 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,9 @@ harness = false # criterion is not updated to 0.4 yet, which removes an unmaintained package criterion = { git = "https://github.com/bheisler/criterion.rs", branch="version-0.4", version="0.3.5" } +[features] +retail_game_testing = [] + [dependencies] crc = "3.0.0" binrw = "0.9.2" diff --git a/README.md b/README.md index 7db9863..5e1250f 100755 --- a/README.md +++ b/README.md @@ -24,7 +24,9 @@ features over. If you're interested to see how these formats work in more detail, see [xiv.dev](https://xiv.dev/) and [docs.xiv.zone](https://docs.xiv.zone)! -Some tests and benchmarks require the environment variable `FFXIV_GAME_DIR` to be set. +Some tests and benchmarks require the environment variable `FFXIV_GAME_DIR` to be set. By default, these are disabled +since they require a legitimate copy of the retail game data. These tests can be turned on via the `retail_game_testing` +feature. ## Contributing diff --git a/tests/integration_test.rs b/tests/integration_test.rs index 3e0710e..516f72e 100755 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -1,6 +1,7 @@ use std::env; #[test] +#[cfg_attr(not(feature = "retail_game_testing"), ignore)] fn test_index_read() { let game_dir = env::var("FFXIV_GAME_DIR").unwrap(); @@ -8,6 +9,7 @@ fn test_index_read() { } #[test] +#[cfg_attr(not(feature = "retail_game_testing"), ignore)] fn test_gamedata_extract() { let game_dir = env::var("FFXIV_GAME_DIR").unwrap();