-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: index shards at 1, not 0 #14286
Conversation
What about a run-make test? |
Is there any reason to not keep the 0-based indexing and add a range check? |
@sfackler I think having it 1-based makes more sense. "This is shard 1 of 2" and "This is shard 2 of 2" |
@huonw what are you thinking that would look like? |
# Makefile
all:
rustc --test foo.rs
./foo --shard 1.2 | grep 'test_1 ... ok'
./foo --shard 2.2 | grep 'test_2 ... ok' // foo.rs
#[test]
fn test_1() {}
#[test]
fn test_2() {} (or similar) |
DynTestFn(..) => "DynTestFn(..)", | ||
DynMetricFn(..) => "DynMetricFn(..)", | ||
DynBenchFn(..) => "DynBenchFn(..)" | ||
}.as_bytes()).ok().unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems odd, why not just return the result?
@alexcrichton I've removed your r+ -- I still need to add a test. |
Ah whoops, ok! r=me with a test |
This has no tests because it's near impossible to test -- since TestFn uses `proc`s, they can not be cloned or tested for equality. The only way to really test this is making sure that for a given number of shards `a`, sharding from 1 to `a` yields the complete set of tests. But `filter_tests` takes its vector by value and `proc`s cannot be compared. [breaking-change] Closes #10898
This has no tests because it's near impossible to test -- since TestFn uses `proc`s, they can not be cloned or tested for equality. The only way to really test this is making sure that for a given number of shards `a`, sharding from 1 to `a` yields the complete set of tests. But `filter_tests` takes its vector by value and `proc`s cannot be compared. [breaking-change] Closes #10898
fix: Fix block defmap not looking into tail expressions for macro calls Fixes rust-lang/rust-analyzer#14263
This has no tests because it's near impossible to test -- since TestFn uses
proc
s, they can not be cloned or tested for equality. The only way to reallytest this is making sure that for a given number of shards
a
, sharding from1 to
a
yields the complete set of tests. Butfilter_tests
takes its vectorby value and
proc
s cannot be compared.[breaking-change]
Closes #10898