diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2015-07-01 10:45:47 +1200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2015-10-21 11:27:09 +0200 |
commit | 800437c1b1dd036661b834abd764433ef1cffc06 (patch) | |
tree | 35fc567e23aa2c7dc969e65cd971f4a082e69b21 /script | |
parent | f1835d85310dbb2f7e4617c9cc162a00e6641802 (diff) | |
download | samba-800437c1b1dd036661b834abd764433ef1cffc06.tar.gz |
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>
Diffstat (limited to 'script')
-rwxr-xr-x | script/autobuild.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/script/autobuild.py b/script/autobuild.py index c91ff2c8237..209ad1f27cc 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -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): |