@@ -405,131 +405,124 @@ def run(cmd_args: list = None) -> None:
405
405
parser = argparse .ArgumentParser (
406
406
description = 'Kirk - All-in-one Linux Testing Framework' )
407
407
408
- # generic arguments
409
- parser .add_argument (
408
+ generic_opts = parser . add_argument_group ( 'General options' )
409
+ generic_opts .add_argument (
410
410
"--version" ,
411
411
"-V" ,
412
412
action = "version" ,
413
413
version = f"%(prog)s, { __version__ } " )
414
-
415
- # user interface arguments
416
- parser .add_argument (
414
+ generic_opts .add_argument (
417
415
"--verbose" ,
418
416
"-v" ,
419
417
action = "store_true" ,
420
418
help = "Verbose mode" )
421
- parser .add_argument (
419
+ generic_opts .add_argument (
422
420
"--no-colors" ,
423
421
"-n" ,
424
422
action = "store_true" ,
425
423
help = "If defined, no colors are shown" )
426
-
427
- # generic directories arguments
428
- parser .add_argument (
424
+ generic_opts .add_argument (
429
425
"--tmp-dir" ,
430
426
"-d" ,
431
427
type = str ,
432
428
default = "/tmp" ,
433
429
help = "Temporary directory" )
434
- parser .add_argument (
430
+ generic_opts .add_argument (
435
431
"--restore" ,
436
- "-R " ,
432
+ "-r " ,
437
433
type = str ,
438
434
help = "Restore a specific session" )
435
+ generic_opts .add_argument (
436
+ "--json-report" ,
437
+ "-o" ,
438
+ type = str ,
439
+ help = "JSON output report" )
439
440
440
- # tests setup arguments
441
- parser .add_argument (
441
+ conf_opts = parser .add_argument_group ('Configuration options' )
442
+ conf_opts .add_argument (
443
+ "--sut" ,
444
+ "-u" ,
445
+ default = "host" ,
446
+ type = _sut_config ,
447
+ help = "System Under Test parameters. For help please use '--sut help'" )
448
+ conf_opts .add_argument (
449
+ "--framework" ,
450
+ "-U" ,
451
+ default = "ltp" ,
452
+ type = _framework_config ,
453
+ help = "Framework parameters. For help please use '--framework help'" )
454
+ conf_opts .add_argument (
442
455
"--env" ,
443
456
"-e" ,
444
457
type = _env_config ,
445
458
help = "List of key=value environment values separated by ':'" )
446
- parser .add_argument (
459
+ conf_opts .add_argument (
447
460
"--skip-tests" ,
448
- "-k " ,
461
+ "-s " ,
449
462
type = str ,
450
463
help = "Skip specific tests" )
451
- parser .add_argument (
464
+ conf_opts .add_argument (
452
465
"--skip-file" ,
453
- "-K " ,
466
+ "-S " ,
454
467
type = str ,
455
468
help = "Skip specific tests using a skip file (newline separated item)" )
456
- parser .add_argument (
469
+
470
+ exec_opts = parser .add_argument_group ('Execution options' )
471
+ exec_opts .add_argument (
472
+ "--run-suite" ,
473
+ "-f" ,
474
+ nargs = "*" ,
475
+ help = "List of suites to run" )
476
+ exec_opts .add_argument (
477
+ "--run-pattern" ,
478
+ "-p" ,
479
+ help = "Run all tests matching the regex pattern" )
480
+ exec_opts .add_argument (
481
+ "--run-command" ,
482
+ "-c" ,
483
+ help = "Command to run" )
484
+ exec_opts .add_argument (
457
485
"--suite-timeout" ,
458
486
"-T" ,
459
487
type = _time_config ,
460
488
default = "1h" ,
461
489
help = "Timeout before stopping the suite (default: 1h)" )
462
- parser .add_argument (
490
+ exec_opts .add_argument (
463
491
"--exec-timeout" ,
464
492
"-t" ,
465
493
type = _time_config ,
466
494
default = "1h" ,
467
495
help = "Timeout before stopping a single execution (default: 1h)" )
468
- parser .add_argument (
469
- "--suite-iterate" ,
496
+ exec_opts .add_argument (
497
+ "--randomize" ,
498
+ "-R" ,
499
+ action = "store_true" ,
500
+ help = "Force parallelization execution of all tests" )
501
+ exec_opts .add_argument (
502
+ "--runtime" ,
470
503
"-I" ,
504
+ type = _time_config ,
505
+ default = "0" ,
506
+ help = "Set for how long we want to run the session in seconds" )
507
+ exec_opts .add_argument (
508
+ "--suite-iterate" ,
509
+ "-i" ,
471
510
type = _iterate_config ,
472
511
default = 1 ,
473
512
help = "Number of times to repeat testing suites" )
474
-
475
- # tests execution arguments
476
- parser .add_argument (
477
- "--run-suite" ,
478
- "-r" ,
479
- nargs = "*" ,
480
- help = "List of suites to run" )
481
- parser .add_argument (
482
- "--run-pattern" ,
483
- "-S" ,
484
- help = "Run all tests matching the regex pattern" )
485
- parser .add_argument (
486
- "--run-command" ,
487
- "-c" ,
488
- help = "Command to run" )
489
- parser .add_argument (
513
+ exec_opts .add_argument (
490
514
"--workers" ,
491
515
"-w" ,
492
516
type = int ,
493
517
default = 1 ,
494
518
help = "Number of workers to execute tests in parallel" )
495
- parser .add_argument (
519
+ exec_opts .add_argument (
496
520
"--force-parallel" ,
497
- "-p " ,
521
+ "-F " ,
498
522
action = "store_true" ,
499
523
help = "Force parallelization execution of all tests" )
500
- parser .add_argument (
501
- "--randomize" ,
502
- "-x" ,
503
- action = "store_true" ,
504
- help = "Force parallelization execution of all tests" )
505
- parser .add_argument (
506
- "--runtime" ,
507
- "-u" ,
508
- type = _time_config ,
509
- default = "0" ,
510
- help = "Set for how long we want to run the session in seconds" )
511
-
512
- # session arguments
513
- parser .add_argument (
514
- "--sut" ,
515
- "-s" ,
516
- default = "host" ,
517
- type = _sut_config ,
518
- help = "System Under Test parameters. For help please use '-s help'" )
519
- parser .add_argument (
520
- "--framework" ,
521
- "-f" ,
522
- default = "ltp" ,
523
- type = _framework_config ,
524
- help = "Framework parameters. For help please use '-f help'" )
525
524
526
525
# output arguments
527
- parser .add_argument (
528
- "--json-report" ,
529
- "-j" ,
530
- type = str ,
531
- help = "JSON output report" )
532
-
533
526
# parse comand line
534
527
args = parser .parse_args (cmd_args )
535
528
0 commit comments