Skip to content

Commit ec08493

Browse files
committed
fix: Use zello_sysman option names for info log tests in pyzes black box test
zello_sysman runs the info log test with -L and takes --instanceapi, --instancepeek, --instanceread and --buffersize. Use the same spellings instead of -l, --instance-api, --instance-peek, --instance-read and --buffer-size. Related-To: SYSM-432 Signed-off-by: Aviral Nigam <aviral.nigam@intel.com>
1 parent 8ee6177 commit ec08493

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

‎bindings/sysman/python/source/examples/pyzes_black_box_test.py‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ def test_info_log_module(
13751375

13761376
if mode is None:
13771377
print_verbose(
1378-
"\nRecords are collected with --instance-api, --instance-peek or --instance-read"
1378+
"\nRecords are collected with --instanceapi, --instancepeek or --instanceread"
13791379
)
13801380
return True
13811381

@@ -1981,9 +1981,9 @@ def main():
19811981
%(prog)s -f # Frequency tests only
19821982
%(prog)s -t # Temperature tests only
19831983
%(prog)s -e # Engine tests only
1984-
%(prog)s -l # Info log properties tests only
1985-
%(prog)s -l --instance-api # Info log tests, verify peek and read on a named collection instance
1986-
%(prog)s -l --instance-read --instance mylog --buffer-size 1024 # Info log tests, read the records of a named 1 MB collection instance
1984+
%(prog)s -L # Info log properties tests only
1985+
%(prog)s -L --instanceapi # Info log tests, verify peek and read on a named collection instance
1986+
%(prog)s -L --instanceread --instance mylog --buffersize 1024 # Info log tests, read the records of a named 1 MB collection instance
19871987
%(prog)s -h # Show help message""",
19881988
formatter_class=argparse.RawDescriptionHelpFormatter,
19891989
)
@@ -2022,60 +2022,60 @@ def main():
20222022
)
20232023
parser.add_argument("-e", "--engine", action="store_true", help="Run engine tests ")
20242024
parser.add_argument(
2025-
"-l",
2025+
"-L",
20262026
"--infolog",
20272027
action="store_true",
20282028
help="Run only info log tests, reporting what each info log supports",
20292029
)
20302030
instance_mode = parser.add_mutually_exclusive_group()
20312031
instance_mode.add_argument(
2032-
"--instance-api",
2032+
"--instanceapi",
20332033
action="store_const",
20342034
const="api",
20352035
dest="instance_mode",
2036-
help="With -l, create a named collection instance, wait for CPER records, then verify peek and read (requires root)",
2036+
help="With -L, create a named collection instance, wait for CPER records, then verify peek and read (requires root)",
20372037
)
20382038
instance_mode.add_argument(
2039-
"--instance-peek",
2039+
"--instancepeek",
20402040
action="store_const",
20412041
const="peek",
20422042
dest="instance_mode",
2043-
help="With -l, create a collection instance and peek the records (requires root)",
2043+
help="With -L, create a collection instance and peek the records (requires root)",
20442044
)
20452045
instance_mode.add_argument(
2046-
"--instance-read",
2046+
"--instanceread",
20472047
action="store_const",
20482048
const="read",
20492049
dest="instance_mode",
2050-
help="With -l, create a collection instance and read the records (requires root)",
2050+
help="With -L, create a collection instance and read the records (requires root)",
20512051
)
20522052
parser.add_argument(
20532053
"--instance",
20542054
metavar="NAME",
2055-
help="With --instance-peek/--instance-read, collect into a named instance instead of the default buffer",
2055+
help="With --instancepeek/--instanceread, collect into a named instance instead of the default buffer",
20562056
)
20572057
parser.add_argument(
2058-
"--buffer-size",
2058+
"--buffersize",
20592059
type=int,
20602060
metavar="KB",
2061-
help="With --instance-peek/--instance-read, request a total collection buffer size in kilobytes",
2061+
help="With --instancepeek/--instanceread, request a total collection buffer size in kilobytes",
20622062
)
20632063
parser.add_argument(
20642064
"--timeout",
20652065
type=int,
20662066
default=INFO_LOG_READ_TIMEOUT_MS,
20672067
metavar="MS",
2068-
help=f"With -l, maximum time in milliseconds to search for records, default is {INFO_LOG_READ_TIMEOUT_MS}",
2068+
help=f"With -L, maximum time in milliseconds to search for records, default is {INFO_LOG_READ_TIMEOUT_MS}",
20692069
)
20702070

20712071
args = parser.parse_args()
2072-
if args.buffer_size is not None and args.buffer_size <= 0:
2073-
parser.error("--buffer-size must be a positive integer")
2072+
if args.buffersize is not None and args.buffersize <= 0:
2073+
parser.error("--buffersize must be a positive integer")
20742074
if (
2075-
args.instance is not None or args.buffer_size is not None
2075+
args.instance is not None or args.buffersize is not None
20762076
) and args.instance_mode not in ("peek", "read"):
20772077
parser.error(
2078-
"--instance and --buffer-size are used with --instance-peek or --instance-read"
2078+
"--instance and --buffersize are used with --instancepeek or --instanceread"
20792079
)
20802080
if args.timeout < 0:
20812081
parser.error("--timeout must be a non-negative integer")
@@ -2123,7 +2123,7 @@ def main():
21232123
driver_idx,
21242124
mode=args.instance_mode,
21252125
instance_name=args.instance,
2126-
buffer_size_kb=args.buffer_size,
2126+
buffer_size_kb=args.buffersize,
21272127
timeout=args.timeout,
21282128
):
21292129
success = False

0 commit comments

Comments
 (0)