Hoa Nguyen has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/34198 )
Change subject: ext: Add support for comma-separated inputs of testlib
argparser
......................................................................
ext: Add support for comma-separated inputs of testlib argparser
Currently, the --isa, --variant and --length options of testlib
do not support comma-separated inputs. This commit adds the
support for such an input for those options.
Change-Id: I3c276a9b9d9c6b0b802ecf8e7f1f9a3dfafe45d1
Signed-off-by: Hoa Nguyen <hoangu...@ucdavis.edu>
---
M ext/testlib/configuration.py
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/ext/testlib/configuration.py b/ext/testlib/configuration.py
index 1267c25..8533cc0 100644
--- a/ext/testlib/configuration.py
+++ b/ext/testlib/configuration.py
@@ -486,6 +486,8 @@
'''
global common_args
+ parse_comma_separated_string = lambda st: st.split(',')
+
# A list of common arguments/flags used across cli parsers.
common_args = [
Argument(
@@ -503,20 +505,20 @@
help='A tag comparison used to select tests.'),
Argument(
'--isa',
- action='append',
- default=[],
+ default='',
+ type = parse_comma_separated_string,
help="Only tests that are valid with one of these ISAs. "
"Comma separated."),
Argument(
'--variant',
- action='append',
- default=[],
+ default='',
+ type = parse_comma_separated_string,
help="Only tests that are valid with one of these binary
variants"
"(e.g., opt, debug). Comma separated."),
Argument(
'--length',
- action='append',
- default=[],
+ default='',
+ type = parse_comma_separated_string,
help="Only tests that are one of these lengths. Comma
separated."),
Argument(
'--host',
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/34198
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I3c276a9b9d9c6b0b802ecf8e7f1f9a3dfafe45d1
Gerrit-Change-Number: 34198
Gerrit-PatchSet: 1
Gerrit-Owner: Hoa Nguyen <hoangu...@ucdavis.edu>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s