[LTP] [PATCH v2 4/5] docparse: Sort alphabetically tags in table
Petr Vorel
pvorel@suse.cz
Tue May 4 21:02:39 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}};
- for my $tag (@{$json->{'tests'}{$name}{tags}}) {
+ for my $tag (@sorted_tags) {
if (!defined($tmp2)) {
$content .= table . "|Tags|Info\n"
}
--
2.31.1
More information about the ltp
mailing list