tests: Add an implementation of the Logger interface for use gtests.

On exiting log types (panic and fatal), the message is set to an
ADD_FAILURE_AT macro, and the test is exited by throwing an otherwise
unexpected exception. On non-exiting log types, the message is sent to
the SUCCEEDED macro which currently doesn't output anything.

Change-Id: I1bb569e6cb8308dbc4c3e04eea7a962bd2b1ddd8
Reviewed-on: https://gem5-review.googlesource.com/6264
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
This commit is contained in:
Gabe Black
2017-12-03 01:39:41 -08:00
parent 211124aff2
commit 364a80fbf7
3 changed files with 111 additions and 1 deletions

View File

@@ -40,7 +40,7 @@ Source('bigint.cc')
Source('imgwriter.cc')
Source('bmpwriter.cc')
Source('callback.cc')
Source('cprintf.cc')
Source('cprintf.cc', add_tags='gtest lib')
Source('debug.cc')
if env['USE_FENV']:
Source('fenv.c')