~ctf/checkbox/bug811177

« back to all changes in this revision

Viewing changes to plugins/processor_info.py

  • Committer: Marc Tardif
  • Date: 2007-10-04 23:12:10 UTC
  • Revision ID: marc.tardif@canonical.com-20071004231210-unxckndkgndxfdp6
Refactored questions to use templates and scripts which fixes bug #149195.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import os
2
 
 
3
1
from hwtest.plugin import Plugin
4
2
from hwtest.report_helpers import createElement, createTypedElement
5
3
from hwtest.lib.conversion import string_to_int
13
11
 
14
12
class ProcessorManager(object):
15
13
 
16
 
    default_filename = os.path.join(os.sep, 'proc', 'cpuinfo')
 
14
    default_filename = "/proc/cpuinfo"
17
15
 
18
16
    def __init__(self, filename=None):
19
17
        self._filename = filename or self.default_filename
47
45
 
48
46
    persist_name = "processor-info"
49
47
    
50
 
    def __init__(self, processor_manager=None):
51
 
        super(ProcessorInfo, self).__init__()
 
48
    def __init__(self, config, processor_manager=None):
 
49
        super(ProcessorInfo, self).__init__(config)
52
50
        self._processors = []
53
51
        self._processor_manager = processor_manager or ProcessorManager()
54
52