From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH] test-runner: make --log take a required argument
Date: Wed, 13 Nov 2019 09:55:50 -0800 [thread overview]
Message-ID: <20191113175550.20873-1-prestwoj@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1814 bytes --]
This was a mistake in the original implementation. Since test-runner
is always run from the tools directory using --log with no directory
specified would result in many log files being put into the iwd tree.
Instead we can make --log take a required argument so its more
obvious where all the logs are going to go.
---
tools/test-runner.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/tools/test-runner.c b/tools/test-runner.c
index 82f009ae..043e8cc7 100644
--- a/tools/test-runner.c
+++ b/tools/test-runner.c
@@ -3044,12 +3044,9 @@ static void usage(void)
" test is specified\n"
"\t\t\t\tthe 'shell' test"
" will be used\n"
- "\t-l, --log [dir] Directory used for log output. "
- "If no directory\n"
- "\t\t\t\tis specified the "
- "current directory will be used\n"
- "\t\t\t\tThis option sets --verbose on "
- "all apps");
+ "\t-l, --log <dir> Directory used for log output. "
+ "This option sets \n"
+ "\t\t\t\t--verbose on all apps");
l_info("Commands:\n"
"\t-A, --auto-tests <dirs> Comma separated list of the "
"test configuration\n\t\t\t\t"
@@ -3069,7 +3066,7 @@ static const struct option main_options[] = {
{ "valgrind", no_argument, NULL, 'V' },
{ "hw", required_argument, NULL, 'w' },
{ "shell", optional_argument, NULL, 's' },
- { "log", optional_argument, NULL, 'l' },
+ { "log", required_argument, NULL, 'l' },
{ "help", no_argument, NULL, 'h' },
{ }
};
@@ -3100,7 +3097,7 @@ int main(int argc, char *argv[])
for (;;) {
int opt;
- opt = getopt_long(argc, argv, "A:q:k:v:g:UVldh", main_options,
+ opt = getopt_long(argc, argv, "A:q:k:v:g:l:UVdh", main_options,
NULL);
if (opt < 0)
break;
--
2.17.1
next reply other threads:[~2019-11-13 17:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-13 17:55 James Prestwood [this message]
2019-11-13 18:37 ` [PATCH] test-runner: make --log take a required argument Denis Kenzior
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=20191113175550.20873-1-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.01.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