1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-04-20 03:37:47 +00:00

Move integration tests behind a feature flag in preparation for CI

This commit is contained in:
Joshua Goins 2022-07-27 20:58:12 -04:00
parent 7486c558ce
commit 92be18da39
3 changed files with 8 additions and 1 deletions

View file

@ -18,6 +18,9 @@ harness = false
# criterion is not updated to 0.4 yet, which removes an unmaintained package # 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" } criterion = { git = "https://github.com/bheisler/criterion.rs", branch="version-0.4", version="0.3.5" }
[features]
retail_game_testing = []
[dependencies] [dependencies]
crc = "3.0.0" crc = "3.0.0"
binrw = "0.9.2" binrw = "0.9.2"

View file

@ -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)! 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 ## Contributing

View file

@ -1,6 +1,7 @@
use std::env; use std::env;
#[test] #[test]
#[cfg_attr(not(feature = "retail_game_testing"), ignore)]
fn test_index_read() { fn test_index_read() {
let game_dir = env::var("FFXIV_GAME_DIR").unwrap(); let game_dir = env::var("FFXIV_GAME_DIR").unwrap();
@ -8,6 +9,7 @@ fn test_index_read() {
} }
#[test] #[test]
#[cfg_attr(not(feature = "retail_game_testing"), ignore)]
fn test_gamedata_extract() { fn test_gamedata_extract() {
let game_dir = env::var("FFXIV_GAME_DIR").unwrap(); let game_dir = env::var("FFXIV_GAME_DIR").unwrap();