OLD | NEW |
1 import os, shutil, re | 1 import os, shutil, re |
2 | 2 |
3 from autotest_lib.client.common_lib import utils | 3 from autotest_lib.client.common_lib import utils |
4 from autotest_lib.client.bin import base_sysinfo | 4 from autotest_lib.client.bin import base_sysinfo |
| 5 from autotest_lib.client.bin import chromeos_constants |
5 | 6 |
6 | 7 |
7 logfile = base_sysinfo.logfile | 8 logfile = base_sysinfo.logfile |
8 command = base_sysinfo.command | 9 command = base_sysinfo.command |
9 | 10 |
10 | 11 |
11 class site_sysinfo(base_sysinfo.base_sysinfo): | 12 class site_sysinfo(base_sysinfo.base_sysinfo): |
12 def __init__(self, job_resultsdir): | 13 def __init__(self, job_resultsdir): |
13 super(site_sysinfo, self).__init__(job_resultsdir) | 14 super(site_sysinfo, self).__init__(job_resultsdir) |
14 | 15 |
15 # add in some extra command logging | 16 # add in some extra command logging |
16 self.test_loggables.add(command( | 17 self.test_loggables.add(command( |
17 "ls -l /boot", "boot_file_list")) | 18 "ls -l /boot", "boot_file_list")) |
| 19 self.test_loggables.add(logfile(chromeos_constants.UPDATE_ENGINE_LOG)) |
18 | 20 |
19 | 21 |
20 def log_test_keyvals(self, test_sysinfodir): | 22 def log_test_keyvals(self, test_sysinfodir): |
21 keyval = super(site_sysinfo, self).log_test_keyvals(test_sysinfodir) | 23 keyval = super(site_sysinfo, self).log_test_keyvals(test_sysinfodir) |
22 | 24 |
23 lsb_lines = utils.system_output( | 25 lsb_lines = utils.system_output( |
24 "cat /etc/lsb-release", | 26 "cat /etc/lsb-release", |
25 ignore_status=True).splitlines() | 27 ignore_status=True).splitlines() |
26 lsb_dict = dict(item.split("=") for item in lsb_lines) | 28 lsb_dict = dict(item.split("=") for item in lsb_lines) |
27 | 29 |
28 for lsb_key in lsb_dict.keys(): | 30 for lsb_key in lsb_dict.keys(): |
29 # Special handling for build number | 31 # Special handling for build number |
30 if lsb_key == "CHROMEOS_RELEASE_DESCRIPTION": | 32 if lsb_key == "CHROMEOS_RELEASE_DESCRIPTION": |
31 keyval["CHROMEOS_BUILD"] = ( | 33 keyval["CHROMEOS_BUILD"] = ( |
32 lsb_dict[lsb_key].rstrip(")").split(" ")[3]) | 34 lsb_dict[lsb_key].rstrip(")").split(" ")[3]) |
33 keyval[lsb_key] = lsb_dict[lsb_key] | 35 keyval[lsb_key] = lsb_dict[lsb_key] |
34 | 36 |
35 # return the updated keyvals | 37 # return the updated keyvals |
36 return keyval | 38 return keyval |
OLD | NEW |