Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 1 | #!/usr/bin/env perl |
| 2 | use strict; |
| 3 | use warnings; |
| 4 | |
| 5 | use File::Glob; |
| 6 | use Getopt::Long; |
| 7 | use Term::ANSIColor qw(:constants); |
| 8 | use File::Basename; |
| 9 | use Cwd; |
| 10 | |
| 11 | my $app = $0; |
| 12 | |
| 13 | sub read_sum($); |
| 14 | sub read_unstable($); |
| 15 | sub dump_result($); |
| 16 | sub compare_results($$); |
| 17 | sub usage(); |
| 18 | sub print_compare_results_summary($$); |
| 19 | sub nothing($$$$); |
Thiago Jung Bauermann | 99efda8 | 2023-02-28 23:03:05 +0000 | [diff] [blame] | 20 | sub merge($$@); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 21 | |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 22 | my $PASS_PASS = "Still passes [PASS => PASS]"; |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 23 | my $PASS_XPASS = "PASS now XPASS [PASS =>XPASS]"; |
| 24 | my $PASS_FAIL = "PASS now FAIL [PASS => FAIL]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 25 | my $PASS_XFAIL = "PASS now XFAIL [PASS =>XFAIL]"; |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 26 | my $PASS_KFAIL = "PASS now KFAIL [PASS =>KFAIL]"; |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 27 | my $PASS_UNSUPPORTED = "PASS now UNSUPPORTED [PASS =>UNSUP]"; |
| 28 | my $PASS_UNRESOLVED = "PASS now UNRESOLVED [PASS =>UNRES]"; |
| 29 | my $PASS_UNTESTED = "PASS now UNTESTED [PASS =>UNTES]"; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 30 | my $PASS_DISAPPEARS = "PASS disappears [PASS => ]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 31 | my $PASS_APPEARS = "New PASS [ => PASS]"; |
| 32 | my $PASSED_NOW_TIMEOUTS = "Timeout [PASS =>T.OUT]"; |
| 33 | |
| 34 | my $XPASS_PASS = "XPASS now PASS [XPASS=> PASS]"; |
| 35 | my $XPASS_XPASS = "Still xpass [XPASS=>XPASS]"; |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 36 | my $XPASS_FAIL = "XPASS now FAIL [XPASS=> FAIL]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 37 | my $XPASS_XFAIL = "XPASS now XFAIL [XPASS=>XFAIL]"; |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 38 | my $XPASS_KFAIL = "XPASS now KFAIL [XPASS=>KFAIL]"; |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 39 | my $XPASS_UNSUPPORTED = "XPASS now UNSUPPORTED [XPASS=>UNSUP]"; |
| 40 | my $XPASS_UNRESOLVED = "XPASS now UNRESOLVED [XPASS=>UNRES]"; |
| 41 | my $XPASS_UNTESTED = "XPASS now UNTESTED [XPASS=>UNTES]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 42 | my $XPASS_DISAPPEARS = "XPASS disappears [XPASS=> ]"; |
| 43 | my $XPASS_APPEARS = "XPASS appears [ =>XPASS]"; |
| 44 | |
| 45 | my $FAIL_PASS = "FAIL now PASS [FAIL => PASS]"; |
| 46 | my $FAIL_XPASS = "FAIL now XPASS [FAIL =>XPASS]"; |
| 47 | my $FAIL_FAIL = "Still fails [FAIL => FAIL]"; |
| 48 | my $FAIL_XFAIL = "FAIL now XFAIL [FAIL =>XFAIL]"; |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 49 | my $FAIL_KFAIL = "FAIL now KFAIL [FAIL =>KFAIL]"; |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 50 | my $FAIL_UNSUPPORTED = "FAIL now UNSUPPORTED [FAIL =>UNSUP]"; |
| 51 | my $FAIL_UNRESOLVED = "FAIL now UNRESOLVED [FAIL =>UNRES]"; |
| 52 | my $FAIL_UNTESTED = "FAIL now UNTESTED [FAIL =>UNTES]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 53 | my $FAIL_DISAPPEARS = "FAIL disappears [FAIL => ]"; |
| 54 | my $FAIL_APPEARS = "FAIL appears [ => FAIL]"; |
| 55 | |
| 56 | my $XFAIL_PASS = "XFAIL now PASS [XFAIL=> PASS]"; |
| 57 | my $XFAIL_XPASS = "XFAIL now XPASS [XFAIL=>XPASS]"; |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 58 | my $XFAIL_FAIL = "XFAIL now FAIL [XFAIL=> FAIL]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 59 | my $XFAIL_XFAIL = "Still xfail [XFAIL=>XFAIL]"; |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 60 | my $XFAIL_KFAIL = "XFAIL now KFAIL [XFAIL=>KFAIL]"; |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 61 | my $XFAIL_UNSUPPORTED = "XFAIL now UNSUPPORTED [XFAIL=>UNSUP]"; |
| 62 | my $XFAIL_UNRESOLVED = "XFAIL now UNRESOLVED [XFAIL=>UNRES]"; |
| 63 | my $XFAIL_UNTESTED = "XFAIL now UNTESTED [XFAIL=>UNTES]"; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 64 | my $XFAIL_DISAPPEARS = "XFAIL disappears [XFAIL=> ]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 65 | my $XFAIL_APPEARS = "XFAIL appears [ =>XFAIL]"; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 66 | |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 67 | my $KFAIL_PASS = "KFAIL now PASS [KFAIL=> PASS]"; |
| 68 | my $KFAIL_XPASS = "KFAIL now XPASS [KFAIL=>XPASS]"; |
| 69 | my $KFAIL_FAIL = "KFAIL now FAIL [KFAIL=> FAIL]"; |
| 70 | my $KFAIL_XFAIL = "KFAIL now XFAIL [KFAIL=>XFAIL]"; |
| 71 | my $KFAIL_KFAIL = "Still kfail [KFAIL=>KFAIL]"; |
| 72 | my $KFAIL_UNSUPPORTED = "KFAIL now UNSUPPORTED [KFAIL=>UNSUP]"; |
| 73 | my $KFAIL_UNRESOLVED = "KFAIL now UNRESOLVED [KFAIL=>UNRES]"; |
| 74 | my $KFAIL_UNTESTED = "KFAIL now UNTESTED [KFAIL=>UNTES]"; |
| 75 | my $KFAIL_DISAPPEARS = "KFAIL disappears [KFAIL=> ]"; |
| 76 | my $KFAIL_APPEARS = "KFAIL appears [ =>KFAIL]"; |
| 77 | |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 78 | my $UNSUPPORTED_PASS = "UNSUPPORTED now PASS [UNSUP=> PASS]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 79 | my $UNSUPPORTED_XPASS = "UNSUPPORTED now XPASS [UNSUP=>XPASS]"; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 80 | my $UNSUPPORTED_FAIL = "UNSUPPORTED now FAIL [UNSUP=> FAIL]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 81 | my $UNSUPPORTED_XFAIL = "UNSUPPORTED now XFAIL [UNSUP=>XFAIL]"; |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 82 | my $UNSUPPORTED_KFAIL = "UNSUPPORTED now KFAIL [UNSUP=>KFAIL]"; |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 83 | my $UNSUPPORTED_UNSUPPORTED= "UNSUPP now UNSUPP [UNSUP=>UNSUP]"; |
| 84 | my $UNSUPPORTED_UNRESOLVED= "UNSUPP now UNRESOLVED [UNSUP=>UNRES]"; |
| 85 | my $UNSUPPORTED_UNTESTED = "UNSUPP now UNTESTED [UNSUP=>UNTES]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 86 | my $UNSUPPORTED_DISAPPEARS= "UNSUPPORTED disappears [UNSUP=> ]"; |
| 87 | my $UNSUPPORTED_APPEARS = "UNSUPPORTED appears [ =>UNSUP]"; |
| 88 | |
| 89 | my $UNTESTED_PASS = "UNTESTED now PASS [UNTES=> PASS]"; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 90 | my $UNTESTED_XPASS = "UNTESTED now XPASS [UNTES=>XPASS]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 91 | my $UNTESTED_FAIL = "UNTESTED now FAIL [UNTES=> FAIL]"; |
| 92 | my $UNTESTED_XFAIL = "UNTESTED now XFAIL [UNTES=>XFAIL]"; |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 93 | my $UNTESTED_KFAIL = "UNTESTED now KFAIL [UNTES=>KFAIL]"; |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 94 | my $UNTESTED_UNSUPPORTED = "UNTESTED now UNSUPP [UNTES=>UNSUP]"; |
| 95 | my $UNTESTED_UNRESOLVED = "UNTESTED now UNRESOLVED [UNTES=>UNRES]"; |
| 96 | my $UNTESTED_UNTESTED = "UNTESTED now UNTESTED [UNTES=>UNTES]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 97 | my $UNTESTED_DISAPPEARS = "UNTESTED disappears [UNTES=> ]"; |
| 98 | my $UNTESTED_APPEARS = "UNTESTED appears [ =>UNTES]"; |
| 99 | |
| 100 | my $UNRESOLVED_PASS = "UNRESOLVED now PASS [UNRES=> PASS]"; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 101 | my $UNRESOLVED_XPASS = "UNRESOLVED now XPASS [UNRES=>XPASS]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 102 | my $UNRESOLVED_FAIL = "UNRESOLVED now FAIL [UNRES=> FAIL]"; |
| 103 | my $UNRESOLVED_XFAIL = "UNRESOLVED now XFAIL [UNRES=>XFAIL]"; |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 104 | my $UNRESOLVED_KFAIL = "UNRESOLVED now KFAIL [UNRES=>KFAIL]"; |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 105 | my $UNRESOLVED_UNSUPPORTED= "UNRESOLVED now UNSUPP [UNRES=>UNSUP]"; |
| 106 | my $UNRESOLVED_UNRESOLVED = "UNRESOLVED now UNRESOLVED [UNRES=>UNRES]"; |
| 107 | my $UNRESOLVED_UNTESTED = "UNRESOLVED now UNTESTED [UNRES=>UNTES]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 108 | my $UNRESOLVED_DISAPPEARS = "UNRESOLVED disappears [UNRES=> ]"; |
| 109 | my $UNRESOLVED_APPEARS = "UNRESOLVED appears [ =>UNRES]"; |
| 110 | |
Christophe Lyon | bcbd748 | 2016-09-19 14:54:50 +0200 | [diff] [blame] | 111 | my $ERROR_DISAPPEARS = "ERROR disappears [ERROR=> ]"; |
| 112 | my $ERROR_APPEARS = "ERROR appears [ =>ERROR]"; |
| 113 | |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 114 | my $UNHANDLED_CASES = "Unhandled cases [ ..??.. ]"; |
| 115 | my $UNSTABLE_CASES = "Unstable cases, ignored [~RANDOM ]"; |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 116 | my $HWDEP_CASES = "HW dependent cases [HW-DEPENDENT]"; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 117 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 118 | # Handle status transitions: |
| 119 | # 'was' is the reference status |
| 120 | # 'is' is the current status |
| 121 | # 'cat' is the short name for the transition type |
| 122 | # 'handler' is a function handling the transition, if non-trivial |
| 123 | # report_hwdep is a boolean controlling whether to report the |
| 124 | # transition even if flagged as hardware-dependent |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 125 | my @handler_list = ( |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 126 | {was=>"PASS", is=>"PASS", cat=>$PASS_PASS, report_hwdep=>"false"}, |
| 127 | {was=>"PASS", is=>"XPASS", cat=>$PASS_XPASS, report_hwdep=>"true"}, |
| 128 | {was=>"PASS", is=>"FAIL", handler=>\&handle_pass_fail, report_hwdep=>"true"}, |
| 129 | {was=>"PASS", is=>"XFAIL", cat=>$PASS_XFAIL, report_hwdep=>"true"}, |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 130 | {was=>"PASS", is=>"KFAIL", cat=>$PASS_KFAIL, report_hwdep=>"true"}, |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 131 | {was=>"PASS", is=>"UNSUPPORTED",cat=>$PASS_UNSUPPORTED, report_hwdep=>"false"}, |
| 132 | {was=>"PASS", is=>"UNTESTED", cat=>$PASS_UNTESTED, report_hwdep=>"true"}, |
| 133 | {was=>"PASS", is=>"UNRESOLVED",cat=>$PASS_UNRESOLVED, report_hwdep=>"true"}, |
| 134 | {was=>"PASS", is=>"NO_EXIST", cat=>$PASS_DISAPPEARS, report_hwdep=>"false"}, |
| 135 | {was=>"NO_EXIST", is=>"PASS", cat=>$PASS_APPEARS, report_hwdep=>"false"}, |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 136 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 137 | {was=>"XPASS", is=>"PASS", cat=>$XPASS_PASS, report_hwdep=>"true"}, |
| 138 | {was=>"XPASS", is=>"XPASS", cat=>$XPASS_XPASS, report_hwdep=>"true"}, |
| 139 | {was=>"XPASS", is=>"FAIL", cat=>$XPASS_FAIL, report_hwdep=>"true"}, |
| 140 | {was=>"XPASS", is=>"XFAIL", cat=>$XPASS_XFAIL, report_hwdep=>"true"}, |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 141 | {was=>"XPASS", is=>"KFAIL", cat=>$XPASS_KFAIL, report_hwdep=>"true"}, |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 142 | {was=>"XPASS", is=>"UNSUPPORTED",cat=>$XPASS_UNSUPPORTED, report_hwdep=>"true"}, |
| 143 | {was=>"XPASS", is=>"UNTESTED", cat=>$XPASS_UNTESTED, report_hwdep=>"true"}, |
| 144 | {was=>"XPASS", is=>"UNRESOLVED",cat=>$XPASS_UNRESOLVED, report_hwdep=>"true"}, |
| 145 | {was=>"XPASS", is=>"NO_EXIST", cat=>$XPASS_DISAPPEARS, report_hwdep=>"true"}, |
| 146 | {was=>"NO_EXIST", is=>"XPASS", cat=>$XPASS_APPEARS, report_hwdep=>"true"}, |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 147 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 148 | {was=>"FAIL", is=>"PASS", cat=>$FAIL_PASS, report_hwdep=>"true"}, |
| 149 | {was=>"FAIL", is=>"XPASS", cat=>$FAIL_XPASS, report_hwdep=>"true"}, |
| 150 | {was=>"FAIL", is=>"FAIL", cat=>$FAIL_FAIL, report_hwdep=>"true"}, |
| 151 | {was=>"FAIL", is=>"XFAIL", cat=>$FAIL_XFAIL, report_hwdep=>"true"}, |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 152 | {was=>"FAIL", is=>"KFAIL", cat=>$FAIL_KFAIL, report_hwdep=>"true"}, |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 153 | {was=>"FAIL", is=>"UNSUPPORTED",cat=>$FAIL_UNSUPPORTED, report_hwdep=>"true"}, |
| 154 | {was=>"FAIL", is=>"UNTESTED", cat=>$FAIL_UNTESTED, report_hwdep=>"true"}, |
| 155 | {was=>"FAIL", is=>"UNRESOLVED",cat=>$FAIL_UNRESOLVED, report_hwdep=>"true"}, |
| 156 | {was=>"FAIL", is=>"NO_EXIST", cat=>$FAIL_DISAPPEARS, report_hwdep=>"true"}, |
| 157 | {was=>"NO_EXIST", is=>"FAIL", cat=>$FAIL_APPEARS, report_hwdep=>"true"}, |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 158 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 159 | {was=>"XFAIL", is=>"PASS", cat=>$XFAIL_PASS, report_hwdep=>"true"}, |
| 160 | {was=>"XFAIL", is=>"XPASS", cat=>$XFAIL_XPASS, report_hwdep=>"true"}, |
| 161 | {was=>"XFAIL", is=>"FAIL", cat=>$XFAIL_FAIL, report_hwdep=>"true"}, |
| 162 | {was=>"XFAIL", is=>"XFAIL", cat=>$XFAIL_XFAIL, report_hwdep=>"true"}, |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 163 | {was=>"XFAIL", is=>"KFAIL", cat=>$XFAIL_KFAIL, report_hwdep=>"true"}, |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 164 | {was=>"XFAIL", is=>"UNSUPPORTED",cat=>$XFAIL_UNSUPPORTED, report_hwdep=>"true"}, |
| 165 | {was=>"XFAIL", is=>"UNTESTED", cat=>$XFAIL_UNTESTED, report_hwdep=>"true"}, |
| 166 | {was=>"XFAIL", is=>"UNRESOLVED",cat=>$XFAIL_UNRESOLVED, report_hwdep=>"true"}, |
| 167 | {was=>"XFAIL", is=>"NO_EXIST", cat=>$XFAIL_DISAPPEARS, report_hwdep=>"true"}, |
| 168 | {was=>"NO_EXIST", is=>"XFAIL", cat=>$XFAIL_APPEARS, report_hwdep=>"true"}, |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 169 | |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 170 | {was=>"KFAIL", is=>"PASS", cat=>$KFAIL_PASS, report_hwdep=>"true"}, |
| 171 | {was=>"KFAIL", is=>"XPASS", cat=>$KFAIL_XPASS, report_hwdep=>"true"}, |
| 172 | {was=>"KFAIL", is=>"FAIL", cat=>$KFAIL_FAIL, report_hwdep=>"true"}, |
| 173 | {was=>"KFAIL", is=>"XFAIL", cat=>$KFAIL_XFAIL, report_hwdep=>"true"}, |
| 174 | {was=>"KFAIL", is=>"KFAIL", cat=>$KFAIL_KFAIL, report_hwdep=>"true"}, |
| 175 | {was=>"KFAIL", is=>"UNSUPPORTED",cat=>$KFAIL_UNSUPPORTED, report_hwdep=>"true"}, |
| 176 | {was=>"KFAIL", is=>"UNTESTED", cat=>$KFAIL_UNTESTED, report_hwdep=>"true"}, |
| 177 | {was=>"KFAIL", is=>"UNRESOLVED",cat=>$KFAIL_UNRESOLVED, report_hwdep=>"true"}, |
| 178 | {was=>"KFAIL", is=>"NO_EXIST", cat=>$KFAIL_DISAPPEARS, report_hwdep=>"true"}, |
| 179 | {was=>"NO_EXIST", is=>"KFAIL", cat=>$KFAIL_APPEARS, report_hwdep=>"true"}, |
| 180 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 181 | {was=>"UNSUPPORTED", is=>"PASS", cat=>$UNSUPPORTED_PASS, report_hwdep=>"true"}, |
| 182 | {was=>"UNSUPPORTED", is=>"XPASS", cat=>$UNSUPPORTED_XPASS, report_hwdep=>"true"}, |
| 183 | {was=>"UNSUPPORTED", is=>"FAIL", cat=>$UNSUPPORTED_FAIL, report_hwdep=>"true"}, |
| 184 | {was=>"UNSUPPORTED", is=>"XFAIL", cat=>$UNSUPPORTED_XFAIL, report_hwdep=>"true"}, |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 185 | {was=>"UNSUPPORTED", is=>"KFAIL", cat=>$UNSUPPORTED_KFAIL, report_hwdep=>"true"}, |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 186 | {was=>"UNSUPPORTED", is=>"UNSUPPORTED",cat=>$UNSUPPORTED_UNSUPPORTED, report_hwdep=>"true"}, |
| 187 | {was=>"UNSUPPORTED", is=>"UNTESTED", cat=>$UNSUPPORTED_UNTESTED, report_hwdep=>"true"}, |
| 188 | {was=>"UNSUPPORTED", is=>"UNRESOLVED",cat=>$UNSUPPORTED_UNRESOLVED, report_hwdep=>"true"}, |
| 189 | {was=>"UNSUPPORTED", is=>"NO_EXIST", cat=>$UNSUPPORTED_DISAPPEARS, report_hwdep=>"true"}, |
| 190 | {was=>"NO_EXIST", is=>"UNSUPPORTED", cat=>$UNSUPPORTED_APPEARS, report_hwdep=>"true"}, |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 191 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 192 | {was=>"UNTESTED", is=>"PASS", cat=>$UNTESTED_PASS, report_hwdep=>"true"}, |
| 193 | {was=>"UNTESTED", is=>"XPASS", cat=>$UNTESTED_XPASS, report_hwdep=>"true"}, |
| 194 | {was=>"UNTESTED", is=>"FAIL", cat=>$UNTESTED_FAIL, report_hwdep=>"true"}, |
| 195 | {was=>"UNTESTED", is=>"XFAIL", cat=>$UNTESTED_XFAIL, report_hwdep=>"true"}, |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 196 | {was=>"UNTESTED", is=>"KFAIL", cat=>$UNTESTED_KFAIL, report_hwdep=>"true"}, |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 197 | {was=>"UNTESTED", is=>"UNSUPPORTED",cat=>$UNTESTED_UNSUPPORTED,report_hwdep=>"true"}, |
| 198 | {was=>"UNTESTED", is=>"UNTESTED", cat=>$UNTESTED_UNTESTED, report_hwdep=>"true"}, |
| 199 | {was=>"UNTESTED", is=>"UNRESOLVED",cat=>$UNTESTED_UNRESOLVED, report_hwdep=>"true"}, |
| 200 | {was=>"UNTESTED", is=>"NO_EXIST", cat=>$UNTESTED_DISAPPEARS, report_hwdep=>"true"}, |
| 201 | {was=>"NO_EXIST", is=>"UNTESTED", cat=>$UNTESTED_APPEARS, report_hwdep=>"true"}, |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 202 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 203 | {was=>"UNRESOLVED", is=>"PASS", cat=>$UNRESOLVED_PASS, report_hwdep=>"true"}, |
| 204 | {was=>"UNRESOLVED", is=>"XPASS", cat=>$UNRESOLVED_XPASS, report_hwdep=>"true"}, |
| 205 | {was=>"UNRESOLVED", is=>"FAIL", cat=>$UNRESOLVED_FAIL, report_hwdep=>"true"}, |
| 206 | {was=>"UNRESOLVED", is=>"XFAIL", cat=>$UNRESOLVED_XFAIL, report_hwdep=>"true"}, |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 207 | {was=>"UNRESOLVED", is=>"KFAIL", cat=>$UNRESOLVED_KFAIL, report_hwdep=>"true"}, |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 208 | {was=>"UNRESOLVED", is=>"UNSUPPORTED",cat=>$UNRESOLVED_UNSUPPORTED, report_hwdep=>"true"}, |
| 209 | {was=>"UNRESOLVED", is=>"UNTESTED", cat=>$UNRESOLVED_UNTESTED, report_hwdep=>"true"}, |
| 210 | {was=>"UNRESOLVED", is=>"UNRESOLVED",cat=>$UNRESOLVED_UNRESOLVED, report_hwdep=>"true"}, |
| 211 | {was=>"UNRESOLVED", is=>"NO_EXIST", cat=>$UNRESOLVED_DISAPPEARS, report_hwdep=>"true"}, |
| 212 | {was=>"NO_EXIST", is=>"UNRESOLVED", cat=>$UNRESOLVED_APPEARS, report_hwdep=>"true"}, |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 213 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 214 | {was=>"ERROR", is=>"NO_EXIST", cat=>$ERROR_DISAPPEARS, report_hwdep=>"true"}, |
| 215 | {was=>"NO_EXIST", is=>"ERROR", cat=>$ERROR_APPEARS, report_hwdep=>"true"}, |
Christophe Lyon | bcbd748 | 2016-09-19 14:54:50 +0200 | [diff] [blame] | 216 | |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 217 | # {was=>"NO_EXIST", is=>"NO_EXIST", handler=>\&handle_not_yet_supported} |
| 218 | ); |
| 219 | |
| 220 | ###################################################### |
| 221 | # TREAT ARGUMENTS |
| 222 | |
| 223 | my $verbose=0; |
| 224 | my $quiet=0; |
| 225 | my $long=0; |
| 226 | my $short=0; |
| 227 | my $debug=0; |
Thiago Jung Bauermann | 99efda8 | 2023-02-28 23:03:05 +0000 | [diff] [blame] | 228 | my $merge_mode=0; # Merge result sum files into reference sum file |
| 229 | my $output_file; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 230 | my ($testroot, $basename); |
| 231 | my ($ref_file_name, $res_file_name); |
| 232 | my $nounstable=0; |
| 233 | my $unstablefile=0; |
| 234 | my @unstable_markers=(); |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 235 | |
| 236 | my $no_hwdep=0; # Ignore hw-dependent flag (ie. consider all tests as *not* hw-dependent |
| 237 | my $hwdep_file=0; # File containing the list of hw-dependent tests |
| 238 | my @hwdep_markers=(); # Optional markers when parsing hwdep_file |
| 239 | |
Christophe Lyon | ca9d830 | 2017-05-22 12:04:00 +0000 | [diff] [blame] | 240 | my $ratio_thresh = 0.95; # Warn if pass ratio is below this threshold |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 241 | |
| 242 | GetOptions ("l" => \$long, |
Thiago Jung Bauermann | 99efda8 | 2023-02-28 23:03:05 +0000 | [diff] [blame] | 243 | "o=s" => \$output_file, |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 244 | "s" => \$short, |
| 245 | "q" => \$quiet, |
| 246 | "v" => \$verbose, |
| 247 | "dbg" => \$debug, |
| 248 | "testroot=s" => \$testroot, |
| 249 | "basename=s" => \$basename, |
Christophe Lyon | ca9d830 | 2017-05-22 12:04:00 +0000 | [diff] [blame] | 250 | "pass-thresh=f" => \$ratio_thresh, |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 251 | "no-unstable" => \$nounstable, |
| 252 | "unstable-tests=s" => \$unstablefile, |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 253 | "unstable-marker=s" => \@unstable_markers, |
| 254 | "no-hwdep" => \$no_hwdep, |
| 255 | "hwdep-tests=s" => \$hwdep_file, |
Thiago Jung Bauermann | 99efda8 | 2023-02-28 23:03:05 +0000 | [diff] [blame] | 256 | "hwdep-marker=s" => \@hwdep_markers, |
| 257 | "merge" => \$merge_mode); |
| 258 | |
| 259 | # Merge is a separate operating mode of this script where instead of comparing sum files, |
| 260 | # it merges them. It could be a separate script, but it's kept here to reuse the sum file |
| 261 | # parsing code. |
| 262 | # |
| 263 | # In this mode, the script will merge the sum files provided as arguments into one |
| 264 | # synthetic sum file. The reference sum file will be the first one provided as argument. |
| 265 | # For tests that didn't pass, check the other sum files to see whether that test PASSed or |
| 266 | # XFAILed in any of them. If so, the status for the test is changed to PASS or XFAIL in |
| 267 | # the reference file. The result is written to the file given by the '-o' option. |
| 268 | if ($merge_mode) { |
| 269 | $ref_file_name = shift(@ARGV); |
| 270 | my $ref = read_sum($ref_file_name); |
| 271 | my @res; |
| 272 | foreach (@ARGV) { |
| 273 | push(@res, read_sum($_)); |
| 274 | } |
| 275 | |
| 276 | exit merge($output_file, $ref_file_name, @res); |
| 277 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 278 | |
| 279 | $ref_file_name = $ARGV[0] if ($#ARGV == 1); |
| 280 | $res_file_name = $ARGV[1] if ($#ARGV == 1); |
| 281 | |
| 282 | $ref_file_name = $testroot."/expected_results/".$basename if ($testroot and $basename); |
| 283 | $res_file_name = $testroot."/testing/run/".$basename if ($testroot and $basename); |
| 284 | &usage if (not $ref_file_name or not $res_file_name); |
| 285 | |
| 286 | my ($col_boldred, $col_red, $col_boldgreen, $col_green, $col_boldpink, $col_pink, $col_reset) |
| 287 | = ("\033[31;1m","\033[31;3m","\033[32;1m","\033[32;3m","\033[35;1m","\033[35;2m","\033[0m"); |
| 288 | ($col_boldred, $col_red, $col_boldgreen, $col_green, $col_boldpink, $col_pink, $col_reset) |
| 289 | = ("","","","","","","") if (not I_am_interactive()); |
| 290 | |
| 291 | ###################################################### |
| 292 | # MAIN PROGRAM |
| 293 | # print "comparing $ref_file_name $res_file_name\n"; |
| 294 | |
| 295 | # If none of the 2 .sum exists, nothing to compare: exit early. |
| 296 | exit 0 if ( (! -e $ref_file_name) && (! -e $res_file_name )); |
| 297 | |
| 298 | my $ref = read_sum($ref_file_name) ; |
| 299 | my $res = read_sum($res_file_name) ; |
| 300 | my @unstablelist = (); |
| 301 | |
| 302 | @unstablelist = read_unstable($unstablefile) if ($unstablefile ne 0); |
| 303 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 304 | # Import list of hw-dependent files, if provided |
| 305 | my @hwdep_list = (); |
| 306 | |
| 307 | @hwdep_list = read_unstable($hwdep_file) if ($hwdep_file ne 0); |
| 308 | |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 309 | compare_results($ref, $res); |
| 310 | |
| 311 | my $final_result = print_compare_results_summary($ref, $res); |
| 312 | |
| 313 | exit $final_result; |
| 314 | |
| 315 | ###################################################### |
| 316 | # UTILITIES |
| 317 | |
| 318 | sub empty_result() |
| 319 | { |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 320 | my %empty_result;# = {PASS=>0, FAIL=>0, XPASS=>0, XFAIL=>0, KFAIL=>0, UNSUPPORTED=>0, UNTESTED=>0, UNRESOLVED=>0, ERROR=>0}; |
| 321 | $empty_result{PASS}=$empty_result{FAIL}=$empty_result{XPASS}=$empty_result{XFAIL}=$empty_result{KFAIL}=0; |
Christophe Lyon | bcbd748 | 2016-09-19 14:54:50 +0200 | [diff] [blame] | 322 | $empty_result{UNSUPPORTED}=$empty_result{UNTESTED}=$empty_result{UNRESOLVED}=$empty_result{NO_EXIST}=$empty_result{ERROR}=0; |
Christophe Lyon | 9a3ce97 | 2021-06-30 23:18:23 +0000 | [diff] [blame] | 323 | $empty_result{NB}=0; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 324 | return \%empty_result; |
| 325 | } |
| 326 | sub I_am_interactive { |
| 327 | return -t STDIN && -t STDOUT; |
| 328 | } |
| 329 | sub usage() |
| 330 | { |
| 331 | print "Usage : $app <ref_file.sum> <result_file.sum>\n"; |
| 332 | exit 1; |
| 333 | } |
| 334 | |
| 335 | |
| 336 | ###################################################### |
| 337 | # PARSING |
| 338 | sub read_sum($) |
| 339 | { |
| 340 | my ($sum_file) = @_; |
| 341 | my $res = empty_result(); |
| 342 | my %testcases; |
Thiago Jung Bauermann | 9cbfa08 | 2024-02-24 21:31:48 -0300 | [diff] [blame] | 343 | my %exp_files; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 344 | $res->{testcases} = \%testcases; |
Thiago Jung Bauermann | 9cbfa08 | 2024-02-24 21:31:48 -0300 | [diff] [blame] | 345 | $res->{exp_files} = \%exp_files; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 346 | my $pending_timeout=0; |
Christophe Lyon | c63afc9 | 2021-07-01 09:52:29 +0000 | [diff] [blame] | 347 | my $current_tool=""; |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 348 | my $current_exp=""; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 349 | |
Christophe Lyon | ad8c724 | 2016-02-03 13:04:28 +0100 | [diff] [blame] | 350 | $res->{EXEC}->{PASS} = 0; |
| 351 | $res->{EXEC}->{FAIL} = 0; |
| 352 | |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 353 | open SUMFILE, $sum_file or die $!; |
| 354 | while (<SUMFILE>) |
| 355 | { |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 356 | if (m/^(PASS|XPASS|FAIL|XFAIL|KFAIL|UNSUPPORTED|UNTESTED|UNRESOLVED|ERROR): *(.*)/) |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 357 | { |
| 358 | my ($diag,$tc) = ($1,$2); |
| 359 | my %tcresult; |
| 360 | $tc =~ s/==[0-9]+== Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly./==<pid>== Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly./; |
Christophe Lyon | c63afc9 | 2021-07-01 09:52:29 +0000 | [diff] [blame] | 361 | # Prefix test name wih .exp filename to help report |
| 362 | # regressions/run bisect. |
| 363 | $tc = "$current_tool:$current_exp=$tc"; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 364 | $testcases{$tc} = empty_result() if (not exists $testcases{$tc}); |
| 365 | $testcases{$tc}->{$diag}++; |
| 366 | $testcases{$tc}->{HAS_TIMED_OUT} = $pending_timeout; |
Christophe Lyon | c63afc9 | 2021-07-01 09:52:29 +0000 | [diff] [blame] | 367 | $testcases{$tc}->{TOOL_EXP} = "$current_tool:$current_exp"; |
Christophe Lyon | 9a3ce97 | 2021-06-30 23:18:23 +0000 | [diff] [blame] | 368 | $testcases{$tc}->{NB}++; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 369 | $pending_timeout = 0; |
| 370 | $res->{$diag}++; |
Christophe Lyon | ad8c724 | 2016-02-03 13:04:28 +0100 | [diff] [blame] | 371 | # Count execution tests, for a sanity check |
| 372 | if ($tc =~ /execution/) |
| 373 | { |
| 374 | $res->{EXEC}->{$diag}++; |
| 375 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 376 | } |
| 377 | elsif (m/WARNING: program timed out/) |
| 378 | { |
| 379 | $pending_timeout = 1; |
| 380 | } |
| 381 | elsif (m/^(# of expected passes|# of unexpected failures|# of expected failures|# of known failures|# of unsupported tests|# of untested testcases)\s+(.*)/) |
| 382 | { |
| 383 | $res->{"summary - "."$1"} = $2; |
| 384 | } |
| 385 | elsif (m/^\/.*\/([^\/]+)\s+version\s+(.*)/) |
| 386 | { |
| 387 | $res->{tool} = $1; |
| 388 | $res->{version} = $2; |
| 389 | $res->{version} =~ s/ [-(].*//; |
| 390 | } |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 391 | elsif (m/^Running target .*/) |
| 392 | { |
| 393 | } |
| 394 | elsif (m/^Running (.*) \.\.\.*/) |
| 395 | { |
| 396 | $current_exp=$1; |
| 397 | $current_exp =~ s|.*/testsuite/||; |
Thiago Jung Bauermann | 9cbfa08 | 2024-02-24 21:31:48 -0300 | [diff] [blame] | 398 | # For merging, we want to know whether the exp file is present in the result. |
| 399 | $exp_files{"$current_tool:$current_exp"} = 1; |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 400 | } |
Christophe Lyon | c63afc9 | 2021-07-01 09:52:29 +0000 | [diff] [blame] | 401 | elsif (m/^\t\t=== (.*) tests ===/) |
| 402 | { |
| 403 | $current_tool=$1; |
| 404 | } |
| 405 | elsif (m/^\t\t=== (.*) Summary ===/) |
| 406 | { |
| 407 | $current_tool=""; |
| 408 | $current_exp=""; |
| 409 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 410 | } |
| 411 | close SUMFILE; |
| 412 | return $res; |
| 413 | } |
| 414 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 415 | # Parse list of unstable/hw-dependent tests |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 416 | sub read_unstable($) |
| 417 | { |
| 418 | my ($unstable_file) = @_; |
| 419 | my @unstable_tests = (); |
| 420 | |
| 421 | open UNSTABLEFILE, $unstable_file or die $!; |
| 422 | while (<UNSTABLEFILE>) |
| 423 | { |
| 424 | # Skip lines starting with '#', or with spaces only |
| 425 | if ((/^#/) || (/^[ ]*$/)) |
| 426 | { |
| 427 | } |
| 428 | else |
| 429 | { |
| 430 | chomp; |
| 431 | |
| 432 | my $test = $_; |
| 433 | |
| 434 | # Check if line is of type: target:testname |
Christophe Lyon | 5e7241c | 2015-12-04 12:57:27 +0100 | [diff] [blame] | 435 | if (/^(.*?):/) |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 436 | { |
| 437 | foreach my $unstable_marker (@unstable_markers) |
| 438 | { |
| 439 | if ($unstable_marker eq $1) { |
| 440 | # If target matches the one supplied as script |
| 441 | # argument, add the testname to the list |
Christophe Lyon | 5e7241c | 2015-12-04 12:57:27 +0100 | [diff] [blame] | 442 | $test =~ s/.*?://; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 443 | push @unstable_tests, $test; |
| 444 | } |
| 445 | } |
| 446 | } else { |
| 447 | push @unstable_tests, $test; |
| 448 | } |
| 449 | } |
| 450 | } |
| 451 | close UNSTABLEFILE; |
| 452 | return @unstable_tests; |
| 453 | } |
| 454 | |
| 455 | ###################################################### |
| 456 | # DIFFING |
| 457 | sub handle_pass_fail($$$$) |
| 458 | { |
| 459 | my ($ref, $res, $diag_diag, $tc) = @_; |
| 460 | if ($res->{testcases}->{$tc}->{HAS_TIMED_OUT}) |
| 461 | { |
| 462 | push @{$res->{$PASSED_NOW_TIMEOUTS}}, $tc; |
| 463 | } |
| 464 | else |
| 465 | { |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 466 | # This transition is flagged as hw-dependent if: |
| 467 | # - the name is in the list |
| 468 | # - the transition should not be reported (but be flagged as hw-dependent instead) |
| 469 | # - --no-hwdep was not provided |
| 470 | if ((grep { (index $tc,$_)!=-1} @hwdep_list) |
| 471 | && ($diag_diag->{report_hwdep} eq "false") |
| 472 | && ($no_hwdep == 0)) { |
| 473 | push @{$res->{$HWDEP_CASES}}, $tc; |
| 474 | } else { |
| 475 | push @{$res->{$PASS_FAIL}}, $tc; |
| 476 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 477 | } |
| 478 | } |
| 479 | |
| 480 | sub compare_results($$) |
| 481 | { |
| 482 | my ($ref, $res) = @_; |
| 483 | |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 484 | @{$res->{$PASS_PASS}} = (); |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 485 | @{$res->{$PASS_XPASS}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 486 | @{$res->{$PASS_FAIL}} = (); |
| 487 | @{$res->{$PASS_XFAIL}} = (); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 488 | @{$res->{$PASS_KFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 489 | @{$res->{$PASS_UNSUPPORTED}} = (); |
| 490 | @{$res->{$PASS_UNTESTED}} = (); |
| 491 | @{$res->{$PASS_UNRESOLVED}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 492 | @{$res->{$PASS_DISAPPEARS}} = (); |
| 493 | @{$res->{$PASS_APPEARS}} = (); |
| 494 | @{$res->{$PASSED_NOW_TIMEOUTS}} = (); |
| 495 | |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 496 | @{$res->{$XPASS_PASS}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 497 | @{$res->{$XPASS_XPASS}} = (); |
| 498 | @{$res->{$XPASS_FAIL}} = (); |
| 499 | @{$res->{$XPASS_XFAIL}} = (); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 500 | @{$res->{$XPASS_KFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 501 | @{$res->{$XPASS_UNSUPPORTED}} = (); |
| 502 | @{$res->{$XPASS_UNTESTED}} = (); |
| 503 | @{$res->{$XPASS_UNRESOLVED}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 504 | @{$res->{$XPASS_DISAPPEARS}} = (); |
| 505 | @{$res->{$XPASS_APPEARS}} = (); |
| 506 | |
| 507 | @{$res->{$FAIL_PASS}} = (); |
| 508 | @{$res->{$FAIL_XPASS}} = (); |
| 509 | @{$res->{$FAIL_FAIL}} = (); |
| 510 | @{$res->{$FAIL_XFAIL}} = (); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 511 | @{$res->{$FAIL_KFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 512 | @{$res->{$FAIL_UNSUPPORTED}} = (); |
| 513 | @{$res->{$FAIL_UNTESTED}} = (); |
| 514 | @{$res->{$FAIL_UNRESOLVED}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 515 | @{$res->{$FAIL_DISAPPEARS}} = (); |
| 516 | @{$res->{$FAIL_APPEARS}} = (); |
| 517 | |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 518 | @{$res->{$XFAIL_PASS}} = (); |
| 519 | @{$res->{$XFAIL_XPASS}} = (); |
| 520 | @{$res->{$XFAIL_FAIL}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 521 | @{$res->{$XFAIL_XFAIL}} = (); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 522 | @{$res->{$XFAIL_KFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 523 | @{$res->{$XFAIL_UNSUPPORTED}} = (); |
| 524 | @{$res->{$XFAIL_UNTESTED}} = (); |
| 525 | @{$res->{$XFAIL_UNRESOLVED}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 526 | @{$res->{$XFAIL_DISAPPEARS}} = (); |
| 527 | @{$res->{$XFAIL_APPEARS}} = (); |
| 528 | |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 529 | @{$res->{$KFAIL_PASS}} = (); |
| 530 | @{$res->{$KFAIL_XPASS}} = (); |
| 531 | @{$res->{$KFAIL_FAIL}} = (); |
| 532 | @{$res->{$KFAIL_XFAIL}} = (); |
| 533 | @{$res->{$KFAIL_KFAIL}} = (); |
| 534 | @{$res->{$KFAIL_UNSUPPORTED}} = (); |
| 535 | @{$res->{$KFAIL_UNTESTED}} = (); |
| 536 | @{$res->{$KFAIL_UNRESOLVED}} = (); |
| 537 | @{$res->{$KFAIL_DISAPPEARS}} = (); |
| 538 | @{$res->{$KFAIL_APPEARS}} = (); |
| 539 | |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 540 | @{$res->{$UNSUPPORTED_PASS}} = (); |
| 541 | @{$res->{$UNSUPPORTED_XPASS}} = (); |
| 542 | @{$res->{$UNSUPPORTED_FAIL}} = (); |
| 543 | @{$res->{$UNSUPPORTED_XFAIL}} = (); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 544 | @{$res->{$UNSUPPORTED_KFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 545 | @{$res->{$UNSUPPORTED_UNSUPPORTED}} = (); |
| 546 | @{$res->{$UNSUPPORTED_UNTESTED}} = (); |
| 547 | @{$res->{$UNSUPPORTED_UNRESOLVED}} = (); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 548 | @{$res->{$UNSUPPORTED_DISAPPEARS}} = (); |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 549 | @{$res->{$UNSUPPORTED_APPEARS}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 550 | |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 551 | @{$res->{$UNTESTED_PASS}} = (); |
| 552 | @{$res->{$UNTESTED_XPASS}} = (); |
| 553 | @{$res->{$UNTESTED_FAIL}} = (); |
| 554 | @{$res->{$UNTESTED_XFAIL}} = (); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 555 | @{$res->{$UNTESTED_KFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 556 | @{$res->{$UNTESTED_UNSUPPORTED}} = (); |
| 557 | @{$res->{$UNTESTED_UNTESTED}} = (); |
| 558 | @{$res->{$UNTESTED_UNRESOLVED}} = (); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 559 | @{$res->{$UNTESTED_DISAPPEARS}} = (); |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 560 | @{$res->{$UNTESTED_APPEARS}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 561 | |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 562 | @{$res->{$UNRESOLVED_PASS}} = (); |
| 563 | @{$res->{$UNRESOLVED_XPASS}} = (); |
| 564 | @{$res->{$UNRESOLVED_FAIL}} = (); |
| 565 | @{$res->{$UNRESOLVED_XFAIL}} = (); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 566 | @{$res->{$UNRESOLVED_KFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 567 | @{$res->{$UNRESOLVED_UNSUPPORTED}} = (); |
| 568 | @{$res->{$UNRESOLVED_UNTESTED}} = (); |
| 569 | @{$res->{$UNRESOLVED_UNRESOLVED}} = (); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 570 | @{$res->{$UNRESOLVED_DISAPPEARS}} = (); |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 571 | @{$res->{$UNRESOLVED_APPEARS}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 572 | |
Christophe Lyon | bcbd748 | 2016-09-19 14:54:50 +0200 | [diff] [blame] | 573 | @{$res->{$ERROR_DISAPPEARS}} = (); |
| 574 | @{$res->{$ERROR_APPEARS}} = (); |
| 575 | |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 576 | @{$res->{$UNHANDLED_CASES}} = (); |
| 577 | @{$res->{$UNSTABLE_CASES}} = (); |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 578 | @{$res->{$HWDEP_CASES}} = (); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 579 | |
| 580 | #### MERGE REF AND RES |
| 581 | foreach my $key (sort (keys %{$res->{testcases}})) |
| 582 | { |
| 583 | if (not exists $ref->{testcases}->{$key}) { |
| 584 | $ref->{testcases}->{$key} = empty_result(); |
| 585 | $ref->{testcases}->{$key}->{NO_EXIST} = 1; |
Christophe Lyon | c63afc9 | 2021-07-01 09:52:29 +0000 | [diff] [blame] | 586 | $ref->{testcases}->{$key}->{TOOL_EXP} = $res->{testcases}->{$key}->{TOOL_EXP}; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 587 | } |
Christophe Lyon | 9a3ce97 | 2021-06-30 23:18:23 +0000 | [diff] [blame] | 588 | |
| 589 | # Consistency check, useful in case of duplicate test names |
| 590 | if ($ref->{testcases}->{$key}->{NB} != $res->{testcases}->{$key}->{NB}) { |
| 591 | print "Number of occurrences mismatch $key (ref $ref->{testcases}->{$key}->{NB} vs $res->{testcases}->{$key}->{NB})\n" if ($debug); |
| 592 | if ($ref->{testcases}->{$key}->{NB} > $res->{testcases}->{$key}->{NB}) { |
| 593 | $res->{testcases}->{$key}->{NO_EXIST} = 1; |
| 594 | } elsif ($ref->{testcases}->{$key}->{NB} < $res->{testcases}->{$key}->{NB}) { |
| 595 | $ref->{testcases}->{$key}->{NO_EXIST} = 1; |
| 596 | } |
| 597 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 598 | } |
| 599 | foreach my $key (keys %{$ref->{testcases}}) |
| 600 | { |
| 601 | if (not exists $res->{testcases}->{$key}) |
| 602 | { |
| 603 | $res->{testcases}->{$key} = empty_result(); |
| 604 | $res->{testcases}->{$key}->{NO_EXIST} = 1; |
Christophe Lyon | c63afc9 | 2021-07-01 09:52:29 +0000 | [diff] [blame] | 605 | $res->{testcases}->{$key}->{TOOL_EXP} = $ref->{testcases}->{$key}->{TOOL_EXP}; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 606 | } |
Christophe Lyon | 9a3ce97 | 2021-06-30 23:18:23 +0000 | [diff] [blame] | 607 | |
| 608 | # No need for similar consistency check: since we are |
| 609 | # checking for tests whose number of occurrences are |
| 610 | # different, they are present in both ref and res, so |
| 611 | # no need to check again here. |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 612 | } |
| 613 | |
| 614 | #### ACTIONS FOR EACH CASES |
| 615 | my %unstable_found; |
| 616 | |
| 617 | foreach my $key (sort (keys %{$ref->{testcases}})) |
| 618 | { |
| 619 | foreach my $diag_diag (@handler_list) |
| 620 | { |
| 621 | if ($ref->{testcases}->{$key}->{$diag_diag->{was}} != $res->{testcases}->{$key}->{$diag_diag->{was}} |
Christophe Lyon | 9a3ce97 | 2021-06-30 23:18:23 +0000 | [diff] [blame] | 622 | and $ref->{testcases}->{$key}->{$diag_diag->{was}} |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 623 | and $res->{testcases}->{$key}->{$diag_diag->{is}}) |
| 624 | { |
Christophe Lyon | 1ed9310 | 2021-06-30 23:04:43 +0000 | [diff] [blame] | 625 | print "$key ref $diag_diag->{was}:$ref->{testcases}->{$key}->{$diag_diag->{was}}, res $diag_diag->{was}:$res->{testcases}->{$key}->{$diag_diag->{was}}, res $diag_diag->{is}:$res->{testcases}->{$key}->{$diag_diag->{is}} \n" if ($debug); |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 626 | # If testcase is listed as 'unstable' mark it as such |
| 627 | # and skip other processing to avoid listing it twice. |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 628 | { |
| 629 | if (grep { (index $key,$_)!=-1} @unstablelist) |
| 630 | { |
| 631 | print "[unstable] $key\n" if ($debug); |
| 632 | $unstable_found{$key}=1; |
| 633 | } |
| 634 | else { |
| 635 | print "[$diag_diag->{was} => $diag_diag->{is}] $key\n" if ($debug); |
| 636 | if ($diag_diag->{handler}) |
| 637 | { |
| 638 | $diag_diag->{handler} ($ref, $res, $diag_diag, $key); |
| 639 | } |
| 640 | else |
| 641 | { |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 642 | # This transition is flagged as hw-dependent if: |
| 643 | # - the name is in the list |
| 644 | # - the transition should not be reported (but be flagged as hw-dependent instead) |
| 645 | # - --no-hwdep was not provided |
| 646 | if ((grep { (index $key,$_)!=-1} @hwdep_list) |
| 647 | && ($diag_diag->{report_hwdep} eq "false") |
| 648 | && ($no_hwdep == 0)) { |
| 649 | push @{$res->{$HWDEP_CASES}}, $key; |
| 650 | } else { |
| 651 | push @{$res->{$diag_diag->{cat}}}, $key; |
| 652 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 653 | } |
| 654 | } |
| 655 | } |
| 656 | } |
| 657 | } |
| 658 | } |
| 659 | push @{$res->{$UNSTABLE_CASES}}, (sort (keys (%unstable_found))) if ($nounstable == 0); |
| 660 | |
| 661 | } |
| 662 | |
| 663 | ###################################################### |
| 664 | # PRINTING |
| 665 | sub print_tclist($@) |
| 666 | { |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 667 | # The 1st parameter is used to find the name of the .exp file |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 668 | # associated with the testcase. |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 669 | my ($this_res, $cat, @tclist) = @_; |
Christophe Lyon | c63afc9 | 2021-07-01 09:52:29 +0000 | [diff] [blame] | 670 | my $this_tool_exp = ""; |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 671 | if (scalar(@tclist)) |
| 672 | { |
| 673 | print " - ".$cat.":\n\n"; |
| 674 | foreach my $case (@tclist) |
| 675 | { |
Christophe Lyon | c63afc9 | 2021-07-01 09:52:29 +0000 | [diff] [blame] | 676 | if ($this_tool_exp ne $this_res->{testcases}->{$case}->{TOOL_EXP}) { |
| 677 | $this_tool_exp = $this_res->{testcases}->{$case}->{TOOL_EXP}; |
| 678 | print " Executed from: $this_tool_exp\n"; |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 679 | } |
| 680 | print " $case\n"; |
| 681 | } |
| 682 | print "\n\n"; |
| 683 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 684 | } |
| 685 | |
| 686 | sub print_compare_results_summary($$) |
| 687 | { |
| 688 | my ($ref, $res) = @_; |
| 689 | my $return_value=0; |
Christophe Lyon | f5aeb34 | 2015-12-08 14:47:16 +0100 | [diff] [blame] | 690 | my $total_better = 0; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 691 | my $rtotal = 0; |
| 692 | my $quiet_reg = $quiet; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 693 | my $ref_ratio = 0; |
Christophe Lyon | 0ab7d35 | 2016-04-06 10:39:58 +0200 | [diff] [blame] | 694 | my $ref_total = 0; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 695 | my $res_ratio = 0; |
Christophe Lyon | 0ab7d35 | 2016-04-06 10:39:58 +0200 | [diff] [blame] | 696 | my $res_total = 0; |
Christophe Lyon | ad8c724 | 2016-02-03 13:04:28 +0100 | [diff] [blame] | 697 | my $ignore_exec = 0; |
| 698 | my $ref_has_exec_tests = 0; |
| 699 | my $res_has_exec_tests = 0; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 700 | |
| 701 | # Compute the pass ratio as a sanity check |
Christophe Lyon | 0ab7d35 | 2016-04-06 10:39:58 +0200 | [diff] [blame] | 702 | $ref_total = $ref->{PASS} + |
| 703 | $ref->{XFAIL} + |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 704 | $ref->{KFAIL} + |
Christophe Lyon | 0ab7d35 | 2016-04-06 10:39:58 +0200 | [diff] [blame] | 705 | $ref->{XPASS} + |
| 706 | $ref->{FAIL} + |
| 707 | $ref->{UNRESOLVED} + |
| 708 | $ref->{UNSUPPORTED} + |
| 709 | $ref->{UNTESTED}; |
| 710 | |
| 711 | # It is possible that no test is executed at all (for instance if |
| 712 | # RUNTESTFLAGS was too restrictive). Avoid division by 0. |
| 713 | if ($ref_total > 0) { |
| 714 | $ref_ratio = ($ref->{PASS} + $ref->{XFAIL}) / |
| 715 | $ref_total; |
| 716 | } |
| 717 | |
| 718 | $res_total = $res->{PASS} + |
| 719 | $res->{XFAIL} + |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 720 | $res->{KFAIL} + |
Christophe Lyon | 0ab7d35 | 2016-04-06 10:39:58 +0200 | [diff] [blame] | 721 | $res->{XPASS} + |
| 722 | $res->{FAIL} + |
| 723 | $res->{UNRESOLVED} + |
| 724 | $res->{UNSUPPORTED} + |
| 725 | $res->{UNTESTED}; |
| 726 | |
| 727 | if ($res_total > 0) { |
| 728 | $res_ratio = ($res->{PASS} + $res->{XFAIL}) / |
| 729 | $res_total; |
| 730 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 731 | |
| 732 | if (not $quiet) |
| 733 | { |
| 734 | printf "Comparing:\n"; |
| 735 | printf "REFERENCE:$ref_file_name\n"; |
| 736 | printf "CURRENT: $res_file_name\n\n"; |
| 737 | } |
| 738 | |
| 739 | #### TESTS STATUS |
| 740 | if (not $quiet and not $short) |
| 741 | { |
Thiago Jung Bauermann | 66d0ccb | 2023-03-01 05:15:40 +0000 | [diff] [blame] | 742 | printf " +---------+---------+\n"; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 743 | printf "o RUN STATUS: | REF | RES |\n"; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 744 | printf " +------------------------------------------+---------+---------+\n"; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 745 | printf " | %-40s | %7d | %7d |\n", "Passes [PASS]", $ref->{PASS}, $res->{PASS}; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 746 | printf " | %-40s | %7d | %7d |\n", "Unexpected fails [FAIL]", $ref->{FAIL}, $res->{FAIL}; |
Christophe Lyon | bcbd748 | 2016-09-19 14:54:50 +0200 | [diff] [blame] | 747 | printf " | %-40s | %7d | %7d |\n", "Errors [ERROR]", $ref->{ERROR}, $res->{ERROR}; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 748 | printf " | %-40s | %7d | %7d |\n", "Unexpected passes [XPASS]", $ref->{XPASS}, $res->{XPASS}; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 749 | printf " | %-40s | %7d | %7d |\n", "Expected fails [XFAIL]", $ref->{XFAIL}, $res->{XFAIL}; |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 750 | printf " | %-40s | %7d | %7d |\n", "Known fails [KFAIL]", $ref->{KFAIL}, $res->{KFAIL}; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 751 | printf " | %-40s | %7d | %7d |\n", "Unresolved [UNRESOLVED]", $ref->{UNRESOLVED}, $res->{UNRESOLVED}; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 752 | printf " | %-40s | %7d | %7d |\n", "Unsupported [UNSUPPORTED]", $ref->{UNSUPPORTED}, $res->{UNSUPPORTED}; |
| 753 | printf " | %-40s | %7d | %7d |\n", "Untested [UNTESTED]", $ref->{UNTESTED}, $res->{UNTESTED}; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 754 | printf " +------------------------------------------+---------+---------+\n"; |
| 755 | printf "\n"; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 756 | |
Christophe Lyon | 3d195c2 | 2016-04-06 16:00:25 +0200 | [diff] [blame] | 757 | printf " REF PASS ratio: %f\n", $ref_ratio; |
| 758 | printf " RES PASS ratio: %f\n", $res_ratio; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 759 | if ($ref_ratio < $ratio_thresh) |
| 760 | { |
Christophe Lyon | 1176f96 | 2016-03-03 18:01:10 +0100 | [diff] [blame] | 761 | printf " ***** ERROR: REF PASS ratio is abnormally low *****\n"; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 762 | } |
| 763 | if ($res_ratio < $ratio_thresh) |
| 764 | { |
Christophe Lyon | 1176f96 | 2016-03-03 18:01:10 +0100 | [diff] [blame] | 765 | printf " ***** ERROR: RES PASS ratio is abnormally low *****\n"; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 766 | } |
| 767 | |
Christophe Lyon | ad8c724 | 2016-02-03 13:04:28 +0100 | [diff] [blame] | 768 | # If both PASS and FAIL EXEC tests are zero, assume there is no |
| 769 | # execution test for this tool, and do not warn. |
| 770 | $ref_has_exec_tests = ($ref->{EXEC}->{PASS} + $ref->{EXEC}->{FAIL}) != 0; |
| 771 | if ($ref_has_exec_tests) |
| 772 | { |
| 773 | printf " ***** ERROR: No REF execution test PASSed. Check execution engine configuration. *****\n" if ($ref->{EXEC}->{PASS} == 0); |
| 774 | printf " ***** WARNING: No REF execution test FAILed. Check execution engine configuration. *****\n" if ($ref->{EXEC}->{FAIL} == 0); |
| 775 | } |
| 776 | |
| 777 | $res_has_exec_tests = ($res->{EXEC}->{PASS} + $res->{EXEC}->{FAIL}) != 0; |
| 778 | if ($res_has_exec_tests) |
| 779 | { |
| 780 | printf " ***** ERROR: No RES execution test PASSed. Check execution engine configuration. *****\n" if ($res->{EXEC}->{PASS} == 0); |
| 781 | printf " ***** WARNING: No RES execution test FAILed. Check execution engine configuration. *****\n" if ($res->{EXEC}->{FAIL} == 0); |
| 782 | } |
| 783 | |
| 784 | # Ignore number of execution tests when computing the return |
| 785 | # value, if both REF and RES have no execution test. |
| 786 | $ignore_exec = !$ref_has_exec_tests && !$res_has_exec_tests; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 787 | } |
| 788 | |
| 789 | #### REGRESSIONS ? |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 790 | $rtotal = scalar(@{$res->{$PASS_XPASS}}) |
| 791 | +scalar(@{$res->{$PASS_FAIL}}) |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 792 | +scalar(@{$res->{$PASS_KFAIL}}) |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 793 | +scalar(@{$res->{$PASS_UNRESOLVED}}) |
| 794 | +scalar(@{$res->{$PASSED_NOW_TIMEOUTS}}) |
Christophe Lyon | 3003783 | 2018-11-30 15:33:20 +0000 | [diff] [blame] | 795 | +scalar(@{$res->{$ERROR_APPEARS}}) |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 796 | +scalar(@{$res->{$XPASS_FAIL}}) |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 797 | +scalar(@{$res->{$XPASS_KFAIL}}) |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 798 | +scalar(@{$res->{$XPASS_APPEARS}}) |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 799 | +scalar(@{$res->{$XPASS_UNRESOLVED}}) |
| 800 | +scalar(@{$res->{$FAIL_APPEARS}}) |
| 801 | +scalar(@{$res->{$FAIL_UNRESOLVED}}) |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 802 | +scalar(@{$res->{$XFAIL_FAIL}}) |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 803 | +scalar(@{$res->{$XFAIL_UNRESOLVED}}) |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 804 | +scalar(@{$res->{$KFAIL_APPEARS}}) |
| 805 | +scalar(@{$res->{$KFAIL_UNRESOLVED}}) |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 806 | +scalar(@{$res->{$UNSUPPORTED_FAIL}}) |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 807 | +scalar(@{$res->{$UNSUPPORTED_KFAIL}}) |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 808 | +scalar(@{$res->{$UNSUPPORTED_XPASS}}) |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 809 | +scalar(@{$res->{$UNSUPPORTED_UNRESOLVED}}) |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 810 | +scalar(@{$res->{$UNTESTED_FAIL}}) |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 811 | +scalar(@{$res->{$UNTESTED_KFAIL}}) |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 812 | +scalar(@{$res->{$UNTESTED_XPASS}}) |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 813 | +scalar(@{$res->{$UNTESTED_UNRESOLVED}}) |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 814 | +scalar(@{$res->{$UNRESOLVED_FAIL}}) |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 815 | +scalar(@{$res->{$UNRESOLVED_KFAIL}}) |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 816 | +scalar(@{$res->{$UNRESOLVED_XPASS}}) |
Christophe Lyon | 3003783 | 2018-11-30 15:33:20 +0000 | [diff] [blame] | 817 | +scalar(@{$res->{$UNRESOLVED_APPEARS}}); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 818 | |
| 819 | $quiet_reg=1 if ($short and not $rtotal); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 820 | |
| 821 | if (not $quiet_reg) |
| 822 | { |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 823 | printf "\n$col_red"."o REGRESSIONS:\n"; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 824 | printf " +------------------------------------------+---------+\n"; |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 825 | printf " | %-40s | %7d |\n", $PASS_XPASS, scalar(@{$res->{$PASS_XPASS}}) if (scalar(@{$res->{$PASS_XPASS}})); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 826 | printf " | %-40s | %7d |\n", $PASS_FAIL, scalar(@{$res->{$PASS_FAIL}}) if (scalar(@{$res->{$PASS_FAIL}})); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 827 | printf " | %-40s | %7d |\n", $PASS_KFAIL, scalar(@{$res->{$PASS_KFAIL}}) if (scalar(@{$res->{$PASS_KFAIL}})); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 828 | printf " | %-40s | %7d |\n", $PASS_UNRESOLVED, scalar(@{$res->{$PASS_UNRESOLVED}}) if (scalar(@{$res->{$PASS_UNRESOLVED}})); |
| 829 | printf " | %-40s | %7d |\n", $PASSED_NOW_TIMEOUTS, scalar(@{$res->{$PASSED_NOW_TIMEOUTS}}) if (scalar(@{$res->{$PASSED_NOW_TIMEOUTS}})); |
Christophe Lyon | bcbd748 | 2016-09-19 14:54:50 +0200 | [diff] [blame] | 830 | printf " | %-40s | %7d |\n", $ERROR_APPEARS, scalar(@{$res->{$ERROR_APPEARS}}) if (scalar(@{$res->{$ERROR_APPEARS}})); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 831 | printf " | %-40s | %7d |\n", $XPASS_FAIL, scalar(@{$res->{$XPASS_FAIL}}) if (scalar(@{$res->{$XPASS_FAIL}})); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 832 | printf " | %-40s | %7d |\n", $XPASS_KFAIL, scalar(@{$res->{$XPASS_KFAIL}}) if (scalar(@{$res->{$XPASS_KFAIL}})); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 833 | printf " | %-40s | %7d |\n", $XPASS_APPEARS, scalar(@{$res->{$XPASS_APPEARS}}) if (scalar(@{$res->{$XPASS_APPEARS}})); |
| 834 | printf " | %-40s | %7d |\n", $XPASS_UNRESOLVED, scalar(@{$res->{$XPASS_UNRESOLVED}}) if (scalar(@{$res->{$XPASS_UNRESOLVED}})); |
| 835 | printf " | %-40s | %7d |\n", $FAIL_APPEARS, scalar(@{$res->{$FAIL_APPEARS}}) if (scalar(@{$res->{$FAIL_APPEARS}})); |
| 836 | printf " | %-40s | %7d |\n", $FAIL_UNRESOLVED, scalar(@{$res->{$FAIL_UNRESOLVED}}) if (scalar(@{$res->{$FAIL_UNRESOLVED}})); |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 837 | printf " | %-40s | %7d |\n", $XFAIL_FAIL, scalar(@{$res->{$XFAIL_FAIL}}) if (scalar(@{$res->{$XFAIL_FAIL}})); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 838 | printf " | %-40s | %7d |\n", $XFAIL_UNRESOLVED, scalar(@{$res->{$XFAIL_UNRESOLVED}}) if (scalar(@{$res->{$XFAIL_UNRESOLVED}})); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 839 | printf " | %-40s | %7d |\n", $KFAIL_APPEARS, scalar(@{$res->{$KFAIL_APPEARS}}) if (scalar(@{$res->{$KFAIL_APPEARS}})); |
| 840 | printf " | %-40s | %7d |\n", $KFAIL_UNRESOLVED, scalar(@{$res->{$KFAIL_UNRESOLVED}}) if (scalar(@{$res->{$KFAIL_UNRESOLVED}})); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 841 | printf " | %-40s | %7d |\n", $UNSUPPORTED_FAIL, scalar(@{$res->{$UNSUPPORTED_FAIL}}) if (scalar(@{$res->{$UNSUPPORTED_FAIL}})); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 842 | printf " | %-40s | %7d |\n", $UNSUPPORTED_KFAIL, scalar(@{$res->{$UNSUPPORTED_KFAIL}}) if (scalar(@{$res->{$UNSUPPORTED_KFAIL}})); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 843 | printf " | %-40s | %7d |\n", $UNSUPPORTED_XPASS, scalar(@{$res->{$UNSUPPORTED_XPASS}}) if (scalar(@{$res->{$UNSUPPORTED_XPASS}})); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 844 | printf " | %-40s | %7d |\n", $UNSUPPORTED_UNRESOLVED, scalar(@{$res->{$UNSUPPORTED_UNRESOLVED}}) if (scalar(@{$res->{$UNSUPPORTED_UNRESOLVED}})); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 845 | printf " | %-40s | %7d |\n", $UNTESTED_FAIL, scalar(@{$res->{$UNTESTED_FAIL}}) if (scalar(@{$res->{$UNTESTED_FAIL}})); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 846 | printf " | %-40s | %7d |\n", $UNTESTED_KFAIL, scalar(@{$res->{$UNTESTED_KFAIL}}) if (scalar(@{$res->{$UNTESTED_KFAIL}})); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 847 | printf " | %-40s | %7d |\n", $UNTESTED_XPASS, scalar(@{$res->{$UNTESTED_XPASS}}) if (scalar(@{$res->{$UNTESTED_XPASS}})); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 848 | printf " | %-40s | %7d |\n", $UNTESTED_UNRESOLVED, scalar(@{$res->{$UNTESTED_UNRESOLVED}}) if (scalar(@{$res->{$UNTESTED_UNRESOLVED}})); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 849 | printf " | %-40s | %7d |\n", $UNRESOLVED_FAIL, scalar(@{$res->{$UNRESOLVED_FAIL}}) if (scalar(@{$res->{$UNRESOLVED_FAIL}})); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 850 | printf " | %-40s | %7d |\n", $UNRESOLVED_KFAIL, scalar(@{$res->{$UNRESOLVED_KFAIL}}) if (scalar(@{$res->{$UNRESOLVED_KFAIL}})); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 851 | printf " | %-40s | %7d |\n", $UNRESOLVED_XPASS, scalar(@{$res->{$UNRESOLVED_XPASS}}) if (scalar(@{$res->{$UNRESOLVED_XPASS}})); |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 852 | printf " | %-40s | %7d |\n", $UNRESOLVED_APPEARS, scalar(@{$res->{$UNRESOLVED_APPEARS}}) if (scalar(@{$res->{$UNRESOLVED_APPEARS}})); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 853 | printf " +------------------------------------------+---------+\n"; |
| 854 | printf " | %-40s | %7d |\n", "TOTAL_REGRESSIONS", $rtotal; |
| 855 | printf " +------------------------------------------+---------+\n"; |
| 856 | printf "\n"; |
| 857 | |
| 858 | if ($long) |
| 859 | { |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 860 | print_tclist($res, $PASS_XPASS, @{$res->{$PASS_XPASS}}); |
| 861 | print_tclist($res, $PASS_FAIL, @{$res->{$PASS_FAIL}}); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 862 | print_tclist($res, $PASS_KFAIL, @{$res->{$PASS_KFAIL}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 863 | print_tclist($res, $PASS_UNRESOLVED, @{$res->{$PASS_UNRESOLVED}}); |
| 864 | print_tclist($res, $PASSED_NOW_TIMEOUTS, @{$res->{$PASSED_NOW_TIMEOUTS}}); |
| 865 | print_tclist($res, $ERROR_APPEARS, @{$res->{$ERROR_APPEARS}}); |
| 866 | print_tclist($res, $XPASS_FAIL, @{$res->{$XPASS_FAIL}}); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 867 | print_tclist($res, $XPASS_KFAIL, @{$res->{$XPASS_KFAIL}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 868 | print_tclist($res, $XPASS_APPEARS, @{$res->{$XPASS_APPEARS}}); |
| 869 | print_tclist($res, $XPASS_UNRESOLVED, @{$res->{$XPASS_UNRESOLVED}}); |
| 870 | print_tclist($res, $FAIL_APPEARS, @{$res->{$FAIL_APPEARS}}); |
| 871 | print_tclist($res, $FAIL_UNRESOLVED, @{$res->{$FAIL_UNRESOLVED}}); |
| 872 | print_tclist($res, $XFAIL_FAIL, @{$res->{$XFAIL_FAIL}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 873 | print_tclist($res, $XFAIL_UNRESOLVED, @{$res->{$XFAIL_UNRESOLVED}}); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 874 | print_tclist($res, $KFAIL_APPEARS, @{$res->{$KFAIL_APPEARS}}); |
| 875 | print_tclist($res, $KFAIL_UNRESOLVED, @{$res->{$KFAIL_UNRESOLVED}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 876 | print_tclist($res, $UNSUPPORTED_FAIL, @{$res->{$UNSUPPORTED_FAIL}}); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 877 | print_tclist($res, $UNSUPPORTED_KFAIL, @{$res->{$UNSUPPORTED_KFAIL}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 878 | print_tclist($res, $UNSUPPORTED_XPASS, @{$res->{$UNSUPPORTED_XPASS}}); |
| 879 | print_tclist($res, $UNSUPPORTED_UNRESOLVED, @{$res->{$UNSUPPORTED_UNRESOLVED}}); |
| 880 | print_tclist($res, $UNTESTED_FAIL, @{$res->{$UNTESTED_FAIL}}); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 881 | print_tclist($res, $UNTESTED_KFAIL, @{$res->{$UNTESTED_KFAIL}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 882 | print_tclist($res, $UNTESTED_XPASS, @{$res->{$UNTESTED_XPASS}}); |
| 883 | print_tclist($res, $UNTESTED_UNRESOLVED, @{$res->{$UNTESTED_UNRESOLVED}}); |
| 884 | print_tclist($res, $UNRESOLVED_FAIL, @{$res->{$UNRESOLVED_FAIL}}); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 885 | print_tclist($res, $UNRESOLVED_KFAIL, @{$res->{$UNRESOLVED_KFAIL}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 886 | print_tclist($res, $UNRESOLVED_XPASS, @{$res->{$UNRESOLVED_XPASS}}); |
| 887 | print_tclist($res, $UNRESOLVED_APPEARS, @{$res->{$UNRESOLVED_APPEARS}}); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 888 | } |
| 889 | printf "$col_reset\n"; |
| 890 | } |
| 891 | |
Christophe Lyon | 924cce4 | 2018-11-30 15:38:19 +0000 | [diff] [blame] | 892 | #### IMPROVEMENTS TO BE CHECKED ? |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 893 | if (not $quiet and not $short) |
| 894 | { |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 895 | $total_better = |
Christophe Lyon | 31279df | 2016-07-04 17:02:12 +0200 | [diff] [blame] | 896 | scalar(@{$res->{$PASS_DISAPPEARS}})+ |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 897 | scalar(@{$res->{$PASS_XFAIL}})+ |
| 898 | scalar(@{$res->{$PASS_APPEARS}})+ |
| 899 | scalar(@{$res->{$PASS_UNSUPPORTED}})+ |
| 900 | scalar(@{$res->{$PASS_UNTESTED}})+ |
| 901 | scalar(@{$res->{$XPASS_PASS}})+ |
| 902 | scalar(@{$res->{$XPASS_XFAIL}})+ |
| 903 | scalar(@{$res->{$XPASS_UNSUPPORTED}})+ |
| 904 | scalar(@{$res->{$XPASS_UNTESTED}})+ |
| 905 | scalar(@{$res->{$XPASS_DISAPPEARS}})+ |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 906 | scalar(@{$res->{$FAIL_PASS}})+ |
| 907 | scalar(@{$res->{$FAIL_XPASS}})+ |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 908 | scalar(@{$res->{$FAIL_XFAIL}})+ |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 909 | scalar(@{$res->{$FAIL_UNSUPPORTED}})+ |
| 910 | scalar(@{$res->{$FAIL_UNTESTED}})+ |
| 911 | scalar(@{$res->{$FAIL_DISAPPEARS}})+ |
Christophe Lyon | 3b675e8 | 2018-11-30 15:24:32 +0000 | [diff] [blame] | 912 | scalar(@{$res->{$XFAIL_DISAPPEARS}})+ |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 913 | scalar(@{$res->{$XFAIL_PASS}})+ |
| 914 | scalar(@{$res->{$XFAIL_XPASS}})+ |
| 915 | scalar(@{$res->{$XFAIL_UNSUPPORTED}})+ |
| 916 | scalar(@{$res->{$XFAIL_UNTESTED}})+ |
| 917 | scalar(@{$res->{$XFAIL_APPEARS}})+ |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 918 | scalar(@{$res->{$KFAIL_PASS}})+ |
| 919 | scalar(@{$res->{$KFAIL_XPASS}})+ |
| 920 | scalar(@{$res->{$KFAIL_XFAIL}})+ |
| 921 | scalar(@{$res->{$KFAIL_UNSUPPORTED}})+ |
| 922 | scalar(@{$res->{$KFAIL_UNTESTED}})+ |
| 923 | scalar(@{$res->{$KFAIL_DISAPPEARS}})+ |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 924 | scalar(@{$res->{$UNSUPPORTED_PASS}})+ |
| 925 | scalar(@{$res->{$UNSUPPORTED_XFAIL}})+ |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 926 | scalar(@{$res->{$UNSUPPORTED_UNTESTED}})+ |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 927 | scalar(@{$res->{$UNSUPPORTED_DISAPPEARS}})+ |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 928 | scalar(@{$res->{$UNSUPPORTED_APPEARS}})+ |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 929 | scalar(@{$res->{$UNTESTED_PASS}})+ |
| 930 | scalar(@{$res->{$UNTESTED_XFAIL}})+ |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 931 | scalar(@{$res->{$UNTESTED_UNSUPPORTED}})+ |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 932 | scalar(@{$res->{$UNTESTED_DISAPPEARS}})+ |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 933 | scalar(@{$res->{$UNTESTED_APPEARS}})+ |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 934 | scalar(@{$res->{$UNRESOLVED_PASS}})+ |
| 935 | scalar(@{$res->{$UNRESOLVED_XFAIL}})+ |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 936 | scalar(@{$res->{$UNRESOLVED_UNSUPPORTED}})+ |
| 937 | scalar(@{$res->{$UNRESOLVED_UNTESTED}})+ |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 938 | scalar(@{$res->{$UNRESOLVED_DISAPPEARS}})+ |
Christophe Lyon | bcbd748 | 2016-09-19 14:54:50 +0200 | [diff] [blame] | 939 | scalar(@{$res->{$ERROR_DISAPPEARS}})+ |
Christophe Lyon | f5aeb34 | 2015-12-08 14:47:16 +0100 | [diff] [blame] | 940 | scalar(@{$res->{$UNHANDLED_CASES}}); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 941 | |
Christophe Lyon | 924cce4 | 2018-11-30 15:38:19 +0000 | [diff] [blame] | 942 | printf "$col_pink"."o IMPROVEMENTS TO BE CHECKED:\n"; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 943 | printf " +------------------------------------------+---------+\n"; |
Christophe Lyon | 31279df | 2016-07-04 17:02:12 +0200 | [diff] [blame] | 944 | printf " | %-40s | %7d |\n", $PASS_DISAPPEARS, scalar(@{$res->{$PASS_DISAPPEARS}}) if (scalar(@{$res->{$PASS_DISAPPEARS}})); |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 945 | printf " | %-40s | %7d |\n", $PASS_XFAIL, scalar(@{$res->{$PASS_XFAIL}}) if (scalar(@{$res->{$PASS_XFAIL}})); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 946 | printf " | %-40s | %7d |\n", $PASS_APPEARS, scalar(@{$res->{$PASS_APPEARS}}) if (scalar(@{$res->{$PASS_APPEARS}})); |
| 947 | printf " | %-40s | %7d |\n", $PASS_UNSUPPORTED, scalar(@{$res->{$PASS_UNSUPPORTED}}) if (scalar(@{$res->{$PASS_UNSUPPORTED}})); |
| 948 | printf " | %-40s | %7d |\n", $PASS_UNTESTED, scalar(@{$res->{$PASS_UNTESTED}}) if (scalar(@{$res->{$PASS_UNTESTED}})); |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 949 | printf " | %-40s | %7d |\n", $XPASS_PASS, scalar(@{$res->{$XPASS_PASS}}) if (scalar(@{$res->{$XPASS_PASS}})); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 950 | printf " | %-40s | %7d |\n", $XPASS_XFAIL, scalar(@{$res->{$XPASS_XFAIL}}) if (scalar(@{$res->{$XPASS_XFAIL}})); |
| 951 | printf " | %-40s | %7d |\n", $XPASS_UNSUPPORTED, scalar(@{$res->{$XPASS_UNSUPPORTED}}) if (scalar(@{$res->{$XPASS_UNSUPPORTED}})); |
| 952 | printf " | %-40s | %7d |\n", $XPASS_UNTESTED, scalar(@{$res->{$XPASS_UNTESTED}}) if (scalar(@{$res->{$XPASS_UNTESTED}})); |
| 953 | printf " | %-40s | %7d |\n", $XPASS_DISAPPEARS, scalar(@{$res->{$XPASS_DISAPPEARS}}) if (scalar(@{$res->{$XPASS_DISAPPEARS}})); |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 954 | printf " | %-40s | %7d |\n", $FAIL_PASS, scalar(@{$res->{$FAIL_PASS}}) if (scalar(@{$res->{$FAIL_PASS}})); |
| 955 | printf " | %-40s | %7d |\n", $FAIL_XPASS, scalar(@{$res->{$FAIL_XPASS}}) if (scalar(@{$res->{$FAIL_XPASS}})); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 956 | printf " | %-40s | %7d |\n", $FAIL_XFAIL, scalar(@{$res->{$FAIL_XFAIL}}) if (scalar(@{$res->{$FAIL_XFAIL}})); |
| 957 | printf " | %-40s | %7d |\n", $FAIL_UNSUPPORTED, scalar(@{$res->{$FAIL_UNSUPPORTED}}) if (scalar(@{$res->{$FAIL_UNSUPPORTED}})); |
| 958 | printf " | %-40s | %7d |\n", $FAIL_UNTESTED, scalar(@{$res->{$FAIL_UNTESTED}}) if (scalar(@{$res->{$FAIL_UNTESTED}})); |
| 959 | printf " | %-40s | %7d |\n", $FAIL_DISAPPEARS, scalar(@{$res->{$FAIL_DISAPPEARS}}) if (scalar(@{$res->{$FAIL_DISAPPEARS}})); |
Christophe Lyon | 3b675e8 | 2018-11-30 15:24:32 +0000 | [diff] [blame] | 960 | printf " | %-40s | %7d |\n", $XFAIL_DISAPPEARS, scalar(@{$res->{$XFAIL_DISAPPEARS}}) if (scalar(@{$res->{$XFAIL_DISAPPEARS}})); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 961 | printf " | %-40s | %7d |\n", $XFAIL_PASS, scalar(@{$res->{$XFAIL_PASS}}) if (scalar(@{$res->{$XFAIL_PASS}})); |
| 962 | printf " | %-40s | %7d |\n", $XFAIL_XPASS, scalar(@{$res->{$XFAIL_XPASS}}) if (scalar(@{$res->{$XFAIL_XPASS}})); |
| 963 | printf " | %-40s | %7d |\n", $XFAIL_UNSUPPORTED, scalar(@{$res->{$XFAIL_UNSUPPORTED}}) if (scalar(@{$res->{$XFAIL_UNSUPPORTED}})); |
| 964 | printf " | %-40s | %7d |\n", $XFAIL_UNTESTED, scalar(@{$res->{$XFAIL_UNTESTED}}) if (scalar(@{$res->{$XFAIL_UNTESTED}})); |
| 965 | printf " | %-40s | %7d |\n", $XFAIL_APPEARS, scalar(@{$res->{$XFAIL_APPEARS}}) if (scalar(@{$res->{$XFAIL_APPEARS}})); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 966 | printf " | %-40s | %7d |\n", $KFAIL_PASS, scalar(@{$res->{$KFAIL_PASS}}) if (scalar(@{$res->{$KFAIL_PASS}})); |
| 967 | printf " | %-40s | %7d |\n", $KFAIL_XPASS, scalar(@{$res->{$KFAIL_XPASS}}) if (scalar(@{$res->{$KFAIL_XPASS}})); |
| 968 | printf " | %-40s | %7d |\n", $KFAIL_XFAIL, scalar(@{$res->{$KFAIL_XFAIL}}) if (scalar(@{$res->{$KFAIL_XFAIL}})); |
| 969 | printf " | %-40s | %7d |\n", $KFAIL_UNSUPPORTED, scalar(@{$res->{$KFAIL_UNSUPPORTED}}) if (scalar(@{$res->{$KFAIL_UNSUPPORTED}})); |
| 970 | printf " | %-40s | %7d |\n", $KFAIL_UNTESTED, scalar(@{$res->{$KFAIL_UNTESTED}}) if (scalar(@{$res->{$KFAIL_UNTESTED}})); |
| 971 | printf " | %-40s | %7d |\n", $KFAIL_DISAPPEARS, scalar(@{$res->{$KFAIL_DISAPPEARS}}) if (scalar(@{$res->{$KFAIL_DISAPPEARS}})); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 972 | printf " | %-40s | %7d |\n", $UNSUPPORTED_PASS, scalar(@{$res->{$UNSUPPORTED_PASS}}) if (scalar(@{$res->{$UNSUPPORTED_PASS}})); |
| 973 | printf " | %-40s | %7d |\n", $UNSUPPORTED_XFAIL, scalar(@{$res->{$UNSUPPORTED_XFAIL}}) if (scalar(@{$res->{$UNSUPPORTED_XFAIL}})); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 974 | printf " | %-40s | %7d |\n", $UNSUPPORTED_UNTESTED, scalar(@{$res->{$UNSUPPORTED_UNTESTED}}) if (scalar(@{$res->{$UNSUPPORTED_UNTESTED}})); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 975 | printf " | %-40s | %7d |\n", $UNSUPPORTED_DISAPPEARS, scalar(@{$res->{$UNSUPPORTED_DISAPPEARS}}) if (scalar(@{$res->{$UNSUPPORTED_DISAPPEARS}})); |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 976 | printf " | %-40s | %7d |\n", $UNSUPPORTED_APPEARS, scalar(@{$res->{$UNSUPPORTED_APPEARS}}) if (scalar(@{$res->{$UNSUPPORTED_APPEARS}})); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 977 | printf " | %-40s | %7d |\n", $UNTESTED_PASS, scalar(@{$res->{$UNTESTED_PASS}}) if (scalar(@{$res->{$UNTESTED_PASS}})); |
| 978 | printf " | %-40s | %7d |\n", $UNTESTED_XFAIL, scalar(@{$res->{$UNTESTED_XFAIL}}) if (scalar(@{$res->{$UNTESTED_XFAIL}})); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 979 | printf " | %-40s | %7d |\n", $UNTESTED_UNSUPPORTED, scalar(@{$res->{$UNTESTED_UNSUPPORTED}}) if (scalar(@{$res->{$UNTESTED_UNSUPPORTED}})); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 980 | printf " | %-40s | %7d |\n", $UNTESTED_DISAPPEARS, scalar(@{$res->{$UNTESTED_DISAPPEARS}}) if (scalar(@{$res->{$UNTESTED_DISAPPEARS}})); |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 981 | printf " | %-40s | %7d |\n", $UNTESTED_APPEARS, scalar(@{$res->{$UNTESTED_APPEARS}}) if (scalar(@{$res->{$UNTESTED_APPEARS}})); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 982 | printf " | %-40s | %7d |\n", $UNRESOLVED_PASS, scalar(@{$res->{$UNRESOLVED_PASS}}) if (scalar(@{$res->{$UNRESOLVED_PASS}})); |
| 983 | printf " | %-40s | %7d |\n", $UNRESOLVED_XFAIL, scalar(@{$res->{$UNRESOLVED_XFAIL}}) if (scalar(@{$res->{$UNRESOLVED_XFAIL}})); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 984 | printf " | %-40s | %7d |\n", $UNRESOLVED_UNSUPPORTED, scalar(@{$res->{$UNRESOLVED_UNSUPPORTED}}) if (scalar(@{$res->{$UNRESOLVED_UNSUPPORTED}})); |
| 985 | printf " | %-40s | %7d |\n", $UNRESOLVED_UNTESTED, scalar(@{$res->{$UNRESOLVED_UNTESTED}}) if (scalar(@{$res->{$UNRESOLVED_UNTESTED}})); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 986 | printf " | %-40s | %7d |\n", $UNRESOLVED_DISAPPEARS, scalar(@{$res->{$UNRESOLVED_DISAPPEARS}}) if (scalar(@{$res->{$UNRESOLVED_DISAPPEARS}})); |
Christophe Lyon | bcbd748 | 2016-09-19 14:54:50 +0200 | [diff] [blame] | 987 | printf " | %-40s | %7d |\n", $ERROR_DISAPPEARS, scalar(@{$res->{$ERROR_DISAPPEARS}}) if (scalar(@{$res->{$ERROR_DISAPPEARS}})); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 988 | printf " | %-40s | %7d |\n", $UNHANDLED_CASES, scalar(@{$res->{$UNHANDLED_CASES}}) if (scalar(@{$res->{$UNHANDLED_CASES}})); |
| 989 | printf " | %-40s | %7d |\n", $UNSTABLE_CASES, scalar(@{$res->{$UNSTABLE_CASES}}) if (scalar(@{$res->{$UNSTABLE_CASES}})); |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 990 | printf " | %-40s | %7d |\n", $HWDEP_CASES, scalar(@{$res->{$HWDEP_CASES}}) if (scalar(@{$res->{$HWDEP_CASES}})); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 991 | printf " +------------------------------------------+---------+\n"; |
Christophe Lyon | 924cce4 | 2018-11-30 15:38:19 +0000 | [diff] [blame] | 992 | printf " | %-40s | %7d |\n", "TOTAL_IMPROVEMENTS_TO_BE_CHECKED", $total_better + scalar(@{$res->{$UNSTABLE_CASES}});; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 993 | printf " +------------------------------------------+---------+\n"; |
| 994 | printf "\n"; |
| 995 | |
| 996 | if ($long) |
| 997 | { |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 998 | print_tclist($res, $PASS_DISAPPEARS, @{$res->{$PASS_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 999 | print_tclist($res, $PASS_XFAIL, @{$res->{$PASS_XFAIL}}); |
| 1000 | print_tclist($res, $PASS_APPEARS, @{$res->{$PASS_APPEARS}}); |
| 1001 | print_tclist($res, $PASS_UNSUPPORTED, @{$res->{$PASS_UNSUPPORTED}}); |
| 1002 | print_tclist($res, $PASS_UNTESTED, @{$res->{$PASS_UNTESTED}}); |
| 1003 | print_tclist($res, $XPASS_PASS, @{$res->{$XPASS_PASS}}); |
| 1004 | print_tclist($res, $XPASS_XFAIL, @{$res->{$XPASS_XFAIL}}); |
| 1005 | print_tclist($res, $XPASS_UNSUPPORTED, @{$res->{$XPASS_UNSUPPORTED}}); |
| 1006 | print_tclist($res, $XPASS_UNTESTED, @{$res->{$XPASS_UNTESTED}}); |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 1007 | print_tclist($res, $XPASS_DISAPPEARS, @{$res->{$XPASS_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 1008 | print_tclist($res, $FAIL_PASS, @{$res->{$FAIL_PASS}}); |
| 1009 | print_tclist($res, $FAIL_XPASS, @{$res->{$FAIL_XPASS}}); |
| 1010 | print_tclist($res, $FAIL_XFAIL, @{$res->{$FAIL_XFAIL}}); |
| 1011 | print_tclist($res, $FAIL_UNSUPPORTED, @{$res->{$FAIL_UNSUPPORTED}}); |
| 1012 | print_tclist($res, $FAIL_UNTESTED, @{$res->{$FAIL_UNTESTED}}); |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 1013 | print_tclist($res, $FAIL_DISAPPEARS, @{$res->{$FAIL_DISAPPEARS}}); |
Christophe Lyon | 3b675e8 | 2018-11-30 15:24:32 +0000 | [diff] [blame] | 1014 | print_tclist($res, $XFAIL_DISAPPEARS, @{$res->{$XFAIL_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 1015 | print_tclist($res, $XFAIL_PASS, @{$res->{$XFAIL_PASS}}); |
| 1016 | print_tclist($res, $XFAIL_XPASS, @{$res->{$XFAIL_XPASS}}); |
| 1017 | print_tclist($res, $XFAIL_UNSUPPORTED, @{$res->{$XFAIL_UNSUPPORTED}}); |
| 1018 | print_tclist($res, $XFAIL_UNTESTED, @{$res->{$XFAIL_UNTESTED}}); |
| 1019 | print_tclist($res, $XFAIL_APPEARS, @{$res->{$XFAIL_APPEARS}}); |
Thiago Jung Bauermann | 3be267a | 2023-02-28 23:30:09 +0000 | [diff] [blame] | 1020 | print_tclist($res, $KFAIL_PASS, @{$res->{$KFAIL_PASS}}); |
| 1021 | print_tclist($res, $KFAIL_XPASS, @{$res->{$KFAIL_XPASS}}); |
| 1022 | print_tclist($res, $KFAIL_XFAIL, @{$res->{$KFAIL_XFAIL}}); |
| 1023 | print_tclist($res, $KFAIL_UNSUPPORTED, @{$res->{$KFAIL_UNSUPPORTED}}); |
| 1024 | print_tclist($res, $KFAIL_UNTESTED, @{$res->{$KFAIL_UNTESTED}}); |
| 1025 | print_tclist($res, $KFAIL_DISAPPEARS, @{$res->{$KFAIL_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 1026 | print_tclist($res, $UNSUPPORTED_PASS, @{$res->{$UNSUPPORTED_PASS}}); |
| 1027 | print_tclist($res, $UNSUPPORTED_XFAIL, @{$res->{$UNSUPPORTED_XFAIL}}); |
| 1028 | print_tclist($res, $UNSUPPORTED_UNTESTED, @{$res->{$UNSUPPORTED_UNTESTED}}); |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 1029 | print_tclist($res, $UNSUPPORTED_DISAPPEARS, @{$res->{$UNSUPPORTED_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 1030 | print_tclist($res, $UNSUPPORTED_APPEARS, @{$res->{$UNSUPPORTED_APPEARS}}); |
| 1031 | print_tclist($res, $UNTESTED_PASS, @{$res->{$UNTESTED_PASS}}); |
| 1032 | print_tclist($res, $UNTESTED_XFAIL, @{$res->{$UNTESTED_XFAIL}}); |
| 1033 | print_tclist($res, $UNTESTED_UNSUPPORTED, @{$res->{$UNTESTED_UNSUPPORTED}}); |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 1034 | print_tclist($res, $UNTESTED_DISAPPEARS, @{$res->{$UNTESTED_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 1035 | print_tclist($res, $UNTESTED_APPEARS, @{$res->{$UNTESTED_APPEARS}}); |
| 1036 | print_tclist($res, $UNRESOLVED_PASS, @{$res->{$UNRESOLVED_PASS}}); |
| 1037 | print_tclist($res, $UNRESOLVED_XFAIL, @{$res->{$UNRESOLVED_XFAIL}}); |
| 1038 | print_tclist($res, $UNRESOLVED_UNSUPPORTED, @{$res->{$UNRESOLVED_UNSUPPORTED}}); |
| 1039 | print_tclist($res, $UNRESOLVED_UNTESTED, @{$res->{$UNRESOLVED_UNTESTED}}); |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 1040 | print_tclist($res, $UNRESOLVED_DISAPPEARS, @{$res->{$UNRESOLVED_DISAPPEARS}}); |
| 1041 | print_tclist($res, $ERROR_DISAPPEARS, @{$res->{$ERROR_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 1042 | print_tclist($res, $UNHANDLED_CASES, @{$res->{$UNHANDLED_CASES}}); |
| 1043 | print_tclist($res, $UNSTABLE_CASES, @{$res->{$UNSTABLE_CASES}}); |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 1044 | print_tclist($res, $HWDEP_CASES, @{$res->{$HWDEP_CASES}}); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 1045 | } |
| 1046 | printf "$col_reset\n"; |
| 1047 | } |
| 1048 | |
Christophe Lyon | f5aeb34 | 2015-12-08 14:47:16 +0100 | [diff] [blame] | 1049 | $return_value = 1 if ($total_better); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 1050 | |
| 1051 | $return_value = 2 if ($rtotal); |
| 1052 | |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 1053 | # Error if there was no PASS (eg when sth went wrong and no .sum was generated) |
| 1054 | $return_value = 2 if (($res->{PASS} + $res->{XFAIL}) == 0); |
| 1055 | |
| 1056 | # Error if every test passed, or the ratio was too low. This |
| 1057 | # generally means the simulator is not configured well. |
| 1058 | $return_value = 2 if (($ref_ratio == 100) || ($ref_ratio < $ratio_thresh)); |
| 1059 | $return_value = 2 if (($res_ratio == 100) || ($res_ratio < $ratio_thresh)); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 1060 | |
Christophe Lyon | ad8c724 | 2016-02-03 13:04:28 +0100 | [diff] [blame] | 1061 | # Error if no execution test passed. |
| 1062 | # It is possible that no execution test fails, though. |
| 1063 | $return_value = 2 if (($ignore_exec == 0) |
| 1064 | && (($ref->{EXEC}->{PASS} == 0) |
| 1065 | || ($res->{EXEC}->{PASS} == 0))); |
| 1066 | |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 1067 | return $return_value; |
| 1068 | } |
Thiago Jung Bauermann | 99efda8 | 2023-02-28 23:03:05 +0000 | [diff] [blame] | 1069 | |
| 1070 | ###################################################### |
| 1071 | # MERGING |
| 1072 | sub merge($$@) |
| 1073 | { |
| 1074 | my ($output_file, $ref_file, @results) = @_; |
| 1075 | my $res = empty_result(); |
| 1076 | my $current_tool=""; |
| 1077 | my $current_exp=""; |
| 1078 | |
| 1079 | open(REF, '<', $ref_file) or die $!; |
| 1080 | open(OUTPUT, '>', $output_file) or die $!; |
| 1081 | |
| 1082 | print OUTPUT "Note: This is a synthetic sum file generated by merging the sum files of\n"; |
| 1083 | print OUTPUT " several testsuite runs. To investigate test results, refer to the\n"; |
| 1084 | print OUTPUT " original sum and log files.\n\n"; |
| 1085 | |
| 1086 | while (<REF>) { |
| 1087 | my $printed = 0; |
| 1088 | if (m/^(PASS|XPASS|FAIL|XFAIL|KFAIL|UNSUPPORTED|UNTESTED|UNRESOLVED): *(.*)/) { |
| 1089 | my ($diag,$tc) = ($1,$2); |
| 1090 | # Prefix test name wih .exp filename to help report |
| 1091 | # regressions/run bisect. |
| 1092 | $tc = "$current_tool:$current_exp=$tc"; |
| 1093 | |
| 1094 | if ($diag ne "PASS") { |
| 1095 | my $xfail_seen = 0; |
Thiago Jung Bauermann | 4578bcf | 2023-03-22 15:44:00 +0000 | [diff] [blame] | 1096 | my $test_in_all_results = 1; |
Thiago Jung Bauermann | 99efda8 | 2023-02-28 23:03:05 +0000 | [diff] [blame] | 1097 | |
| 1098 | # Did this test pass or xfail in any of the other results? |
| 1099 | foreach my $result (@results) { |
Thiago Jung Bauermann | 4578bcf | 2023-03-22 15:44:00 +0000 | [diff] [blame] | 1100 | if (not exists $result->{testcases}->{$tc}) { |
| 1101 | # Check whether the exp file is present in this result. |
Thiago Jung Bauermann | 9cbfa08 | 2024-02-24 21:31:48 -0300 | [diff] [blame] | 1102 | if (exists $result->{exp_files}->{"$current_tool:$current_exp"}) { |
| 1103 | # The exp file is present but this test isn't. |
| 1104 | $test_in_all_results = 0; |
Thiago Jung Bauermann | 4578bcf | 2023-03-22 15:44:00 +0000 | [diff] [blame] | 1105 | } |
| 1106 | } elsif ($result->{testcases}->{$tc}->{PASS}) { |
Thiago Jung Bauermann | 99efda8 | 2023-02-28 23:03:05 +0000 | [diff] [blame] | 1107 | print OUTPUT "PASS: $2\n"; |
| 1108 | $printed = 1; |
| 1109 | |
| 1110 | # Adjust the summary statistics. |
| 1111 | $res->{$diag}--; |
| 1112 | $res->{PASS}++; |
| 1113 | last; |
| 1114 | } elsif ($result->{testcases}->{$tc}->{XFAIL}) { |
| 1115 | $xfail_seen = 1; |
| 1116 | } |
| 1117 | } |
| 1118 | |
| 1119 | if (not $printed and $xfail_seen) { |
| 1120 | print OUTPUT "XFAIL: $2\n"; |
| 1121 | $printed = 1; |
| 1122 | |
| 1123 | # Adjust the summary statistics. |
| 1124 | $res->{$diag}--; |
| 1125 | $res->{XFAIL}++; |
Thiago Jung Bauermann | 4578bcf | 2023-03-22 15:44:00 +0000 | [diff] [blame] | 1126 | } elsif (not $test_in_all_results) { |
| 1127 | # If this test isn't present in all the sum files then consider its |
| 1128 | # absence from at least one of them to mean that it didn't fail, and |
| 1129 | # therefore leave it out of the merged sum file. This addresses a |
| 1130 | # situation that can happen in GDB tests where if a test succeeds it |
| 1131 | # doesn't produce a PASS but if it fails it produces a FAIL. |
| 1132 | $printed = 1; |
| 1133 | |
| 1134 | # Adjust the summary statistics. |
| 1135 | $res->{$diag}--; |
Thiago Jung Bauermann | 99efda8 | 2023-02-28 23:03:05 +0000 | [diff] [blame] | 1136 | } |
| 1137 | } |
| 1138 | } elsif (m/^(# of expected passes|# of unexpected failures|# of expected failures|# of known failures|# of unsupported tests|# of untested testcases|# of unresolved testcases)(\s+)(\d+)$/) { |
| 1139 | my $total; |
| 1140 | my $adjustment = 0; |
| 1141 | |
| 1142 | $adjustment = $res->{PASS} if ($1 eq "# of expected passes"); |
| 1143 | $adjustment = $res->{FAIL} if ($1 eq "# of unexpected failures"); |
| 1144 | $adjustment = $res->{XFAIL} if ($1 eq "# of expected failures"); |
| 1145 | $adjustment = $res->{KFAIL} if ($1 eq "# of known failures"); |
| 1146 | $adjustment = $res->{UNSUPPORTED} if ($1 eq "# of unsupported tests"); |
| 1147 | $adjustment = $res->{UNTESTED} if ($1 eq "# of untested testcases"); |
| 1148 | $adjustment = $res->{UNRESOLVED} if ($1 eq "# of unresolved testcases"); |
| 1149 | |
| 1150 | $total = $3 + $adjustment; |
| 1151 | print OUTPUT "$1$2$total\n"; |
| 1152 | $printed = 1; |
| 1153 | } elsif (m/^Running (.*) \.\.\.*/) { |
| 1154 | $current_exp=$1; |
| 1155 | $current_exp =~ s|.*/testsuite/||; |
| 1156 | } elsif (m/^\t\t=== (.*) tests ===/) { |
| 1157 | $current_tool=$1; |
| 1158 | } elsif (m/^\t\t=== (.*) Summary ===/) { |
| 1159 | $current_tool=""; |
| 1160 | $current_exp=""; |
| 1161 | } elsif (m/^Note: This is a synthetic sum file.*/) { |
| 1162 | # If the reference file is itself a synthetic sum file, we should skip the |
| 1163 | # note at the top because we already printed it. |
| 1164 | |
| 1165 | # Skip next 3 lines. |
| 1166 | foreach my $i (0..2) { |
| 1167 | my $skipped_line = <REF>; |
| 1168 | } |
| 1169 | |
| 1170 | $printed = 1; |
| 1171 | } |
| 1172 | |
| 1173 | # Pass-through lines that weren't modified. |
| 1174 | print OUTPUT $_ if (not $printed); |
| 1175 | } |
| 1176 | close(REF); |
| 1177 | close(OUTPUT); |
| 1178 | |
| 1179 | return 0; |
| 1180 | } |