File: normalize_agent_output.cf.sub

package info (click to toggle)
cfengine3 3.24.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,552 kB
  • sloc: ansic: 163,161; sh: 10,296; python: 2,950; makefile: 1,744; lex: 784; yacc: 633; perl: 211; pascal: 157; xml: 21; sed: 13
file content (13 lines) | stat: -rw-r--r-- 498 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
bundle agent normalize_agent_results(original, normalized)
{
  commands:
    "$(G.sed)"
      args => " \
-e 's,$(sys.workdir),WORKDIR,g' \
-e 's/[0-9]*\.changes/PID.changes/' \
-e 's/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}[[:blank:]][0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}[[:blank:]][-+][0-9]\{4\}/TIMESTAMP/' \
-e 's/Size: [0-9]*/Size: SIZE/' \
$(original) > $(normalized)",
      contain => in_shell,
      comment => "Normalize pid, timestamp and file sizes so that we can compare to an expected output.";
}