Lines Matching +full:4 +full:- +full:line

2 # SPDX-License-Identifier: GPL-2.0
40 $expect =~ s/^.*?>>//; # '?' is non-greedy, minimal match
54 if ($got =~ /^[+-]*[0-9]+/) {
55 $got =~ s/^[+-]*[0-9]+//;
60 if ($got =~ /^(0x)*[0-9a-f]+/) {
61 $got =~ s/^(0x)*[0-9a-f]+//;
75 print "** ERROR: special pattern not recognized: <<$type>>, CONSOLE_LOG line: $.\n";
83 print "** ERROR: $script_name internal error, at end of compare(), CONSOLE_LOG line: $.\n";
100 -h print program usage
101 --help print program usage
102 --hide-expect suppress output of EXPECTed lines
103 --line-num report line number of CONSOLE_LOG
104 --no-expect-stats do not report EXPECT statistics
105 --no-strip-ts do not strip leading console timestamps
106 --verbose do not suppress EXPECT begin and end lines
107 --version print program version and exit
133 <<int>> matches: [+-]*[0-9]+
134 <<hex>> matches: (0x)*[0-9a-f]+
135 <<all>> matches: anything to end of line
139 A prefix is added to every line of output:
141 'ok ' Line matches an enclosing EXPECT begin/end pair
143 '** ' Line reports $script_name warning or error
145 '-> ' Line reports start or end of the unittests
147 '>> ' Line reports a unittest test FAIL
155 --line-num causes the CONSOLE_LOG line number to be printed in 4 columns.
157 used to report the line number for lines greater than 9999 (eg for
158 lines 10000 - 99999, 5 columns will be used).
170 "hide-expect" => \$hide_expect,
171 "line-num" => \$print_line_num,
172 "no-expect-stats" => \$no_expect_stats,
173 "no-strip-ts" => \$no_strip_ts,
178 print STDERR "ERROR processing command line options\n";
180 print STDERR "For help, type '$script_name --help'\n";
196 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
205 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
215 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
220 # 'while ($line = <ARGV>) {' in the code below supports multiple file
221 # names on the command line, but the EXPECT statistics are reported
222 # once for all input - it is not an expected use case to generate one
243 $pr_fmt = "### dt-test ### ";
253 LINE:
254 while ($line = <ARGV>) {
256 chomp $line;
265 $timestamp = $line;
267 if ($timestamp =~ /^\[\s*[0-9]+\.[0-9]*\] /) {
268 ($timestamp, $null) = split(/]/, $line);
276 $line =~ s/^\[\s*[0-9]+\.[0-9]*\] //;
279 # ----- find EXPECT begin
281 if ($line =~ /^\s*$exp_begin/) {
282 $data = $line;
288 $line_num = sprintf("%4s ", $.);
290 printf "%s %s%s%s\n", $prefix, $line_num, $timestamp, $line;
293 next LINE;
297 # ----- find EXPECT end
299 if ($line =~ /^\s*$exp_end/) {
300 $data = $line;
305 $line_num = sprintf("%4s ", $.);
307 printf "%s %s%s%s\n", $prefix, $line_num, $timestamp, $line;
328 print " end ---> $line\n";
333 $line_num = sprintf("%4s ", $.);
337 printf "** %s%s$script_name WARNING - not found ---> %s\n",
344 print " begin -> $begin\n";
345 print " end ---> $line\n";
349 next LINE;
353 # ----- find EXPECT_NOT begin
355 if ($line =~ /^\s*$expnot_begin/) {
356 $data = $line;
362 $line_num = sprintf("%4s ", $.);
364 printf "%s %s%s%s\n", $prefix, $line_num, $timestamp, $line;
367 next LINE;
371 # ----- find EXPECT_NOT end
373 if ($line =~ /^\s*$expnot_end/) {
374 $data = $line;
379 $line_num = sprintf("%4s ", $.);
381 printf "%s %s%s%s\n", $prefix, $line_num, $timestamp, $line;
400 print " end ---> $line\n";
407 $line_num = sprintf("%4s ", $.);
410 printf "** %s%s$script_name WARNING - next line matches EXPECT_NOT\n",
412 printf "** %s%s%s\n", $line_num, $timestamp, $line;
427 print " begin -> $begin\n";
428 print " end ---> $line\n";
433 next LINE;
437 # ----- not an EXPECT line
439 if (($line =~ /^${pr_fmt}start of unittest - you will see error messages$/) ||
440 ($line =~ /^${pr_fmt}end of unittest - [0-9]+ passed, [0-9]+ failed$/ ) ) {
441 $prefix = "->"; # 2 characters
442 } elsif ($line =~ /^${pr_fmt}FAIL /) {
449 if (compare($begin, $line)) {
457 while (! compare($begin, $line)) {
461 push @exp_found_or_begin, $line;
472 if (compare($begin, $line)) {
480 while (! compare($begin, $line)) {
484 push @expnot_found_or_begin, $line;
494 next LINE;
498 $line_num = sprintf("%4s ", $.);
501 printf "%s %s%s%s\n", $prefix, $line_num, $timestamp, $line;
508 printf "** non-zero values expected:\n";
510 printf "** EXPECT found : %4i\n", $exp_found;
511 printf "** EXPECT_NOT not found : %4i\n", $expnot_missing;
515 printf "** EXPECT not found : %4i\n", $exp_missing;
516 printf "** missing EXPECT begin : %4i\n", $exp_missing_begin;
517 printf "** missing EXPECT end : %4i\n", $exp_missing_end;
519 printf "** EXPECT_NOT found : %4i\n", $expnot_found;
520 printf "** missing EXPECT_NOT begin : %4i\n", $expnot_missing_begin;
521 printf "** missing EXPECT_NOT end : %4i\n", $expnot_missing_end;
523 printf "** unittest FAIL : %4i\n", $unittest_fail;
524 printf "** internal error : %4i\n", $internal_err;
531 print " begin ---> $begin\n";
539 print " begin ---> $begin\n";