3 # Scrub the variable fields from the normal trace2 output to
9 my $float = '[0-9]*\.[0-9]+([eE][-+]?[0-9]+)?';
11 # This code assumes that the trace2 data was written with bare
12 # turned on (which omits the "<clock> <file>:<line>" prefix.
15 # Various messages include an elapsed time in the middle
16 # of the message. Replace the time with a placeholder to
17 # simplify our HEREDOC in the test script.
18 s/elapsed:$float/elapsed:_TIME_/g;
23 # start <argv0> [<argv1> [<argv2> [...]]]
25 # where argv0 might be a relative or absolute path, with
26 # or without quotes, and platform dependent. Replace argv0
27 # with a token for HEREDOC matching in the test script.
29 if ($line =~ m/^start/) {
30 $line =~ /^start\s+(.*)/;
32 $argv =~ m/(\'[^\']*\'|[^ ]+)\s+(.*)/;
36 print "start _EXE_ $argv_rest\n";
38 elsif ($line =~ m/^cmd_path/) {
39 # Likewise, the 'cmd_path' message breaks out argv[0].
41 # This line is only emitted when RUNTIME_PREFIX is defined,
42 # so just omit it for testing purposes.
43 # print "cmd_path _EXE_\n";