From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH 3/3] test-runner: print error if kernel/qemu path is not found
Date: Fri, 05 Feb 2021 15:53:08 -0800 [thread overview]
Message-ID: <20210205235308.345635-3-prestwoj@gmail.com> (raw)
In-Reply-To: <20210205235308.345635-1-prestwoj@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1334 bytes --]
---
tools/test-runner | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/tools/test-runner b/tools/test-runner
index 8b6a57a6..0321128c 100755
--- a/tools/test-runner
+++ b/tools/test-runner
@@ -1264,11 +1264,13 @@ class Main:
self.parser.add_argument('--qemu', '-q',
metavar='<QEMU binary>', type=str,
help='QEMU binary to use',
- dest='qemu')
+ dest='qemu',
+ default=None)
self.parser.add_argument('--kernel', '-k', metavar='<kernel>',
type=str,
help='Path to kernel image',
- dest='kernel')
+ dest='kernel',
+ default=None)
self.parser.add_argument('--verbose', '-v', metavar='<list>',
type=str,
help='Comma separated list of applications',
@@ -1350,6 +1352,9 @@ class Main:
if self.args.qemu is None:
qemu_binary = find_binary(qemu_table)
+ if not qemu_binary:
+ print("Could not find qemu binary")
+ quit()
else:
if path_exists(self.args.qemu):
qemu_binary = self.args.qemu
@@ -1360,6 +1365,9 @@ class Main:
if self.args.kernel is None:
kernel_binary = find_binary(kernel_table)
+ if not kernel_binary:
+ print("Could not find kernel image")
+ quit()
else:
if path_exists(self.args.kernel):
kernel_binary = self.args.kernel
--
2.26.2
next prev parent reply other threads:[~2021-02-05 23:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-05 23:53 [PATCH 1/3] test-runner: clean up temporary files James Prestwood
2021-02-05 23:53 ` [PATCH 2/3] test-runner: add monitor to path James Prestwood
2021-02-05 23:53 ` James Prestwood [this message]
2021-02-05 23:58 ` [PATCH 1/3] test-runner: clean up temporary files 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=20210205235308.345635-3-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