51 c_parser = parser.CppParser() |
51 c_parser = parser.CppParser() |
52 temp_dict = {} |
52 temp_dict = {} |
53 pkg_parser = parser.PkgFileParser() |
53 pkg_parser = parser.PkgFileParser() |
54 |
54 |
55 # Customize some attributes from how optparse leaves them. |
55 # Customize some attributes from how optparse leaves them. |
56 self.build_drive = path(self._opts.build_drive) |
56 if hasattr(self._opts, 'build_drive'): |
|
57 self.build_drive = path(self._opts.build_drive) |
57 self.file_store = path(self._opts.file_store) |
58 self.file_store = path(self._opts.file_store) |
58 self.flash_images = split_paths(self._opts.flash_images) |
59 self.flash_images = split_paths(self._opts.flash_images) |
59 self.sis_files = split_paths(self._opts.sis_files) |
60 if hasattr(self._opts, 'sis_files'): |
60 self.config_file = self._opts.config |
61 self.sis_files = split_paths(self._opts.sis_files) |
61 self.obey_pkgfiles = to_bool(self._opts.obey_pkgfiles) |
62 if hasattr(self._opts, 'config'): |
62 self.hti = to_bool(self._opts.hti) |
63 self.config_file = self._opts.config |
63 self.specific_pkg = self._opts.specific_pkg |
64 if hasattr(self._opts, 'obey_pkgfiles'): |
64 if self.specific_pkg == '': |
65 self.obey_pkgfiles = to_bool(self._opts.obey_pkgfiles) |
65 self.specific_pkg = None |
66 if hasattr(self._opts, 'hti'): |
|
67 self.hti = to_bool(self._opts.hti) |
|
68 if hasattr(self._opts, 'test_type'): |
|
69 self.test_type = self._opts.test_type |
|
70 if hasattr(self._opts, 'specific_pkg'): |
|
71 self.specific_pkg = self._opts.specific_pkg |
|
72 if self.specific_pkg == '': |
|
73 self.specific_pkg = None |
66 self.tsrc_paths_dict = {} |
74 self.tsrc_paths_dict = {} |
67 |
75 if hasattr(self._opts, 'ctc_run_process_params'): |
68 ats_nd = self._opts.ctc_run_process_params.strip() |
76 ats_nd = self._opts.ctc_run_process_params.strip() |
69 if ats_nd != "": |
77 if ats_nd != "": |
70 ats_nd = ats_nd.split("#")[0].strip() |
78 ats_nd = ats_nd.split("#")[0].strip() |
71 if ats_nd == "": |
79 if ats_nd == "": |
72 self._opts.ctc_run_process_params = "" |
80 self._opts.ctc_run_process_params = "" |
73 _logger.warning("Property \'ats.ctc.host\' is not set. Code coverage measurement report(s) will not be created.") |
81 _logger.warning("Property \'ats.ctc.host\' is not set. Code coverage measurement report(s) will not be created.") |
74 |
82 |
75 main_comps = [] |
83 main_comps = [] |
76 |
84 |
77 for tsrc in tsrc_paths: |
85 for tsrc in tsrc_paths: |
78 hrh = os.path.join(self.build_drive + os.sep, 'epoc32', 'include', 'feature_settings.hrh') |
86 hrh = os.path.join(self.build_drive + os.sep, 'epoc32', 'include', 'feature_settings.hrh') |
124 u"§RUN_START_TIME§") |
132 u"§RUN_START_TIME§") |
125 REPORT_PATH = u"§RUN_NAME§" + os.sep + u"§RUN_START_DATE§_§RUN_START_TIME§" |
133 REPORT_PATH = u"§RUN_NAME§" + os.sep + u"§RUN_START_DATE§_§RUN_START_TIME§" |
126 |
134 |
127 def __init__(self, config): |
135 def __init__(self, config): |
128 self.diamonds_build_url = config.diamonds_build_url |
136 self.diamonds_build_url = config.diamonds_build_url |
129 self.ctc_run_process_params = config.ctc_run_process_params |
137 if hasattr(config, 'ctc_run_process_params'): |
|
138 self.ctc_run_process_params = config.ctc_run_process_params |
130 self.testrun_name = config.testrun_name |
139 self.testrun_name = config.testrun_name |
131 self.harness = config.harness |
140 if hasattr(config, 'harness'): |
|
141 self.harness = config.harness |
132 self.device_type = config.device_type |
142 self.device_type = config.device_type |
133 self.device_hwid = config.device_hwid |
143 if hasattr(config, 'device_hwid'): |
134 self.plan_name = config.plan_name |
144 self.device_hwid = config.device_hwid |
|
145 if hasattr(config, 'plan_name'): |
|
146 self.plan_name = config.plan_name |
135 self.report_email = config.report_email |
147 self.report_email = config.report_email |
136 self.file_store = config.file_store |
148 self.file_store = config.file_store |
137 self.test_timeout = config.test_timeout |
149 self.test_timeout = config.test_timeout |
138 self.eunitexerunner_flags = config.eunitexerunner_flags |
150 if hasattr(config, 'eunitexerunner_flags'): |
|
151 self.eunitexerunner_flags = config.eunitexerunner_flags |
139 self.sets = [] |
152 self.sets = [] |
140 self.src_dst = [] |
153 self.src_dst = [] |
141 self.pmd_files = [] |
154 self.pmd_files = [] |
142 self.trace_activation_files = [] |
155 self.trace_activation_files = [] |
143 self.trace_enabled = to_bool(config.trace_enabled) |
156 self.trace_enabled = 'False' |
144 self.ctc_enabled = to_bool(config.ctc_enabled) |
157 if hasattr(config, 'trace_enabled'): |
145 self.multiset_enabled = to_bool(config.multiset_enabled) |
158 self.trace_enabled = to_bool(config.trace_enabled) |
146 self.monsym_files = config.monsym_files |
159 self.ctc_enabled = 'False' |
147 self.hti = config.hti |
160 if hasattr(config, 'ctc_enabled'): |
|
161 self.ctc_enabled = to_bool(config.ctc_enabled) |
|
162 if hasattr(config, 'multiset_enabled'): |
|
163 self.multiset_enabled = to_bool(config.multiset_enabled) |
|
164 if hasattr(config, 'monsym_files'): |
|
165 self.monsym_files = config.monsym_files |
|
166 if hasattr(config, 'hti'): |
|
167 self.hti = config.hti |
|
168 if hasattr(config, 'custom_template'): |
|
169 self.custom_template = config.custom_template |
148 self.component_path = "" |
170 self.component_path = "" |
149 self.custom_dir = None |
171 self.custom_dir = None |
|
172 if hasattr(config, 'flash_images'): |
|
173 self.flash_images = config.flash_images |
|
174 if hasattr(config, 'test_type'): |
|
175 self.test_type = config.test_type |
150 |
176 |
151 def insert_set(self, data_files=None, config_files=None, |
177 def insert_set(self, data_files=None, config_files=None, |
152 engine_ini_file=None, image_files=None, sis_files=None, |
178 engine_ini_file=None, image_files=None, sis_files=None, |
153 testmodule_files=None, test_timeout=None,eunitexerunner_flags=None , test_harness=None, |
179 testmodule_files=None, test_timeout=None,eunitexerunner_flags=None , test_harness=None, |
154 src_dst=None, pmd_files=None, trace_activation_files=None, custom_dir=None, component_path=None): |
180 src_dst=None, pmd_files=None, trace_activation_files=None, custom_dir=None, component_path=None): |
204 def set_plan_harness(self): |
230 def set_plan_harness(self): |
205 """setting up test harness for a plan""" |
231 """setting up test harness for a plan""" |
206 eunit = False |
232 eunit = False |
207 stif = False |
233 stif = False |
208 stifunit = False |
234 stifunit = False |
|
235 generic = False |
209 for setd in self.sets: |
236 for setd in self.sets: |
210 if setd["test_harness"] == "STIF": |
237 if setd["test_harness"] == "STIF": |
211 stif = True |
238 stif = True |
212 elif setd["test_harness"] == "EUNIT": |
239 elif setd["test_harness"] == "EUNIT": |
213 eunit = True |
240 eunit = True |
214 elif setd["test_harness"] == "STIFUNIT": |
241 elif setd["test_harness"] == "STIFUNIT": |
215 stifunit = True |
242 stifunit = True |
|
243 else: |
|
244 generic = True |
216 |
245 |
217 if eunit and stif: |
246 if stif and generic: |
|
247 self.harness = "MULTI_HARNESS_GENERIC_STIF" |
|
248 elif eunit and stif: |
218 self.harness = "MULTI_HARNESS" |
249 self.harness = "MULTI_HARNESS" |
219 elif eunit: |
250 elif eunit: |
220 self.harness = "EUNIT" |
251 self.harness = "EUNIT" |
221 elif stif: |
252 elif stif: |
222 self.harness = "STIF" |
253 self.harness = "STIF" |