kunit: tool: fixed test broken by system.exit(1)

4691404d5f6b86c05061961ccbb3603980559c4e ("kunit.py : Exit with exit
code of 1 when all tests do not pass.",
https://kunit.googlesource.com/linux/+/4691404d5f6b86c05061961ccbb3603980559c4e)
broke kunit_tool unit tests by making kunit_tool do a system.exit(1) on
a failure.

Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
Change-Id: I87ed68609f485e592cd2e5584baf4f5ad879a968
diff --git a/tools/testing/kunit/kunit_test.py b/tools/testing/kunit/kunit_test.py
index f143358..135c0ee 100755
--- a/tools/testing/kunit/kunit_test.py
+++ b/tools/testing/kunit/kunit_test.py
@@ -193,7 +193,10 @@
 
 	def test_run_passes_args_fail(self):
 		self.linux_source_mock.run_kernel = mock.Mock(return_value=[])
-		kunit.main(['run'], self.linux_source_mock)
+		with self.assertRaises(SystemExit) as e:
+			kunit.main(['run'], self.linux_source_mock)
+		assert type(e.exception) == SystemExit
+		assert e.exception.code == 1
 		assert self.linux_source_mock.build_reconfig.call_count == 1
 		assert self.linux_source_mock.run_kernel.call_count == 1
 		self.print_mock.assert_any_call(StrContains('Before the crash:'))