(self, magic_key)
| 94 | self.features_flags = self.get_cpuinfo_item(magic_key) |
| 95 | |
| 96 | def get_cpuinfo_item(self, magic_key): |
| 97 | values = set() |
| 98 | with open('/proc/cpuinfo') as fd: |
| 99 | for line in fd: |
| 100 | if not line.startswith(magic_key): |
| 101 | continue |
| 102 | flags_value = [s.strip() for s in line.split(':', 1)] |
| 103 | if len(flags_value) == 2: |
| 104 | values = values.union(flags_value[1].upper().split()) |
| 105 | return values |
| 106 | |
| 107 | def load_flags_auxv(self): |
| 108 | auxv = subprocess.check_output(['/bin/true'], env=dict(LD_SHOW_AUXV="1")) |
no test coverage detected