]> code.delx.au - gnu-emacs-elpa/blob - packages/realgud/make-check-filter.rb
508c8f629735e02cf7cc14ba459368be4c5c6a95
[gnu-emacs-elpa] / packages / realgud / make-check-filter.rb
1 #!/usr/bin/env ruby
2 # Use this to cut out the crud from make check.
3 # Use like this:
4 # make check 2>&1 | ruby ../make-check-filter.rb
5 # See Makefile.am
6 pats = ["^(?:Loading",
7 '(re)?make\[',
8 "Making check in",
9 '\(cd \.\.',
10 "make -C",
11 "Test-Unit",
12 "Fontifying",
13 "`flet'",
14 '\s*$',
15 '##[<>]+$'
16 ].join('|') + ')'
17 # puts pats
18 skip_re = /#{pats}/
19
20 while gets()
21 next if $_.encode!('UTF-8', 'binary',
22 invalid: :replace, undef: :replace, replace: '') =~ skip_re
23 puts $_
24 end