From: Daan De Meyer Date: Thu, 19 May 2022 12:25:33 +0000 (+0200) Subject: machine: Hide pexpect stacktrace when machine fails to boot X-Git-Tag: v13~26^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F983%2Fhead;p=thirdparty%2Fmkosi.git machine: Hide pexpect stacktrace when machine fails to boot Follow up for b799c6de4ec80a5519391a7c15ac52481b50d33f --- diff --git a/mkosi/machine.py b/mkosi/machine.py index e572b868a..5b588d799 100644 --- a/mkosi/machine.py +++ b/mkosi/machine.py @@ -216,9 +216,9 @@ class MkosiMachineTest(unittest.TestCase): try: self.machine.boot() except pexpect.EOF: - self.fail(f'Failed to boot machine with command "{self.machine.serial.args}"') + raise self.failureException(f'Failed to boot machine with command "{self.machine.serial.args}"') from None except pexpect.TIMEOUT: - self.fail(f'Timed out while waiting for machine to boot with command "{self.machine.serial.args}"') + raise self.failureException(f'Timed out while waiting for machine to boot with command "{self.machine.serial.args}"') from None def tearDown(self) -> None: self.machine.kill()