diff options
author | Thomas Wood <thomas.wood@intel.com> | 2014-10-10 16:56:20 +0100 |
---|---|---|
committer | Thomas Wood <thomas.wood@intel.com> | 2014-11-06 13:24:29 +0000 |
commit | f8b3c704af190fcf49f358ea1395ad8fb8b5b5cb (patch) | |
tree | ebba4ab08a11085373f714f4aca00a64ee826bb3 /lib/igt_core.h | |
parent | c06016798cbd24c24283dbdb3ac2762834d04bcf (diff) |
lib: add the ability to include a description with a test
The IGT_TEST_DESCRIPTION macro can be used to define a description for a
test.
v2: Remove semicolon from end of macro (Damien Lespiau)
Add API documentation for the macro.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'lib/igt_core.h')
-rw-r--r-- | lib/igt_core.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/igt_core.h b/lib/igt_core.h index f7a92ce9..846f5991 100644 --- a/lib/igt_core.h +++ b/lib/igt_core.h @@ -38,6 +38,18 @@ #include <stdarg.h> #include <getopt.h> +extern const char* __igt_test_description __attribute__((weak)); + +/** + * IGT_TEST_DESCRIPTION: + * @str: description string + * + * Defines a description for a test. This is used as the output for the + * "--help-description" option and is also included in the generated + * documentation. + */ +#define IGT_TEST_DESCRIPTION(str) const char* __igt_test_description = str + /** * IGT_EXIT_TIMEOUT: * |