1##########################################################################
2# Copyright (c) 2009, ETH Zurich.
3# All rights reserved.
4#
5# This file is distributed under the terms in the attached LICENSE file.
6# If you do not find this file, copies can be found by writing to:
7# ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
8##########################################################################
9
10import re
11import debug, tests
12from common import TestCommon, TimeoutError
13from results import RawResults
14
15@tests.add_test
16class Tracing(TestCommon):
17    ''' Tracing. ''' # XXX: What is this for? -AB
18    name = "tracing"
19
20    def get_module_name(self):
21        return "barrier_bench"
22
23    def get_modules(self, build, machine):
24        modules = super(Tracing, self).get_modules(build, machine)
25        modules.add_module(self.get_module_name(), ['2'])
26        return modules
27
28    def process_data(self, testdir, rawiter):
29        results = RawResults('tracing')
30        data = []
31        for line in rawiter:
32            m = re.match("trace: (\w+.*)", line)
33            if m:
34                data.append(m.group(1))
35
36
37        if len(data) != 0:
38            results.add_group(1, data)
39        return results
40