File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 8
8
// except according to those terms.
9
9
10
10
#[ test]
11
+ fn dogfood_runner ( ) {
12
+ dogfood ( ) ;
13
+ dogfood_tests ( ) ;
14
+ }
15
+
11
16
fn dogfood ( ) {
12
17
if option_env ! ( "RUSTC_TEST_SUITE" ) . is_some ( ) || cfg ! ( windows) {
13
18
return ;
14
19
}
15
20
let root_dir = std:: path:: PathBuf :: from ( env ! ( "CARGO_MANIFEST_DIR" ) ) ;
16
21
let clippy_cmd = std:: path:: Path :: new ( & root_dir) . join ( "target/debug/cargo-clippy" ) ;
17
22
18
- println ! ( "{:?}" , clippy_cmd ) ;
23
+ std :: env :: set_current_dir ( root_dir ) . unwrap ( ) ;
19
24
let output = std:: process:: Command :: new ( clippy_cmd)
20
25
. arg ( "clippy" )
21
26
. arg ( "--all-targets" )
@@ -33,7 +38,6 @@ fn dogfood() {
33
38
assert ! ( output. status. success( ) ) ;
34
39
}
35
40
36
- #[ test]
37
41
fn dogfood_tests ( ) {
38
42
if option_env ! ( "RUSTC_TEST_SUITE" ) . is_some ( ) || cfg ! ( windows) {
39
43
return ;
@@ -64,5 +68,4 @@ fn dogfood_tests() {
64
68
65
69
assert ! ( output. status. success( ) ) ;
66
70
}
67
- std:: env:: set_current_dir ( root_dir) . unwrap ( ) ;
68
71
}
You can’t perform that action at this time.
0 commit comments