mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-25 22:22:44 +00:00
Extend tidy to allow conditionalizing tests for multiple targets.
This commit is contained in:
parent
cc8565b20a
commit
6a8d55a235
@ -168,8 +168,8 @@ fn find_test_mod(contents: &str) -> usize {
|
||||
let prev_newline_idx = contents[..prev_newline_idx].rfind('\n');
|
||||
if let Some(nl) = prev_newline_idx {
|
||||
let prev_line = &contents[nl + 1 .. mod_tests_idx];
|
||||
let emcc_cfg = "cfg(all(test, not(target_os";
|
||||
if prev_line.contains(emcc_cfg) {
|
||||
if prev_line.contains("cfg(all(test, not(target_os")
|
||||
|| prev_line.contains("cfg(all(test, not(any(target_os") {
|
||||
nl
|
||||
} else {
|
||||
mod_tests_idx
|
||||
|
Loading…
Reference in New Issue
Block a user