File tree Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Original file line number Diff line number Diff line change 1
1
use std:: process;
2
2
use std:: process:: Command ;
3
3
4
+ use assert_cmd:: cargo:: CURRENT_TARGET ;
4
5
use assert_cmd:: prelude:: * ;
5
6
6
7
#[ test]
@@ -19,15 +20,23 @@ fn cargo_binary_with_empty_env() {
19
20
20
21
#[ test]
21
22
fn mod_example ( ) {
22
- let bin_under_test = escargot:: CargoBuild :: new ( )
23
- . bin ( "bin_fixture" )
24
- . current_release ( )
25
- . current_target ( )
26
- . run ( )
27
- . unwrap ( ) ;
28
- let mut cmd = bin_under_test. command ( ) ;
29
- let output = cmd. unwrap ( ) ;
30
- println ! ( "{:?}" , output) ;
23
+ let runner_env = format ! (
24
+ "CARGO_TARGET_{}_RUNNER" ,
25
+ CURRENT_TARGET . replace( '-' , "_" ) . to_uppercase( )
26
+ ) ;
27
+ if std:: env:: var ( runner_env) . is_ok ( ) {
28
+ // not running this test on cross because escargot doesn't support the cargo target runner yet
29
+ } else {
30
+ let bin_under_test = escargot:: CargoBuild :: new ( )
31
+ . bin ( "bin_fixture" )
32
+ . current_release ( )
33
+ . current_target ( )
34
+ . run ( )
35
+ . unwrap ( ) ;
36
+ let mut cmd = bin_under_test. command ( ) ;
37
+ let output = cmd. unwrap ( ) ;
38
+ println ! ( "{:?}" , output) ;
39
+ }
31
40
}
32
41
33
42
#[ test]
You can’t perform that action at this time.
0 commit comments