Skip to content

Commit

Permalink
Added new test utilities, increased default BED test file length.
Browse files Browse the repository at this point in the history
 - New `copy_tempfile_for_inspection()` function for inspecting
   tempfiles that fail tests.
 - Added `scripts/seed_grinder.sh` which tries random seeds looking
   for failures.
 - Fixed minor bug where u32 was being used instead of `Position`.
  • Loading branch information
vsbuffalo committed Mar 5, 2024
1 parent 3b6cd34 commit b184631
Show file tree
Hide file tree
Showing 6 changed files with 265 additions and 175 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "granges"
version = "0.2.1"
version = "0.2.2"
edition = "2021"
license = "MIT"
authors = ["Vince Buffalo <[email protected]>"]
Expand All @@ -12,7 +12,7 @@ description = "A Rust library and command line tool for genomic range operations

[dependencies]
# clap = { version = "4.4.18", features = ["derive"], optional = true }
clap = { version = "4.4.18", features = ["derive"] }
clap = { version = "4.4.18", features = ["derive", "wrap_help"] }
coitrees = { version = "0.4.0", features = ["nosimd"] }
flate2 = { version = "1.0.28", features = ["zlib-ng-compat"] }
genomap = "0.2.6"
Expand Down
16 changes: 16 additions & 0 deletions scripts/seed_grinder.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

START_SEED=1
END_SEED=10000

for SEED in $(seq $START_SEED $END_SEED); do
echo "Running tests with TEST_SEED=$SEED"
TEST_SEED=$SEED cargo test --test bedtools_validation
if [ $? -ne 0 ]; then
echo "Tests failed with TEST_SEED=$SEED"
exit 1
else
echo "Tests passed with TEST_SEED=$SEED"
fi
done

Loading

0 comments on commit b184631

Please sign in to comment.