1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-11 16:58:40 +03:00

autobuild: add some system information to the autobuild tarball

When running multiple autobuilds on VMs with various parameters, you
can easily get confused about which was which, and the tarball doesn't
help much. This adds an extra file with information about the system.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Douglas Bagnall 2015-07-01 10:45:47 +12:00 committed by Stefan Metzmacher
parent f1835d8531
commit 800437c1b1

View File

@ -362,6 +362,16 @@ class buildlist(object):
self.kill_kids()
return (0, None, None, None, "All OK")
def write_system_info(self):
filename = 'system-info.txt'
f = open(filename, 'w')
for cmd in ['uname -a', 'free', 'cat /proc/cpuinfo']:
print >>f, '### %s' % cmd
print >>f, run_cmd(cmd, output=True, checkfail=False)
print >>f
f.close()
return filename
def tarlogs(self, fname):
tar = tarfile.open(fname, "w:gz")
for b in self.tlist:
@ -369,6 +379,8 @@ class buildlist(object):
tar.add(b.stderr_path, arcname="%s.stderr" % b.tag)
if os.path.exists("autobuild.log"):
tar.add("autobuild.log")
sys_info = self.write_system_info()
tar.add(sys_info)
tar.close()
def remove_logs(self):