File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -248,14 +248,16 @@ run_tests() {
248248
249249 local all_functions=$( set)
250250
251- local pending_tests=$( echo " $all_functions " | " $GREP " -E ' ^(pending|todo).* \(\)' | " $GREP " -E " $test_pattern " | " $SED " -e ' s: .*::' )
251+ local pending_tests=$( echo " $all_functions " | " $GREP " -E ' ^(pending|todo).* \(\)' | " $GREP " -E " $test_pattern " | " $GREP " -oE ' ^[^ ]+' )
252+ local matched_tests=$( echo " $all_functions " | " $GREP " -E ' ^test.* \(\)' | " $GREP " -E " $test_pattern " )
253+
252254 if [[ -n " $skip_pattern " ]]
253255 then
254- local skipped_tests=$( echo " $all_functions " | " $GREP " -E ' ^test.* \(\) ' | " $GREP " -E " $test_pattern " | " $GREP " -E " $skip_pattern " | " $SED " -e ' s: .*:: ' )
255- local tests_to_run=" $( echo " $all_functions " | " $GREP " -E ' ^test.* \(\) ' | " $GREP " -E " $test_pattern " | " $GREP " - v -E " $skip_pattern " | " $SED " -e ' s: .*:: ' | maybe_shuffle) "
256+ local skipped_tests=$( echo " $matched_tests " | " $GREP " -E " $skip_pattern " | " $GREP " -oE ' ^[^ ]+ ' )
257+ local tests_to_run=$( echo " $matched_tests " | " $GREP " - v -E " $skip_pattern " | " $GREP " -oE ' ^[^ ]+ ' | maybe_shuffle)
256258 else
257259 local skipped_tests=" "
258- local tests_to_run=" $( echo " $all_functions " | " $GREP " -E ' ^test.* \(\) ' | " $GREP " -E " $test_pattern " | " $SED " -e ' s: .*:: ' | maybe_shuffle) "
260+ local tests_to_run=$( echo " $matched_tests " | " $GREP " -oE ' ^[^ ]+ ' | maybe_shuffle)
259261 fi
260262
261263 local test_count=$( cat " ${TEST_COUNT_FILE} " )
You can’t perform that action at this time.
0 commit comments