author | raptorbot <raptorbot@systemstesthead.symbian.intra> |
Mon, 18 Jan 2010 17:03:32 +0000 | |
branch | wip |
changeset 132 | 2022a4abb126 |
parent 115 | 5869e06bf2ac |
child 208 | 432f3175b677 |
permissions | -rw-r--r-- |
93
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
1 |
# |
132
2022a4abb126
filter and wilterwhatcomp cosmetic (style) fixes.
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents:
115
diff
changeset
|
2 |
# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
93
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
3 |
# All rights reserved. |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
4 |
# This component and the accompanying materials are made available |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
5 |
# under the terms of the License "Eclipse Public License v1.0" |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
6 |
# which accompanies this distribution, and is available |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
7 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
8 |
# |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
9 |
# Initial Contributors: |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
10 |
# Nokia Corporation - initial contribution. |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
11 |
# |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
12 |
# Contributors: |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
13 |
# |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
14 |
# Description: |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
15 |
# Filter class for doing --what and --check operations |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
16 |
# |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
17 |
|
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
18 |
import os |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
19 |
import sys |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
20 |
import re |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
21 |
import filter_interface |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
22 |
import filter_what |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
23 |
|
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
24 |
class FilterWhatComp(filter_what.FilterWhat): |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
25 |
|
114
35ed82e9d574
Strip epocroot off whatcomp filter output.
timothy.murphy@nokia.com
parents:
93
diff
changeset
|
26 |
def __init__(self): |
115
5869e06bf2ac
Cause whatcomp output to use the incoming epocroot value. i.e. if epocroot is relative then so is the what output.
timothy.murphy@nokia.com
parents:
114
diff
changeset
|
27 |
super(filter_what.FilterWhat, self).__init__() |
114
35ed82e9d574
Strip epocroot off whatcomp filter output.
timothy.murphy@nokia.com
parents:
93
diff
changeset
|
28 |
|
93
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
29 |
def write(self, text): |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
30 |
"process some log text" |
114
35ed82e9d574
Strip epocroot off whatcomp filter output.
timothy.murphy@nokia.com
parents:
93
diff
changeset
|
31 |
ok = True |
93
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
32 |
|
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
33 |
for line in text.splitlines(): |
114
35ed82e9d574
Strip epocroot off whatcomp filter output.
timothy.murphy@nokia.com
parents:
93
diff
changeset
|
34 |
ok = filter_what.FilterWhat.write(self, line) |
93
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
35 |
if not ok: |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
36 |
break |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
37 |
|
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
38 |
self.ok = ok |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
39 |
return self.ok |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
40 |
|
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
41 |
def start_bldinf(self,bldinf): |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
42 |
if "win" in self.buildparameters.platform: |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
43 |
dir = os.path.dirname(bldinf.replace("/","\\")) |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
44 |
else: |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
45 |
dir = os.path.dirname(bldinf) |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
46 |
|
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
47 |
self.outfile.write("-- abld -w \nChdir %s \n" % dir) |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
48 |
|
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
49 |
def end_bldinf(self): |
572b3909c72f
RELEASE NOTE: Added new launchers for the sbs_filter program so that there is no longer a need to manually set the HOSTPLATFORM variable
timothy.murphy@nokia.com
parents:
diff
changeset
|
50 |
self.outfile.write("++ Finished\n") |
115
5869e06bf2ac
Cause whatcomp output to use the incoming epocroot value. i.e. if epocroot is relative then so is the what output.
timothy.murphy@nokia.com
parents:
114
diff
changeset
|
51 |
|
132
2022a4abb126
filter and wilterwhatcomp cosmetic (style) fixes.
raptorbot <raptorbot@systemstesthead.symbian.intra>
parents:
115
diff
changeset
|
52 |
def open(self, build_parameters): |
115
5869e06bf2ac
Cause whatcomp output to use the incoming epocroot value. i.e. if epocroot is relative then so is the what output.
timothy.murphy@nokia.com
parents:
114
diff
changeset
|
53 |
t = filter_what.FilterWhat.open(self, build_parameters) |
5869e06bf2ac
Cause whatcomp output to use the incoming epocroot value. i.e. if epocroot is relative then so is the what output.
timothy.murphy@nokia.com
parents:
114
diff
changeset
|
54 |
self.path_prefix_to_strip = os.path.abspath(build_parameters.epocroot) |
5869e06bf2ac
Cause whatcomp output to use the incoming epocroot value. i.e. if epocroot is relative then so is the what output.
timothy.murphy@nokia.com
parents:
114
diff
changeset
|
55 |
self.path_prefix_to_add_on = build_parameters.incoming_epocroot |
5869e06bf2ac
Cause whatcomp output to use the incoming epocroot value. i.e. if epocroot is relative then so is the what output.
timothy.murphy@nokia.com
parents:
114
diff
changeset
|
56 |
return t |