From: Thomas Wood <thomas.wood@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: daniel.vetter@ffwll.ch
Subject: [PATCH i-g-t 8/8] lib: add a command line option to enable debug output in tests
Date: Wed, 23 Jul 2014 11:57:55 +0100 [thread overview]
Message-ID: <1406113075-30860-9-git-send-email-thomas.wood@intel.com> (raw)
In-Reply-To: <1406113075-30860-1-git-send-email-thomas.wood@intel.com>
Add --debug as a common command line option for all tests to enable
debug output.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
---
lib/igt_core.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/igt_core.c b/lib/igt_core.c
index 42b22fc..d90e6bb 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -276,7 +276,9 @@ static void print_usage(const char *command_str, const char *help_str,
fprintf(f, "Usage: %s [OPTIONS]\n"
" --list-subtests\n"
- " --run-subtest <pattern>\n", command_str);
+ " --run-subtest <pattern>\n"
+ " --debug\n"
+ " --help\n", command_str);
if (help_str)
fprintf(f, "%s\n", help_str);
}
@@ -301,6 +303,7 @@ static int common_init(int argc, char **argv,
static struct option long_options[] = {
{"list-subtests", 0, 0, 'l'},
{"run-subtest", 1, 0, 'r'},
+ {"debug", 0, 0, 'd'},
{"help", 0, 0, 'h'},
};
const char *command_str;
@@ -349,6 +352,9 @@ static int common_init(int argc, char **argv,
while ((c = getopt_long(argc, argv, short_opts, combined_opts,
&option_index)) != -1) {
switch(c) {
+ case 'd':
+ igt_log_level = IGT_LOG_DEBUG;
+ break;
case 'l':
if (!run_single_subtest)
list_subtests = true;
--
1.9.3
next prev parent reply other threads:[~2014-07-23 10:58 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-23 10:57 [PATCH i-g-t 0/8] command line parsing Thomas Wood
2014-07-23 10:57 ` [PATCH i-g-t 1/8] lib: warn when attempting to run an unknown subtest Thomas Wood
2014-07-24 9:49 ` Gore, Tim
2014-07-23 10:57 ` [PATCH i-g-t 2/8] tests: remove unused getopt header includes Thomas Wood
2014-07-24 9:50 ` Gore, Tim
2014-07-23 10:57 ` [PATCH i-g-t 3/8] lib: move option parsing into common_init Thomas Wood
2014-07-23 12:13 ` Daniel Vetter
2014-07-23 12:15 ` Daniel Vetter
2014-07-24 9:52 ` Gore, Tim
2014-07-23 10:57 ` [PATCH i-g-t 4/8] lib: add igt_simple_init_parse_opts Thomas Wood
2014-07-24 9:54 ` Gore, Tim
2014-07-23 10:57 ` [PATCH i-g-t 5/8] lib: don't ignore unknown options in multi-tests Thomas Wood
2014-07-24 9:55 ` Gore, Tim
2014-07-23 10:57 ` [PATCH i-g-t 6/8] tests: convert simple tests to use igt_simple_init_parse_opts Thomas Wood
2014-07-24 10:17 ` Gore, Tim
2014-07-25 16:08 ` [PATCH i-g-t] lib: avoid getopt value conflicts with tests Thomas Wood
2014-07-25 16:57 ` Paulo Zanoni
2014-07-28 9:38 ` Thomas Wood
2014-07-28 15:18 ` [PATCH i-g-t] lib: check test options for conflicts Thomas Wood
2014-07-23 10:57 ` [PATCH i-g-t 7/8] lib: always warn about unknown options Thomas Wood
2014-07-24 10:33 ` Gore, Tim
2014-07-23 10:57 ` Thomas Wood [this message]
2014-07-24 10:37 ` [PATCH i-g-t 8/8] lib: add a command line option to enable debug output in tests Gore, Tim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1406113075-30860-9-git-send-email-thomas.wood@intel.com \
--to=thomas.wood@intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox