changeset 386 | 62c9e8d019fc |
parent 383 | 52675b624b66 |
child 764 | d00048f1b036 |
381:ad45f298ad85 | 386:62c9e8d019fc |
---|---|
12 # Description: |
12 # Description: |
13 # Common constants for the raptor parser suite |
13 # Common constants for the raptor parser suite |
14 |
14 |
15 package RaptorCommon; |
15 package RaptorCommon; |
16 |
16 |
17 our $CATEGORY_GENERAL = 'general'; |
|
18 |
|
19 our $CATEGORY_RAPTORERROR = 'raptor_error'; |
|
20 our $CATEGORY_RAPTORERROR_CANNOTPROCESSSCHEMAVERSION = 'cannot_process_schema_version'; |
|
21 our $CATEGORY_RAPTORERROR_NOBLDINFFOUND = 'no_bld_inf_found'; |
|
22 our $CATEGORY_RAPTORERROR_CANTFINDMMPFILE = 'cant_find_mmp_file'; |
|
23 our $CATEGORY_RAPTORERROR_MAKEEXITEDWITHERRORS = 'make_exited_with_errors'; |
|
24 our $CATEGORY_RAPTORERROR_TOOLDIDNOTRETURNVERSION = 'tool_didnot_return_version'; |
|
25 |
|
26 our $CATEGORY_RAPTORWARNING = 'raptor_warning'; |
|
27 our $CATEGORY_RAPTORWARNING_MISSINGFLAGABIV2 = 'missing_enable_abiv2_mode'; |
|
28 |
|
29 our $SEVERITY_UNKNOWN = 'unknown'; |
|
30 our $SEVERITY_CRITICAL = 'critical'; |
17 our $SEVERITY_CRITICAL = 'critical'; |
31 our $SEVERITY_MAJOR = 'major'; |
18 our $SEVERITY_MAJOR = 'major'; |
32 our $SEVERITY_NORMAL = 'normal'; |
|
33 our $SEVERITY_MINOR = 'minor'; |
19 our $SEVERITY_MINOR = 'minor'; |
34 |
20 |
35 sub init |
21 sub init |
36 { |
22 { |
37 my $filename = "$::basedir/summary.csv"; |
23 my $filename = "$::basedir/summary.csv"; |
46 sub dump_fault |
32 sub dump_fault |
47 { |
33 { |
48 my ($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line) = @_; |
34 my ($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line) = @_; |
49 |
35 |
50 open(SUMMARY, ">>$::basedir/summary.csv"); |
36 open(SUMMARY, ">>$::basedir/summary.csv"); |
51 print SUMMARY "$category,$subcategory,$severity,$component,$phase,$recipe,$file,$line\n"; |
37 print SUMMARY "$category,$subcategory,$severity,$::raptor_config,$component,$phase,$recipe,$file,$line\n"; |
52 close(SUMMARY); |
38 close(SUMMARY); |
53 } |
39 } |
54 |
40 |
55 1; |
41 1; |