# HG changeset patch # User timothy.murphy@nokia.com # Date 1265875711 -7200 # Node ID 5ec640568a23321d2bea23a4124765bed3d38b63 # Parent 6b20f760a37bd5bd2132db7e5b2fa992485dfdd3 FilterCheckComp - checking file existence by component diff -r 6b20f760a37b -r 5ec640568a23 sbsv2/raptor/bin/sbs_filter.py --- a/sbsv2/raptor/bin/sbs_filter.py Wed Feb 10 01:13:10 2010 +0200 +++ b/sbsv2/raptor/bin/sbs_filter.py Thu Feb 11 10:08:31 2010 +0200 @@ -71,7 +71,7 @@ while line: line = sys.stdin.readline() the_raptor.out.write(line) -except: +except Exception,e: sys.stderr.write("error: problem while filtering: %s\n" % str(e)) traceback.print_exc() sys.exit(1) diff -r 6b20f760a37b -r 5ec640568a23 sbsv2/raptor/python/plugins/filter_checkcomp.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/python/plugins/filter_checkcomp.py Thu Feb 11 10:08:31 2010 +0200 @@ -0,0 +1,59 @@ +# +# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# 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: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Filter class for doing a Check operation but also prints component information. +# + +import os +import sys +import re +import filter_interface +import filter_what + +class FilterCheckComp(filter_what.FilterWhat): + + def __init__(self): + super(filter_what.FilterWhat, self).__init__() + self.check = True + + def write(self, text): + "process some log text" + ok = True + + for line in text.splitlines(): + ok = filter_what.FilterWhat.write(self, line) + if not ok: + break + self.ok = ok + return self.ok + + def start_bldinf(self, bldinf): + dir = None + if "win" in self.buildparameters.platform: + dir = os.path.dirname(bldinf.replace("/","\\")) + dir = os.path.splitdrive(dir)[1] + else: + dir = os.path.dirname(bldinf) + + self.outfile.write("=== %s == %s\n" % (dir, dir)) + self.outfile.write("-- abld -w \nChdir %s \n++ Started at\n" % dir) + + def end_bldinf(self): + self.outfile.write("++ Finished at\n") + + def open(self, build_parameters): + t = filter_what.FilterWhat.open(self, build_parameters) + self.path_prefix_to_strip = os.path.abspath(build_parameters.epocroot) + self.path_prefix_to_add_on = build_parameters.incoming_epocroot + return t