File tree Expand file tree Collapse file tree 4 files changed +25
-229
lines changed Expand file tree Collapse file tree 4 files changed +25
-229
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ if [ -n "${QEMU:-}" ]; then
8181fi
8282
8383cmd=" cargo test --target $target ${LIBC_CI_ZBUILD_STD+" -Zbuild-std" } "
84+ test_flags=" --skip check_style"
8485
8586# Run tests in the `libc` crate
8687case " $target " in
@@ -101,25 +102,31 @@ if [ "$target" = "s390x-unknown-linux-gnu" ]; then
101102 passed=0
102103 until [ $n -ge $N ]; do
103104 if [ " $passed " = " 0" ]; then
104- if $cmd --no-default-features; then
105+ # shellcheck disable=SC2086
106+ if $cmd --no-default-features -- $test_flags ; then
105107 passed=$(( passed+ 1 ))
106108 continue
107109 fi
108110 elif [ " $passed " = " 1" ]; then
109- if $cmd ; then
111+ # shellcheck disable=SC2086
112+ if $cmd -- $test_flags ; then
110113 passed=$(( passed+ 1 ))
111114 continue
112115 fi
113116 elif [ " $passed " = " 2" ]; then
114- if $cmd --features extra_traits; then
117+ # shellcheck disable=SC2086
118+ if $cmd --features extra_traits -- $test_flags ; then
115119 break
116120 fi
117121 fi
118122 n=$(( n+ 1 ))
119123 sleep 1
120124 done
121125else
122- $cmd --no-default-features
123- $cmd
124- $cmd --features extra_traits
126+ # shellcheck disable=SC2086
127+ $cmd --no-default-features -- $test_flags
128+ # shellcheck disable=SC2086
129+ $cmd -- $test_flags
130+ # shellcheck disable=SC2086
131+ $cmd --features extra_traits -- $test_flags
125132fi
Original file line number Diff line number Diff line change 11use std:: env;
2- use std:: process:: Command ;
32use std:: path:: { Path , PathBuf } ;
3+ use std:: process:: Command ;
44
55fn main ( ) {
66 let args = env:: args_os ( )
77 . skip ( 1 )
8- . filter ( |arg| arg != "--quiet" )
8+ . filter ( |arg| arg != "--quiet" && arg != "--skip" && arg != "check_style" )
99 . collect :: < Vec < _ > > ( ) ;
1010 assert_eq ! ( args. len( ) , 1 ) ;
1111 let test = PathBuf :: from ( & args[ 0 ] ) ;
@@ -36,14 +36,16 @@ fn main() {
3636 let stdout = String :: from_utf8_lossy ( & output. stdout ) ;
3737 let stderr = String :: from_utf8_lossy ( & output. stderr ) ;
3838
39- println ! ( "status: {} \n stdout --- \n {} \n stderr --- \n {}" ,
40- output . status ,
41- stdout,
42- stderr ) ;
39+ println ! (
40+ "status: {} \n stdout --- \n {} \n stderr --- \n {}" ,
41+ output . status , stdout, stderr
42+ ) ;
4343
44- if !stderr. lines ( ) . any ( |l| ( l. starts_with ( "PASSED " ) && l. contains ( " tests" ) ) || l. starts_with ( "test result: ok" ) )
45- && !stdout. lines ( ) . any ( |l| ( l. starts_with ( "PASSED " ) && l. contains ( " tests" ) ) || l. starts_with ( "test result: ok" ) )
46- {
44+ if !stderr. lines ( ) . any ( |l| {
45+ ( l. starts_with ( "PASSED " ) && l. contains ( " tests" ) ) || l. starts_with ( "test result: ok" )
46+ } ) && !stdout. lines ( ) . any ( |l| {
47+ ( l. starts_with ( "PASSED " ) && l. contains ( " tests" ) ) || l. starts_with ( "test result: ok" )
48+ } ) {
4749 panic ! ( "failed to find successful test run" ) ;
4850 } ;
4951}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ if [ -n "${CI:-}" ]; then
99 check=" --check"
1010fi
1111
12- rustc ci/style.rs && ./ style src
12+ cargo test --manifest-path libc-test/Cargo.toml --test style -- --nocapture
1313
1414command -v rustfmt
1515rustfmt -V
You can’t perform that action at this time.
0 commit comments