uh_parser/RaptorCommon.pm
author Dario Sestito <darios@symbian.org>
Tue, 09 Mar 2010 12:36:24 +0000
changeset 188 dbf40764ca6a
parent 186 b76adfbc6648
child 258 08436a227940
permissions -rw-r--r--
Match both make: and make.exe: in some unreciped regexp

# Copyright (c) 2009 Symbian Foundation Ltd
# This component and the accompanying materials are made available
# under the terms of the License "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
# Initial Contributors:
# Symbian Foundation Ltd - initial contribution.
#
# Contributors:
#
# Description:
# Common constants for the raptor parser suite

package RaptorCommon;

our $SEVERITY_CRITICAL = 'critical';
our $SEVERITY_MAJOR = 'major';
our $SEVERITY_MINOR = 'minor';

sub init
{
	my $filename = "$::raptorbitsdir/summary.csv";
	if (!-f$filename)
	{
		print "Writing summary file $filename\n";
		open(SUMMARY, ">$filename");
		close(SUMMARY);
	}
}

sub dump_fault
{
	my ($category, $subcategory, $severity, $location, $component, $mmp, $phase, $recipe, $file) = @_;
	
	$::failure_item_number++;
	
	open(SUMMARY, ">>$::raptorbitsdir/summary.csv");
	print SUMMARY "$category,$subcategory,$severity,$location,$component,$mmp,$phase,$recipe,$file,$::failure_item_number\n";
	close(SUMMARY);
}

1;