@@ -532,21 +532,25 @@ if the source file is not found by the callback.
532
532
.RE
533
533
534
534
.IP 2. 3
535
- The option may be specified as a
535
+ The option may be specified as a single
536
536
.I split_char
537
- separated string (see
537
+ separated string which is divied into words (see
538
538
.B man lcovrc(5)
539
- ) - which is divied into words. The resulting command line is passed
540
- to a shell interpreter to run the script.
541
- This includes the script path followed by optional additional parameters
539
+ ), or as a list of arguments.
540
+ The resulting command line is passed
541
+ to a shell interpreter to be executed.
542
+ The command line includes the script path followed by optional additional parameters
542
543
separated by spaces. Care must be taken to provide proper quoting if script
543
544
path or any parameter contains spaces or shell special characters.
544
545
.PP
545
546
546
547
.IP 3. 3
547
- If an option is specified multiple times, all of the parameters are
548
- split as described above, then concatentated to form the command line.
548
+ If an option is specified multiple times, then the parameters are
549
+ .I not
550
+ split, but are simply concatentated to form the command line - see the examples, below.
549
551
.br
552
+ For simplicity and ease of understanding: your command line should
553
+ pass all arguments individually, or all as a comma-separated list - not a mix of the two.
550
554
.PP
551
555
552
556
.IP 4. 3
@@ -562,19 +566,19 @@ Example:
562
566
.RS
563
567
genhtml --annotate-script /bin/script.sh
564
568
.br
565
- --annotate-script "full" ...
569
+ --annotate-script arg0 ...
566
570
.br
567
571
568
572
results in the same callback as
569
573
570
574
.br
571
- genhtml --annotate-script "/bin/script.sh full " ...
575
+ genhtml --annotate-script "/bin/script.sh arg0 " ...
572
576
.br
573
577
574
578
or
575
579
576
580
.br
577
- genhtml --annotate-script /bin/script.sh,full ...
581
+ genhtml --annotate-script /bin/script.sh,arg0 ...
578
582
.br
579
583
580
584
Note that the first form is preferred.
@@ -587,7 +591,7 @@ callback executes the command line:
587
591
.br
588
592
589
593
.RS
590
- /bin/script.sh "full"
594
+ /bin/script.sh arg0
591
595
.I source_file_name
592
596
.RE
593
597
.br
@@ -598,13 +602,13 @@ Similarly
598
602
genhtml --annotate-script
599
603
.I /bin/myMoodule.pm
600
604
.br
601
- --annotate-script "full" ...
605
+ --annotate-script arg0 --annotate-script arg1 ...
602
606
.br
603
607
604
608
or
605
609
.br
606
610
genhtml --annotate-script
607
- .I /bin/myMoodule.pm,full
611
+ .I /bin/myMoodule.pm,arg0,arg1
608
612
.br
609
613
610
614
.br
@@ -616,10 +620,14 @@ executing
616
620
.br
617
621
618
622
.RS
619
- $annotateCallback = myModule->new("full" );
623
+ $annotateCallback = myModule->new(arg0, arg1 );
620
624
.RE
621
625
622
- to initialize the class object, and then to execute
626
+ to initialize the class object -
627
+ .I arg0
628
+ and
629
+ .I arg1
630
+ passed as strings - and then to execute
623
631
624
632
.RS
625
633
($status, $arrayRef) = $annotateCallback(
@@ -629,6 +637,35 @@ to initialize the class object, and then to execute
629
637
630
638
to retrieve the annotation information.
631
639
640
+ In contrast, the command
641
+ .br
642
+ .RS
643
+ genhtml --annotate-script
644
+ .I /bin/myMoodule.pm
645
+ .br
646
+ --annotate-script arg0,arg1 ...
647
+ .RE
648
+ would result in
649
+ .B genhtml
650
+ initializing the callback object via
651
+ .br
652
+
653
+ .RS
654
+ $annotateCallback = myModule->new("arg0,arg1");
655
+ .RE
656
+ where "arg0,arg1" is passed as single comma-separated string.
657
+
658
+ Similarly, the command
659
+ .br
660
+ .RS
661
+ genhtml --annotate-script
662
+ .I /bin/myMoodule.pm,arg0
663
+ .br
664
+ --annotate-script arg1 ...
665
+ .RE
666
+ would very likely result in an error when genhtml tries to find
667
+ a script called "/bin/mymodule.pm,arg0".
668
+
632
669
633
670
Note that multiple instances of each script may execute simultaneously if the
634
671
.B \-\- parallel
0 commit comments