@@ -208,6 +208,39 @@ def test_open_experiment(self, kernel, other):
208208 self ._delete_experiments ()
209209 self ._delete_traces ()
210210
211+ def test_opened_trace_info (self , kernel , other ):
212+ """Expect the info of the trace correctly set."""
213+ traces = []
214+ response = self .tsp_client .open_trace (os .path .basename (kernel ), kernel )
215+ traces .append (response .model .UUID )
216+
217+ # The trace info in read after it is opened in an
218+ # experiment, so open the experiment here.
219+ response = self .tsp_client .open_experiment (
220+ os .path .basename (kernel ), traces )
221+ assert response .status_code == 200
222+
223+ trace = response .model .traces .traces [0 ]
224+ assert trace .start == 1332170682440133097
225+ assert trace .end == 1332170682702071857
226+ assert trace .path .endswith ('/tracecompass-test-traces/ctf/src/main/resources/kernel' )
227+ assert isinstance (trace .properties , dict )
228+ assert len (trace .properties ) == 11
229+ assert trace .properties ["clock_offset" ] == '1332166405241713987'
230+ assert trace .properties ["clock_scale" ] == '1.0'
231+ assert trace .properties ["domain" ] == '"kernel"'
232+ assert trace .properties ["host ID" ] == '"84db105b-b3f4-4821-b662-efc51455106a"'
233+ assert trace .properties ['tracer_name' ] == '"lttng-modules"'
234+ assert trace .properties ['tracer_major' ] == '2'
235+ assert trace .properties ['tracer_minor' ] == '0'
236+ assert trace .properties ['kernel_release' ] == '"3.0.0-16-generic-pae"'
237+ assert trace .properties ['sysname' ] == '"Linux"'
238+ assert trace .properties ['tracer_patchlevel' ] == '0'
239+ assert trace .properties ['kernel_version' ] == '"#29-Ubuntu SMP Tue Feb 14 13:56:31 UTC 2012"'
240+
241+ self ._delete_experiments ()
242+ self ._delete_traces ()
243+
211244 def test_open_experiment_unopened_trace (self , kernel ):
212245 """Expect 204 after opening experiment with unopened trace."""
213246 traces = []
0 commit comments