script/autobuild.py: allow write_system_info commands to fail
authorStefan Metzmacher <metze@samba.org>
Thu, 27 Feb 2020 23:00:08 +0000 (00:00 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 2 Apr 2020 07:36:07 +0000 (07:36 +0000)
These commands are just there as hints to debug possible problems.
In order to support autobuild.py on non-linux platforms we should
just ignore errors here.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Apr  2 07:36:07 UTC 2020 on sn-devel-184

script/autobuild.py

index 99b3843b822a43b7f00485f0572d6aba55469bd3..8cee3ecbbbf29e07aa07f6c809fbd35fed2a7ed8 100755 (executable)
@@ -967,7 +967,10 @@ class buildlist(object):
                         'cc --version',
                         'df -m .',
                         'df -m %s' % testbase]:
-                out = run_cmd(cmd, output=True, checkfail=False)
+                try:
+                    out = run_cmd(cmd, output=True, checkfail=False)
+                except subprocess.CalledProcessError as e:
+                    out = "<failed: %s>" % str(e)
                 print('### %s' % cmd, file=f)
                 print(out, file=f)
                 print(file=f)