| """Platform Statistics Gathering step.""" |
| |
| from __future__ import absolute_import |
| import logging |
| |
| from helpers import branch_utils |
| from slave import base_step |
| |
| |
| class PlatformInfoStep(base_step.BaseStep): |
| """A quick step class for gathering useful os/platform information.""" |
| |
| def __init__(self, **kwargs): |
| """Creates a PlatformInfoStep instance. |
| |
| Args: |
| **kwargs: Any additional args to pass to BaseStep. |
| """ |
| base_step.BaseStep.__init__(self, name='Platform Information', **kwargs) |
| |
| def run(self): |
| kernel_version_cmd = ['/bin/uname', '-v'] |
| cpu_info_cmd = ['/usr/bin/lscpu'] |
| |
| self.exec_subprocess(kernel_version_cmd, check_output=True) |
| self.exec_subprocess(cpu_info_cmd, check_output=True) |
| |
| return True |