[LTP] [PATCH v2 4/5] docparse: Sort alphabetically tags in table

Petr Vorel pvorel@suse.cz
Thu May 13 20:17:35 CEST 2021


> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>  docparse/testinfo.pl | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

> diff --git a/docparse/testinfo.pl b/docparse/testinfo.pl
> index 2aeee1a17..857278ac8 100755
> --- a/docparse/testinfo.pl
> +++ b/docparse/testinfo.pl
> @@ -424,8 +424,9 @@ sub content_all_tests

>  		$tmp2 = undef;
>  		my %commits;
> +		my @sorted_tags = sort { $a->[0] cmp $b->[0] } @{$json->{'tests'}{$name}{tags}};
Hm, this introduced bug on older perl. I'll send a fix for it.

Kind regards,
Petr

> -		for my $tag (@{$json->{'tests'}{$name}{tags}}) {
> +		for my $tag (@sorted_tags) {
>  			if (!defined($tmp2)) {
>  				$content .= table . "|Tags|Info\n"
>  			}


More information about the ltp mailing list