~ubuntu-branches/ubuntu/feisty/clamav/feisty

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/utils/parseNLT.pl

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-02-20 10:33:44 UTC
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20070220103344-zgcu2psnx9d98fpa
Tags: upstream-0.90
ImportĀ upstreamĀ versionĀ 0.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/perl
2
 
# a first attempt to parse the nightly tester pages into something
3
 
# one can reason about, namely import into a database
4
 
# USE: perl parseNLT.pl <2005-03-31.html
5
 
# for example
6
 
 
7
 
while(<>)
8
 
  {
9
 
    if (/LLVM Test Results for (\w+) (\d+), (\d+)</)
10
 
      {
11
 
        $mon = $1;
12
 
        $day = $2;
13
 
        $year = $3;
14
 
      }
15
 
    if (/<td>([^<]+)<\/td>/)
16
 
      {
17
 
        if ($prefix)
18
 
          { $output .= "$1 "; $count++; }
19
 
      }
20
 
    if (/<tr/)
21
 
      {
22
 
        if ($output and $count > 3)
23
 
          { print "\n$day $mon $year $prefix/$output"; }
24
 
        $output = "";
25
 
        $count = 0;
26
 
      }
27
 
    if (/<h2>(Programs.+)<\/h2>/)
28
 
      {
29
 
        $prefix = $1;
30
 
      }
31
 
  }
32
 
 
33
 
if ($output)
34
 
  { print "\n$day $mon $year $prefix/$output"; $output = ""; }