summaryrefslogtreecommitdiff
path: root/include/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-18 20:09:15 -0600
committerSimon Glass <sjg@chromium.org>2017-06-01 07:03:09 -0600
commit801587bd771835bf1341646c3f6b490469199e2b (patch)
treecd1b4eea856bba994886248d3111b8abd7930958 /include/test
parentf86db10cc56b9c8b73cb1bb94c5172c96958ef29 (diff)
dm: test: Show the test filename when running
Show the filename of the test being run. Skip the path and show just the base name. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/test')
-rw-r--r--include/test/test.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/test/test.h b/include/test/test.h
index b7e1ae2dec..e3e821c6ea 100644
--- a/include/test/test.h
+++ b/include/test/test.h
@@ -30,6 +30,7 @@ struct unit_test_state {
* @flags: Flags indicated pre-conditions for test
*/
struct unit_test {
+ const char *file;
const char *name;
int (*func)(struct unit_test_state *state);
int flags;
@@ -38,6 +39,7 @@ struct unit_test {
/* Declare a new unit test */
#define UNIT_TEST(_name, _flags, _suite) \
ll_entry_declare(struct unit_test, _name, _suite) = { \
+ .file = __FILE__, \
.name = #_name, \
.flags = _flags, \
.func = _name, \