Skip to content

Commit

Permalink
tests: rename cd_bench to cd_bench_normal
Browse files Browse the repository at this point in the history
Since the filter argument to `cargo bench` does substring matching of
test names, we should generate distinct prefixes to allow running
segments of tests alone.

Without this change, it's difficult to run all `cd_bench` tests without
also running all `cd_bench_sync` tests. After this change, it's much
easier :).
  • Loading branch information
euank committed Aug 5, 2018
1 parent 94311e0 commit e56d571
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/src/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use tempdir::TempDir;
use harness::{Autojumper, Fasd, Z, HarnessBuilder, NoJumper, Pazi, Shell, Autojump};
use self::test::Bencher;

fn cd_bench(b: &mut Bencher, jumper: &Autojumper, shell: &Shell) {
fn cd_bench_normal(b: &mut Bencher, jumper: &Autojumper, shell: &Shell) {
let tmpdir = TempDir::new("pazi_bench").unwrap();
let root = tmpdir.path();
let mut h = HarnessBuilder::new(&root, jumper, shell).finish();
Expand Down
4 changes: 2 additions & 2 deletions tests/src/benches.csv
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# It works fine in bash, and the cd bench works, but for some reason the jump
# one in zsh constantly hits that. I think it has to do with how $RANDOM works
# in zsh.
cd_bench, NoJumper Pazi Fasd Autojump, Zsh Bash, false
cd_bench, Z, Bash, false
cd_bench_normal, NoJumper Pazi Fasd Autojump, Zsh Bash, false
cd_bench_normal, Z, Bash, false
cd_bench_sync, NoJumper Pazi Fasd Autojump Z, Zsh Bash, true
jump_bench jump_large_db_bench, Pazi Fasd Autojump, Zsh Bash, true
jump_bench jump_large_db_bench, Z, Bash, true

0 comments on commit e56d571

Please sign in to comment.