File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
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
-
16
11
fn dogfood ( ) {
17
12
if option_env ! ( "RUSTC_TEST_SUITE" ) . is_some ( ) || cfg ! ( windows) {
18
13
return ;
@@ -23,8 +18,8 @@ fn dogfood() {
23
18
. join ( env ! ( "PROFILE" ) )
24
19
. join ( "cargo-clippy" ) ;
25
20
26
- std:: env:: set_current_dir ( root_dir) . unwrap ( ) ;
27
21
let output = std:: process:: Command :: new ( clippy_cmd)
22
+ . current_dir ( root_dir)
28
23
. env ( "CLIPPY_DOGFOOD" , "1" )
29
24
. arg ( "clippy" )
30
25
. arg ( "--all-targets" )
@@ -42,6 +37,7 @@ fn dogfood() {
42
37
assert ! ( output. status. success( ) ) ;
43
38
}
44
39
40
+ #[ test]
45
41
fn dogfood_tests ( ) {
46
42
if option_env ! ( "RUSTC_TEST_SUITE" ) . is_some ( ) || cfg ! ( windows) {
47
43
return ;
@@ -60,8 +56,8 @@ fn dogfood_tests() {
60
56
"clippy_dev" ,
61
57
"rustc_tools_util" ,
62
58
] {
63
- std:: env:: set_current_dir ( root_dir. join ( d) ) . unwrap ( ) ;
64
59
let output = std:: process:: Command :: new ( & clippy_cmd)
60
+ . current_dir ( root_dir. join ( d) )
65
61
. env ( "CLIPPY_DOGFOOD" , "1" )
66
62
. arg ( "clippy" )
67
63
. arg ( "--" )
You can’t perform that action at this time.
0 commit comments