File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -505,6 +505,7 @@ clar_usage(const char *arg)
505505 printf (" -q Only report tests that had an error\n" );
506506 printf (" -Q Quit as soon as a test fails\n" );
507507 printf (" -t Display results in tap format\n" );
508+ printf (" -b Run in benchmark mode, displaying times\n" );
508509 printf (" -l Print suite names\n" );
509510 printf (" -r[filename] Write summary file (to the optional filename)\n" );
510511 exit (1 );
@@ -611,6 +612,15 @@ clar_parse_args(int argc, char **argv)
611612 _clar .output_format = CL_OUTPUT_TAP ;
612613 break ;
613614
615+ case 'b' :
616+ if (argument [2 ] != '\0' )
617+ clar_usage (argv [0 ]);
618+
619+ _clar .test_mode = CL_TEST_BENCHMARK ;
620+ _clar .output_format = CL_OUTPUT_TIMING ;
621+ _clar .summary_format = CL_SUMMARY_JSON ;
622+ break ;
623+
614624 case 'l' : {
615625 size_t j ;
616626
Original file line number Diff line number Diff line change 88 -q Only report tests that had an error
99 -Q Quit as soon as a test fails
1010 -t Display results in tap format
11+ -b Run in benchmark mode, displaying times
1112 -l Print suite names
1213 -r[filename] Write summary file (to the optional filename)
You can’t perform that action at this time.
0 commit comments