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]+//;
73 print "** ERROR: special pattern not recognized: <<$type>>, CONSOLE_LOG line: $.\n";
81 print "** ERROR: $script_name internal error, at end of compare(), CONSOLE_LOG line: $.\n";
98 -h print program usage
99 --help print program usage
100 --hide-expect suppress output of EXPECTed lines
101 --line-num report line number of CONSOLE_LOG
102 --no-expect-stats do not report EXPECT statistics
103 --no-strip-ts do not strip leading console timestamps
104 --verbose do not suppress EXPECT begin and end lines
105 --version print program version and exit
131 <<int>> matches: [+-]*[0-9]+
132 <<hex>> matches: (0x)*[0-9a-f]+
136 A prefix is added to every line of output:
138 'ok ' Line matches an enclosing EXPECT begin/end pair
140 '** ' Line reports $script_name warning or error
142 '-> ' Line reports start or end of the unittests
144 '>> ' Line reports a unittest test FAIL
152 --line-num causes the CONSOLE_LOG line number to be printed in 4 columns.
154 used to report the line number for lines greater than 9999 (eg for
155 lines 10000 - 99999, 5 columns will be used).
167 "hide-expect" => \$hide_expect,
168 "line-num" => \$print_line_num,
169 "no-expect-stats" => \$no_expect_stats,
170 "no-strip-ts" => \$no_strip_ts,
175 print STDERR "ERROR processing command line options\n";
177 print STDERR "For help, type '$script_name --help'\n";
193 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
202 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
212 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
217 # 'while ($line = <ARGV>) {' in the code below supports multiple file
218 # names on the command line, but the EXPECT statistics are reported
219 # once for all input - it is not an expected use case to generate one
240 $pr_fmt = "### dt-test ### ";
248 LINE: label
249 while ($line = <ARGV>) {
251 chomp $line;
258 $timestamp = $line;
260 if ($timestamp =~ /^\[\s*[0-9]+\.[0-9]*\] /) {
261 ($timestamp, $null) = split(/]/, $line);
269 $line =~ s/^\[\s*[0-9]+\.[0-9]*\] //;
272 # ----- find EXPECT begin
274 if ($line =~ /^\s*$exp_begin/) {
275 $data = $line;
281 $line_num = sprintf("%4s ", $.);
283 printf "%s %s%s%s\n", $prefix, $line_num, $timestamp, $line;
286 next LINE;
290 # ----- find EXPECT end
292 if ($line =~ /^\s*$exp_end/) {
293 $data = $line;
298 $line_num = sprintf("%4s ", $.);
300 printf "%s %s%s%s\n", $prefix, $line_num, $timestamp, $line;
320 print " end ---> $line\n";
325 $line_num = sprintf("%4s ", $.);
329 printf "** %s%s$script_name WARNING - not found ---> %s\n",
336 print " begin -> $begin\n";
337 print " end ---> $line\n";
345 next LINE;
349 # ----- not an EXPECT line
351 if (($line =~ /^${pr_fmt}start of unittest - you will see error messages$/) ||
352 ($line =~ /^${pr_fmt}end of unittest - [0-9]+ passed, [0-9]+ failed$/ ) ) {
353 $prefix = "->"; # 2 characters
354 } elsif ($line =~ /^${pr_fmt}FAIL /) {
361 if (compare($begin, $line)) {
369 while (! compare($begin, $line)) {
373 push @found_or_begin, $line;
377 next LINE;
384 $line_num = sprintf("%4s ", $.);
387 printf "%s %s%s%s\n", $prefix, $line_num, $timestamp, $line;
394 printf "** EXPECT found : %4i\n", $expect_found;
395 printf "** EXPECT not found : %4i\n", $expect_not_found;
396 printf "** missing EXPECT begin : %4i\n", $expect_missing_begin;
397 printf "** missing EXPECT end : %4i\n", $expect_missing_end;
398 printf "** unittest FAIL : %4i\n", $unittest_fail;
399 printf "** internal error : %4i\n", $internal_err;
406 print " begin ---> $begin\n";