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($$$$); |
| 20 | |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 21 | my $PASS_PASS = "Still passes [PASS => PASS]"; |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 22 | my $PASS_XPASS = "PASS now XPASS [PASS =>XPASS]"; |
| 23 | my $PASS_FAIL = "PASS now FAIL [PASS => FAIL]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 24 | my $PASS_XFAIL = "PASS now XFAIL [PASS =>XFAIL]"; |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 25 | my $PASS_UNSUPPORTED = "PASS now UNSUPPORTED [PASS =>UNSUP]"; |
| 26 | my $PASS_UNRESOLVED = "PASS now UNRESOLVED [PASS =>UNRES]"; |
| 27 | my $PASS_UNTESTED = "PASS now UNTESTED [PASS =>UNTES]"; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 28 | my $PASS_DISAPPEARS = "PASS disappears [PASS => ]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 29 | my $PASS_APPEARS = "New PASS [ => PASS]"; |
| 30 | my $PASSED_NOW_TIMEOUTS = "Timeout [PASS =>T.OUT]"; |
| 31 | |
| 32 | my $XPASS_PASS = "XPASS now PASS [XPASS=> PASS]"; |
| 33 | my $XPASS_XPASS = "Still xpass [XPASS=>XPASS]"; |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 34 | my $XPASS_FAIL = "XPASS now FAIL [XPASS=> FAIL]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 35 | my $XPASS_XFAIL = "XPASS now XFAIL [XPASS=>XFAIL]"; |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 36 | my $XPASS_UNSUPPORTED = "XPASS now UNSUPPORTED [XPASS=>UNSUP]"; |
| 37 | my $XPASS_UNRESOLVED = "XPASS now UNRESOLVED [XPASS=>UNRES]"; |
| 38 | my $XPASS_UNTESTED = "XPASS now UNTESTED [XPASS=>UNTES]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 39 | my $XPASS_DISAPPEARS = "XPASS disappears [XPASS=> ]"; |
| 40 | my $XPASS_APPEARS = "XPASS appears [ =>XPASS]"; |
| 41 | |
| 42 | my $FAIL_PASS = "FAIL now PASS [FAIL => PASS]"; |
| 43 | my $FAIL_XPASS = "FAIL now XPASS [FAIL =>XPASS]"; |
| 44 | my $FAIL_FAIL = "Still fails [FAIL => FAIL]"; |
| 45 | my $FAIL_XFAIL = "FAIL now XFAIL [FAIL =>XFAIL]"; |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 46 | my $FAIL_UNSUPPORTED = "FAIL now UNSUPPORTED [FAIL =>UNSUP]"; |
| 47 | my $FAIL_UNRESOLVED = "FAIL now UNRESOLVED [FAIL =>UNRES]"; |
| 48 | my $FAIL_UNTESTED = "FAIL now UNTESTED [FAIL =>UNTES]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 49 | my $FAIL_DISAPPEARS = "FAIL disappears [FAIL => ]"; |
| 50 | my $FAIL_APPEARS = "FAIL appears [ => FAIL]"; |
| 51 | |
| 52 | my $XFAIL_PASS = "XFAIL now PASS [XFAIL=> PASS]"; |
| 53 | my $XFAIL_XPASS = "XFAIL now XPASS [XFAIL=>XPASS]"; |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 54 | my $XFAIL_FAIL = "XFAIL now FAIL [XFAIL=> FAIL]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 55 | my $XFAIL_XFAIL = "Still xfail [XFAIL=>XFAIL]"; |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 56 | my $XFAIL_UNSUPPORTED = "XFAIL now UNSUPPORTED [XFAIL=>UNSUP]"; |
| 57 | my $XFAIL_UNRESOLVED = "XFAIL now UNRESOLVED [XFAIL=>UNRES]"; |
| 58 | my $XFAIL_UNTESTED = "XFAIL now UNTESTED [XFAIL=>UNTES]"; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 59 | my $XFAIL_DISAPPEARS = "XFAIL disappears [XFAIL=> ]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 60 | my $XFAIL_APPEARS = "XFAIL appears [ =>XFAIL]"; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 61 | |
| 62 | my $UNSUPPORTED_PASS = "UNSUPPORTED now PASS [UNSUP=> PASS]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 63 | my $UNSUPPORTED_XPASS = "UNSUPPORTED now XPASS [UNSUP=>XPASS]"; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 64 | my $UNSUPPORTED_FAIL = "UNSUPPORTED now FAIL [UNSUP=> FAIL]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 65 | my $UNSUPPORTED_XFAIL = "UNSUPPORTED now XFAIL [UNSUP=>XFAIL]"; |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 66 | my $UNSUPPORTED_UNSUPPORTED= "UNSUPP now UNSUPP [UNSUP=>UNSUP]"; |
| 67 | my $UNSUPPORTED_UNRESOLVED= "UNSUPP now UNRESOLVED [UNSUP=>UNRES]"; |
| 68 | my $UNSUPPORTED_UNTESTED = "UNSUPP now UNTESTED [UNSUP=>UNTES]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 69 | my $UNSUPPORTED_DISAPPEARS= "UNSUPPORTED disappears [UNSUP=> ]"; |
| 70 | my $UNSUPPORTED_APPEARS = "UNSUPPORTED appears [ =>UNSUP]"; |
| 71 | |
| 72 | my $UNTESTED_PASS = "UNTESTED now PASS [UNTES=> PASS]"; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 73 | my $UNTESTED_XPASS = "UNTESTED now XPASS [UNTES=>XPASS]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 74 | my $UNTESTED_FAIL = "UNTESTED now FAIL [UNTES=> FAIL]"; |
| 75 | my $UNTESTED_XFAIL = "UNTESTED now XFAIL [UNTES=>XFAIL]"; |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 76 | my $UNTESTED_UNSUPPORTED = "UNTESTED now UNSUPP [UNTES=>UNSUP]"; |
| 77 | my $UNTESTED_UNRESOLVED = "UNTESTED now UNRESOLVED [UNTES=>UNRES]"; |
| 78 | my $UNTESTED_UNTESTED = "UNTESTED now UNTESTED [UNTES=>UNTES]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 79 | my $UNTESTED_DISAPPEARS = "UNTESTED disappears [UNTES=> ]"; |
| 80 | my $UNTESTED_APPEARS = "UNTESTED appears [ =>UNTES]"; |
| 81 | |
| 82 | my $UNRESOLVED_PASS = "UNRESOLVED now PASS [UNRES=> PASS]"; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 83 | my $UNRESOLVED_XPASS = "UNRESOLVED now XPASS [UNRES=>XPASS]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 84 | my $UNRESOLVED_FAIL = "UNRESOLVED now FAIL [UNRES=> FAIL]"; |
| 85 | my $UNRESOLVED_XFAIL = "UNRESOLVED now XFAIL [UNRES=>XFAIL]"; |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 86 | my $UNRESOLVED_UNSUPPORTED= "UNRESOLVED now UNSUPP [UNRES=>UNSUP]"; |
| 87 | my $UNRESOLVED_UNRESOLVED = "UNRESOLVED now UNRESOLVED [UNRES=>UNRES]"; |
| 88 | my $UNRESOLVED_UNTESTED = "UNRESOLVED now UNTESTED [UNRES=>UNTES]"; |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 89 | my $UNRESOLVED_DISAPPEARS = "UNRESOLVED disappears [UNRES=> ]"; |
| 90 | my $UNRESOLVED_APPEARS = "UNRESOLVED appears [ =>UNRES]"; |
| 91 | |
Christophe Lyon | bcbd748 | 2016-09-19 14:54:50 +0200 | [diff] [blame] | 92 | my $ERROR_DISAPPEARS = "ERROR disappears [ERROR=> ]"; |
| 93 | my $ERROR_APPEARS = "ERROR appears [ =>ERROR]"; |
| 94 | |
Christophe Lyon | 71cec96 | 2016-06-28 18:27:30 +0200 | [diff] [blame] | 95 | my $UNHANDLED_CASES = "Unhandled cases [ ..??.. ]"; |
| 96 | my $UNSTABLE_CASES = "Unstable cases, ignored [~RANDOM ]"; |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 97 | my $HWDEP_CASES = "HW dependent cases [HW-DEPENDENT]"; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 98 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 99 | # Handle status transitions: |
| 100 | # 'was' is the reference status |
| 101 | # 'is' is the current status |
| 102 | # 'cat' is the short name for the transition type |
| 103 | # 'handler' is a function handling the transition, if non-trivial |
| 104 | # report_hwdep is a boolean controlling whether to report the |
| 105 | # transition even if flagged as hardware-dependent |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 106 | my @handler_list = ( |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 107 | {was=>"PASS", is=>"PASS", cat=>$PASS_PASS, report_hwdep=>"false"}, |
| 108 | {was=>"PASS", is=>"XPASS", cat=>$PASS_XPASS, report_hwdep=>"true"}, |
| 109 | {was=>"PASS", is=>"FAIL", handler=>\&handle_pass_fail, report_hwdep=>"true"}, |
| 110 | {was=>"PASS", is=>"XFAIL", cat=>$PASS_XFAIL, report_hwdep=>"true"}, |
| 111 | {was=>"PASS", is=>"UNSUPPORTED",cat=>$PASS_UNSUPPORTED, report_hwdep=>"false"}, |
| 112 | {was=>"PASS", is=>"UNTESTED", cat=>$PASS_UNTESTED, report_hwdep=>"true"}, |
| 113 | {was=>"PASS", is=>"UNRESOLVED",cat=>$PASS_UNRESOLVED, report_hwdep=>"true"}, |
| 114 | {was=>"PASS", is=>"NO_EXIST", cat=>$PASS_DISAPPEARS, report_hwdep=>"false"}, |
| 115 | {was=>"NO_EXIST", is=>"PASS", cat=>$PASS_APPEARS, report_hwdep=>"false"}, |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 116 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 117 | {was=>"XPASS", is=>"PASS", cat=>$XPASS_PASS, report_hwdep=>"true"}, |
| 118 | {was=>"XPASS", is=>"XPASS", cat=>$XPASS_XPASS, report_hwdep=>"true"}, |
| 119 | {was=>"XPASS", is=>"FAIL", cat=>$XPASS_FAIL, report_hwdep=>"true"}, |
| 120 | {was=>"XPASS", is=>"XFAIL", cat=>$XPASS_XFAIL, report_hwdep=>"true"}, |
| 121 | {was=>"XPASS", is=>"UNSUPPORTED",cat=>$XPASS_UNSUPPORTED, report_hwdep=>"true"}, |
| 122 | {was=>"XPASS", is=>"UNTESTED", cat=>$XPASS_UNTESTED, report_hwdep=>"true"}, |
| 123 | {was=>"XPASS", is=>"UNRESOLVED",cat=>$XPASS_UNRESOLVED, report_hwdep=>"true"}, |
| 124 | {was=>"XPASS", is=>"NO_EXIST", cat=>$XPASS_DISAPPEARS, report_hwdep=>"true"}, |
| 125 | {was=>"NO_EXIST", is=>"XPASS", cat=>$XPASS_APPEARS, report_hwdep=>"true"}, |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 126 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 127 | {was=>"FAIL", is=>"PASS", cat=>$FAIL_PASS, report_hwdep=>"true"}, |
| 128 | {was=>"FAIL", is=>"XPASS", cat=>$FAIL_XPASS, report_hwdep=>"true"}, |
| 129 | {was=>"FAIL", is=>"FAIL", cat=>$FAIL_FAIL, report_hwdep=>"true"}, |
| 130 | {was=>"FAIL", is=>"XFAIL", cat=>$FAIL_XFAIL, report_hwdep=>"true"}, |
| 131 | {was=>"FAIL", is=>"UNSUPPORTED",cat=>$FAIL_UNSUPPORTED, report_hwdep=>"true"}, |
| 132 | {was=>"FAIL", is=>"UNTESTED", cat=>$FAIL_UNTESTED, report_hwdep=>"true"}, |
| 133 | {was=>"FAIL", is=>"UNRESOLVED",cat=>$FAIL_UNRESOLVED, report_hwdep=>"true"}, |
| 134 | {was=>"FAIL", is=>"NO_EXIST", cat=>$FAIL_DISAPPEARS, report_hwdep=>"true"}, |
| 135 | {was=>"NO_EXIST", is=>"FAIL", cat=>$FAIL_APPEARS, report_hwdep=>"true"}, |
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=>"XFAIL", is=>"PASS", cat=>$XFAIL_PASS, report_hwdep=>"true"}, |
| 138 | {was=>"XFAIL", is=>"XPASS", cat=>$XFAIL_XPASS, report_hwdep=>"true"}, |
| 139 | {was=>"XFAIL", is=>"FAIL", cat=>$XFAIL_FAIL, report_hwdep=>"true"}, |
| 140 | {was=>"XFAIL", is=>"XFAIL", cat=>$XFAIL_XFAIL, report_hwdep=>"true"}, |
| 141 | {was=>"XFAIL", is=>"UNSUPPORTED",cat=>$XFAIL_UNSUPPORTED, report_hwdep=>"true"}, |
| 142 | {was=>"XFAIL", is=>"UNTESTED", cat=>$XFAIL_UNTESTED, report_hwdep=>"true"}, |
| 143 | {was=>"XFAIL", is=>"UNRESOLVED",cat=>$XFAIL_UNRESOLVED, report_hwdep=>"true"}, |
| 144 | {was=>"XFAIL", is=>"NO_EXIST", cat=>$XFAIL_DISAPPEARS, report_hwdep=>"true"}, |
| 145 | {was=>"NO_EXIST", is=>"XFAIL", cat=>$XFAIL_APPEARS, report_hwdep=>"true"}, |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 146 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 147 | {was=>"UNSUPPORTED", is=>"PASS", cat=>$UNSUPPORTED_PASS, report_hwdep=>"true"}, |
| 148 | {was=>"UNSUPPORTED", is=>"XPASS", cat=>$UNSUPPORTED_XPASS, report_hwdep=>"true"}, |
| 149 | {was=>"UNSUPPORTED", is=>"FAIL", cat=>$UNSUPPORTED_FAIL, report_hwdep=>"true"}, |
| 150 | {was=>"UNSUPPORTED", is=>"XFAIL", cat=>$UNSUPPORTED_XFAIL, report_hwdep=>"true"}, |
| 151 | {was=>"UNSUPPORTED", is=>"UNSUPPORTED",cat=>$UNSUPPORTED_UNSUPPORTED, report_hwdep=>"true"}, |
| 152 | {was=>"UNSUPPORTED", is=>"UNTESTED", cat=>$UNSUPPORTED_UNTESTED, report_hwdep=>"true"}, |
| 153 | {was=>"UNSUPPORTED", is=>"UNRESOLVED",cat=>$UNSUPPORTED_UNRESOLVED, report_hwdep=>"true"}, |
| 154 | {was=>"UNSUPPORTED", is=>"NO_EXIST", cat=>$UNSUPPORTED_DISAPPEARS, report_hwdep=>"true"}, |
| 155 | {was=>"NO_EXIST", is=>"UNSUPPORTED", cat=>$UNSUPPORTED_APPEARS, report_hwdep=>"true"}, |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 156 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 157 | {was=>"UNTESTED", is=>"PASS", cat=>$UNTESTED_PASS, report_hwdep=>"true"}, |
| 158 | {was=>"UNTESTED", is=>"XPASS", cat=>$UNTESTED_XPASS, report_hwdep=>"true"}, |
| 159 | {was=>"UNTESTED", is=>"FAIL", cat=>$UNTESTED_FAIL, report_hwdep=>"true"}, |
| 160 | {was=>"UNTESTED", is=>"XFAIL", cat=>$UNTESTED_XFAIL, report_hwdep=>"true"}, |
| 161 | {was=>"UNTESTED", is=>"UNSUPPORTED",cat=>$UNTESTED_UNSUPPORTED,report_hwdep=>"true"}, |
| 162 | {was=>"UNTESTED", is=>"UNTESTED", cat=>$UNTESTED_UNTESTED, report_hwdep=>"true"}, |
| 163 | {was=>"UNTESTED", is=>"UNRESOLVED",cat=>$UNTESTED_UNRESOLVED, report_hwdep=>"true"}, |
| 164 | {was=>"UNTESTED", is=>"NO_EXIST", cat=>$UNTESTED_DISAPPEARS, report_hwdep=>"true"}, |
| 165 | {was=>"NO_EXIST", is=>"UNTESTED", cat=>$UNTESTED_APPEARS, report_hwdep=>"true"}, |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 166 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 167 | {was=>"UNRESOLVED", is=>"PASS", cat=>$UNRESOLVED_PASS, report_hwdep=>"true"}, |
| 168 | {was=>"UNRESOLVED", is=>"XPASS", cat=>$UNRESOLVED_XPASS, report_hwdep=>"true"}, |
| 169 | {was=>"UNRESOLVED", is=>"FAIL", cat=>$UNRESOLVED_FAIL, report_hwdep=>"true"}, |
| 170 | {was=>"UNRESOLVED", is=>"XFAIL", cat=>$UNRESOLVED_XFAIL, report_hwdep=>"true"}, |
| 171 | {was=>"UNRESOLVED", is=>"UNSUPPORTED",cat=>$UNRESOLVED_UNSUPPORTED, report_hwdep=>"true"}, |
| 172 | {was=>"UNRESOLVED", is=>"UNTESTED", cat=>$UNRESOLVED_UNTESTED, report_hwdep=>"true"}, |
| 173 | {was=>"UNRESOLVED", is=>"UNRESOLVED",cat=>$UNRESOLVED_UNRESOLVED, report_hwdep=>"true"}, |
| 174 | {was=>"UNRESOLVED", is=>"NO_EXIST", cat=>$UNRESOLVED_DISAPPEARS, report_hwdep=>"true"}, |
| 175 | {was=>"NO_EXIST", is=>"UNRESOLVED", cat=>$UNRESOLVED_APPEARS, report_hwdep=>"true"}, |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 176 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 177 | {was=>"ERROR", is=>"NO_EXIST", cat=>$ERROR_DISAPPEARS, report_hwdep=>"true"}, |
| 178 | {was=>"NO_EXIST", is=>"ERROR", cat=>$ERROR_APPEARS, report_hwdep=>"true"}, |
Christophe Lyon | bcbd748 | 2016-09-19 14:54:50 +0200 | [diff] [blame] | 179 | |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 180 | # {was=>"NO_EXIST", is=>"NO_EXIST", handler=>\&handle_not_yet_supported} |
| 181 | ); |
| 182 | |
| 183 | ###################################################### |
| 184 | # TREAT ARGUMENTS |
| 185 | |
| 186 | my $verbose=0; |
| 187 | my $quiet=0; |
| 188 | my $long=0; |
| 189 | my $short=0; |
| 190 | my $debug=0; |
| 191 | my ($testroot, $basename); |
| 192 | my ($ref_file_name, $res_file_name); |
| 193 | my $nounstable=0; |
| 194 | my $unstablefile=0; |
| 195 | my @unstable_markers=(); |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 196 | |
| 197 | my $no_hwdep=0; # Ignore hw-dependent flag (ie. consider all tests as *not* hw-dependent |
| 198 | my $hwdep_file=0; # File containing the list of hw-dependent tests |
| 199 | my @hwdep_markers=(); # Optional markers when parsing hwdep_file |
| 200 | |
Christophe Lyon | ca9d830 | 2017-05-22 12:04:00 +0000 | [diff] [blame] | 201 | 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] | 202 | |
| 203 | GetOptions ("l" => \$long, |
| 204 | "s" => \$short, |
| 205 | "q" => \$quiet, |
| 206 | "v" => \$verbose, |
| 207 | "dbg" => \$debug, |
| 208 | "testroot=s" => \$testroot, |
| 209 | "basename=s" => \$basename, |
Christophe Lyon | ca9d830 | 2017-05-22 12:04:00 +0000 | [diff] [blame] | 210 | "pass-thresh=f" => \$ratio_thresh, |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 211 | "no-unstable" => \$nounstable, |
| 212 | "unstable-tests=s" => \$unstablefile, |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 213 | "unstable-marker=s" => \@unstable_markers, |
| 214 | "no-hwdep" => \$no_hwdep, |
| 215 | "hwdep-tests=s" => \$hwdep_file, |
| 216 | "hwdep-marker=s" => \@hwdep_markers); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 217 | |
| 218 | $ref_file_name = $ARGV[0] if ($#ARGV == 1); |
| 219 | $res_file_name = $ARGV[1] if ($#ARGV == 1); |
| 220 | |
| 221 | $ref_file_name = $testroot."/expected_results/".$basename if ($testroot and $basename); |
| 222 | $res_file_name = $testroot."/testing/run/".$basename if ($testroot and $basename); |
| 223 | &usage if (not $ref_file_name or not $res_file_name); |
| 224 | |
| 225 | my ($col_boldred, $col_red, $col_boldgreen, $col_green, $col_boldpink, $col_pink, $col_reset) |
| 226 | = ("\033[31;1m","\033[31;3m","\033[32;1m","\033[32;3m","\033[35;1m","\033[35;2m","\033[0m"); |
| 227 | ($col_boldred, $col_red, $col_boldgreen, $col_green, $col_boldpink, $col_pink, $col_reset) |
| 228 | = ("","","","","","","") if (not I_am_interactive()); |
| 229 | |
| 230 | ###################################################### |
| 231 | # MAIN PROGRAM |
| 232 | # print "comparing $ref_file_name $res_file_name\n"; |
| 233 | |
| 234 | # If none of the 2 .sum exists, nothing to compare: exit early. |
| 235 | exit 0 if ( (! -e $ref_file_name) && (! -e $res_file_name )); |
| 236 | |
| 237 | my $ref = read_sum($ref_file_name) ; |
| 238 | my $res = read_sum($res_file_name) ; |
| 239 | my @unstablelist = (); |
| 240 | |
| 241 | @unstablelist = read_unstable($unstablefile) if ($unstablefile ne 0); |
| 242 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 243 | # Import list of hw-dependent files, if provided |
| 244 | my @hwdep_list = (); |
| 245 | |
| 246 | @hwdep_list = read_unstable($hwdep_file) if ($hwdep_file ne 0); |
| 247 | |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 248 | compare_results($ref, $res); |
| 249 | |
| 250 | my $final_result = print_compare_results_summary($ref, $res); |
| 251 | |
| 252 | exit $final_result; |
| 253 | |
| 254 | ###################################################### |
| 255 | # UTILITIES |
| 256 | |
| 257 | sub empty_result() |
| 258 | { |
Christophe Lyon | bcbd748 | 2016-09-19 14:54:50 +0200 | [diff] [blame] | 259 | my %empty_result;# = {PASS=>0, FAIL=>0, XPASS=>0, XFAIL=>0, UNSUPPORTED=>0, UNTESTED=>0, UNRESOLVED=>0, ERROR=>0}; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 260 | $empty_result{PASS}=$empty_result{FAIL}=$empty_result{XPASS}=$empty_result{XFAIL}=0; |
Christophe Lyon | bcbd748 | 2016-09-19 14:54:50 +0200 | [diff] [blame] | 261 | $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] | 262 | $empty_result{NB}=0; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 263 | return \%empty_result; |
| 264 | } |
| 265 | sub I_am_interactive { |
| 266 | return -t STDIN && -t STDOUT; |
| 267 | } |
| 268 | sub usage() |
| 269 | { |
| 270 | print "Usage : $app <ref_file.sum> <result_file.sum>\n"; |
| 271 | exit 1; |
| 272 | } |
| 273 | |
| 274 | |
| 275 | ###################################################### |
| 276 | # PARSING |
| 277 | sub read_sum($) |
| 278 | { |
| 279 | my ($sum_file) = @_; |
| 280 | my $res = empty_result(); |
| 281 | my %testcases; |
| 282 | my %unsupported; |
| 283 | $res->{testcases} = \%testcases; |
| 284 | my $pending_timeout=0; |
Christophe Lyon | c63afc9 | 2021-07-01 09:52:29 +0000 | [diff] [blame] | 285 | my $current_tool=""; |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 286 | my $current_exp=""; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 287 | |
Christophe Lyon | ad8c724 | 2016-02-03 13:04:28 +0100 | [diff] [blame] | 288 | $res->{EXEC}->{PASS} = 0; |
| 289 | $res->{EXEC}->{FAIL} = 0; |
| 290 | |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 291 | open SUMFILE, $sum_file or die $!; |
| 292 | while (<SUMFILE>) |
| 293 | { |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 294 | if (m/^(PASS|XPASS|FAIL|XFAIL|UNSUPPORTED|UNTESTED|UNRESOLVED|ERROR): *(.*)/) |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 295 | { |
| 296 | my ($diag,$tc) = ($1,$2); |
| 297 | my %tcresult; |
| 298 | $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] | 299 | # Prefix test name wih .exp filename to help report |
| 300 | # regressions/run bisect. |
| 301 | $tc = "$current_tool:$current_exp=$tc"; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 302 | $testcases{$tc} = empty_result() if (not exists $testcases{$tc}); |
| 303 | $testcases{$tc}->{$diag}++; |
| 304 | $testcases{$tc}->{HAS_TIMED_OUT} = $pending_timeout; |
Christophe Lyon | c63afc9 | 2021-07-01 09:52:29 +0000 | [diff] [blame] | 305 | $testcases{$tc}->{TOOL_EXP} = "$current_tool:$current_exp"; |
Christophe Lyon | 9a3ce97 | 2021-06-30 23:18:23 +0000 | [diff] [blame] | 306 | $testcases{$tc}->{NB}++; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 307 | $pending_timeout = 0; |
| 308 | $res->{$diag}++; |
Christophe Lyon | ad8c724 | 2016-02-03 13:04:28 +0100 | [diff] [blame] | 309 | # Count execution tests, for a sanity check |
| 310 | if ($tc =~ /execution/) |
| 311 | { |
| 312 | $res->{EXEC}->{$diag}++; |
| 313 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 314 | } |
| 315 | elsif (m/WARNING: program timed out/) |
| 316 | { |
| 317 | $pending_timeout = 1; |
| 318 | } |
| 319 | elsif (m/^(# of expected passes|# of unexpected failures|# of expected failures|# of known failures|# of unsupported tests|# of untested testcases)\s+(.*)/) |
| 320 | { |
| 321 | $res->{"summary - "."$1"} = $2; |
| 322 | } |
| 323 | elsif (m/^\/.*\/([^\/]+)\s+version\s+(.*)/) |
| 324 | { |
| 325 | $res->{tool} = $1; |
| 326 | $res->{version} = $2; |
| 327 | $res->{version} =~ s/ [-(].*//; |
| 328 | } |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 329 | elsif (m/^Running target .*/) |
| 330 | { |
| 331 | } |
| 332 | elsif (m/^Running (.*) \.\.\.*/) |
| 333 | { |
| 334 | $current_exp=$1; |
| 335 | $current_exp =~ s|.*/testsuite/||; |
| 336 | } |
Christophe Lyon | c63afc9 | 2021-07-01 09:52:29 +0000 | [diff] [blame] | 337 | elsif (m/^\t\t=== (.*) tests ===/) |
| 338 | { |
| 339 | $current_tool=$1; |
| 340 | } |
| 341 | elsif (m/^\t\t=== (.*) Summary ===/) |
| 342 | { |
| 343 | $current_tool=""; |
| 344 | $current_exp=""; |
| 345 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 346 | } |
| 347 | close SUMFILE; |
| 348 | return $res; |
| 349 | } |
| 350 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 351 | # Parse list of unstable/hw-dependent tests |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 352 | sub read_unstable($) |
| 353 | { |
| 354 | my ($unstable_file) = @_; |
| 355 | my @unstable_tests = (); |
| 356 | |
| 357 | open UNSTABLEFILE, $unstable_file or die $!; |
| 358 | while (<UNSTABLEFILE>) |
| 359 | { |
| 360 | # Skip lines starting with '#', or with spaces only |
| 361 | if ((/^#/) || (/^[ ]*$/)) |
| 362 | { |
| 363 | } |
| 364 | else |
| 365 | { |
| 366 | chomp; |
| 367 | |
| 368 | my $test = $_; |
| 369 | |
| 370 | # Check if line is of type: target:testname |
Christophe Lyon | 5e7241c | 2015-12-04 12:57:27 +0100 | [diff] [blame] | 371 | if (/^(.*?):/) |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 372 | { |
| 373 | foreach my $unstable_marker (@unstable_markers) |
| 374 | { |
| 375 | if ($unstable_marker eq $1) { |
| 376 | # If target matches the one supplied as script |
| 377 | # argument, add the testname to the list |
Christophe Lyon | 5e7241c | 2015-12-04 12:57:27 +0100 | [diff] [blame] | 378 | $test =~ s/.*?://; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 379 | push @unstable_tests, $test; |
| 380 | } |
| 381 | } |
| 382 | } else { |
| 383 | push @unstable_tests, $test; |
| 384 | } |
| 385 | } |
| 386 | } |
| 387 | close UNSTABLEFILE; |
| 388 | return @unstable_tests; |
| 389 | } |
| 390 | |
| 391 | ###################################################### |
| 392 | # DIFFING |
| 393 | sub handle_pass_fail($$$$) |
| 394 | { |
| 395 | my ($ref, $res, $diag_diag, $tc) = @_; |
| 396 | if ($res->{testcases}->{$tc}->{HAS_TIMED_OUT}) |
| 397 | { |
| 398 | push @{$res->{$PASSED_NOW_TIMEOUTS}}, $tc; |
| 399 | } |
| 400 | else |
| 401 | { |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 402 | # This transition is flagged as hw-dependent if: |
| 403 | # - the name is in the list |
| 404 | # - the transition should not be reported (but be flagged as hw-dependent instead) |
| 405 | # - --no-hwdep was not provided |
| 406 | if ((grep { (index $tc,$_)!=-1} @hwdep_list) |
| 407 | && ($diag_diag->{report_hwdep} eq "false") |
| 408 | && ($no_hwdep == 0)) { |
| 409 | push @{$res->{$HWDEP_CASES}}, $tc; |
| 410 | } else { |
| 411 | push @{$res->{$PASS_FAIL}}, $tc; |
| 412 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 413 | } |
| 414 | } |
| 415 | |
| 416 | sub compare_results($$) |
| 417 | { |
| 418 | my ($ref, $res) = @_; |
| 419 | |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 420 | @{$res->{$PASS_PASS}} = (); |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 421 | @{$res->{$PASS_XPASS}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 422 | @{$res->{$PASS_FAIL}} = (); |
| 423 | @{$res->{$PASS_XFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 424 | @{$res->{$PASS_UNSUPPORTED}} = (); |
| 425 | @{$res->{$PASS_UNTESTED}} = (); |
| 426 | @{$res->{$PASS_UNRESOLVED}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 427 | @{$res->{$PASS_DISAPPEARS}} = (); |
| 428 | @{$res->{$PASS_APPEARS}} = (); |
| 429 | @{$res->{$PASSED_NOW_TIMEOUTS}} = (); |
| 430 | |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 431 | @{$res->{$XPASS_PASS}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 432 | @{$res->{$XPASS_XPASS}} = (); |
| 433 | @{$res->{$XPASS_FAIL}} = (); |
| 434 | @{$res->{$XPASS_XFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 435 | @{$res->{$XPASS_UNSUPPORTED}} = (); |
| 436 | @{$res->{$XPASS_UNTESTED}} = (); |
| 437 | @{$res->{$XPASS_UNRESOLVED}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 438 | @{$res->{$XPASS_DISAPPEARS}} = (); |
| 439 | @{$res->{$XPASS_APPEARS}} = (); |
| 440 | |
| 441 | @{$res->{$FAIL_PASS}} = (); |
| 442 | @{$res->{$FAIL_XPASS}} = (); |
| 443 | @{$res->{$FAIL_FAIL}} = (); |
| 444 | @{$res->{$FAIL_XFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 445 | @{$res->{$FAIL_UNSUPPORTED}} = (); |
| 446 | @{$res->{$FAIL_UNTESTED}} = (); |
| 447 | @{$res->{$FAIL_UNRESOLVED}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 448 | @{$res->{$FAIL_DISAPPEARS}} = (); |
| 449 | @{$res->{$FAIL_APPEARS}} = (); |
| 450 | |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 451 | @{$res->{$XFAIL_PASS}} = (); |
| 452 | @{$res->{$XFAIL_XPASS}} = (); |
| 453 | @{$res->{$XFAIL_FAIL}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 454 | @{$res->{$XFAIL_XFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 455 | @{$res->{$XFAIL_UNSUPPORTED}} = (); |
| 456 | @{$res->{$XFAIL_UNTESTED}} = (); |
| 457 | @{$res->{$XFAIL_UNRESOLVED}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 458 | @{$res->{$XFAIL_DISAPPEARS}} = (); |
| 459 | @{$res->{$XFAIL_APPEARS}} = (); |
| 460 | |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 461 | @{$res->{$UNSUPPORTED_PASS}} = (); |
| 462 | @{$res->{$UNSUPPORTED_XPASS}} = (); |
| 463 | @{$res->{$UNSUPPORTED_FAIL}} = (); |
| 464 | @{$res->{$UNSUPPORTED_XFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 465 | @{$res->{$UNSUPPORTED_UNSUPPORTED}} = (); |
| 466 | @{$res->{$UNSUPPORTED_UNTESTED}} = (); |
| 467 | @{$res->{$UNSUPPORTED_UNRESOLVED}} = (); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 468 | @{$res->{$UNSUPPORTED_DISAPPEARS}} = (); |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 469 | @{$res->{$UNSUPPORTED_APPEARS}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 470 | |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 471 | @{$res->{$UNTESTED_PASS}} = (); |
| 472 | @{$res->{$UNTESTED_XPASS}} = (); |
| 473 | @{$res->{$UNTESTED_FAIL}} = (); |
| 474 | @{$res->{$UNTESTED_XFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 475 | @{$res->{$UNTESTED_UNSUPPORTED}} = (); |
| 476 | @{$res->{$UNTESTED_UNTESTED}} = (); |
| 477 | @{$res->{$UNTESTED_UNRESOLVED}} = (); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 478 | @{$res->{$UNTESTED_DISAPPEARS}} = (); |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 479 | @{$res->{$UNTESTED_APPEARS}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 480 | |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 481 | @{$res->{$UNRESOLVED_PASS}} = (); |
| 482 | @{$res->{$UNRESOLVED_XPASS}} = (); |
| 483 | @{$res->{$UNRESOLVED_FAIL}} = (); |
| 484 | @{$res->{$UNRESOLVED_XFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 485 | @{$res->{$UNRESOLVED_UNSUPPORTED}} = (); |
| 486 | @{$res->{$UNRESOLVED_UNTESTED}} = (); |
| 487 | @{$res->{$UNRESOLVED_UNRESOLVED}} = (); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 488 | @{$res->{$UNRESOLVED_DISAPPEARS}} = (); |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 489 | @{$res->{$UNRESOLVED_APPEARS}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 490 | |
Christophe Lyon | bcbd748 | 2016-09-19 14:54:50 +0200 | [diff] [blame] | 491 | @{$res->{$ERROR_DISAPPEARS}} = (); |
| 492 | @{$res->{$ERROR_APPEARS}} = (); |
| 493 | |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 494 | @{$res->{$UNHANDLED_CASES}} = (); |
| 495 | @{$res->{$UNSTABLE_CASES}} = (); |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 496 | @{$res->{$HWDEP_CASES}} = (); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 497 | |
| 498 | #### MERGE REF AND RES |
| 499 | foreach my $key (sort (keys %{$res->{testcases}})) |
| 500 | { |
| 501 | if (not exists $ref->{testcases}->{$key}) { |
| 502 | $ref->{testcases}->{$key} = empty_result(); |
| 503 | $ref->{testcases}->{$key}->{NO_EXIST} = 1; |
Christophe Lyon | c63afc9 | 2021-07-01 09:52:29 +0000 | [diff] [blame] | 504 | $ref->{testcases}->{$key}->{TOOL_EXP} = $res->{testcases}->{$key}->{TOOL_EXP}; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 505 | } |
Christophe Lyon | 9a3ce97 | 2021-06-30 23:18:23 +0000 | [diff] [blame] | 506 | |
| 507 | # Consistency check, useful in case of duplicate test names |
| 508 | if ($ref->{testcases}->{$key}->{NB} != $res->{testcases}->{$key}->{NB}) { |
| 509 | print "Number of occurrences mismatch $key (ref $ref->{testcases}->{$key}->{NB} vs $res->{testcases}->{$key}->{NB})\n" if ($debug); |
| 510 | if ($ref->{testcases}->{$key}->{NB} > $res->{testcases}->{$key}->{NB}) { |
| 511 | $res->{testcases}->{$key}->{NO_EXIST} = 1; |
| 512 | } elsif ($ref->{testcases}->{$key}->{NB} < $res->{testcases}->{$key}->{NB}) { |
| 513 | $ref->{testcases}->{$key}->{NO_EXIST} = 1; |
| 514 | } |
| 515 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 516 | } |
| 517 | foreach my $key (keys %{$ref->{testcases}}) |
| 518 | { |
| 519 | if (not exists $res->{testcases}->{$key}) |
| 520 | { |
| 521 | $res->{testcases}->{$key} = empty_result(); |
| 522 | $res->{testcases}->{$key}->{NO_EXIST} = 1; |
Christophe Lyon | c63afc9 | 2021-07-01 09:52:29 +0000 | [diff] [blame] | 523 | $res->{testcases}->{$key}->{TOOL_EXP} = $ref->{testcases}->{$key}->{TOOL_EXP}; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 524 | } |
Christophe Lyon | 9a3ce97 | 2021-06-30 23:18:23 +0000 | [diff] [blame] | 525 | |
| 526 | # No need for similar consistency check: since we are |
| 527 | # checking for tests whose number of occurrences are |
| 528 | # different, they are present in both ref and res, so |
| 529 | # no need to check again here. |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 530 | } |
| 531 | |
| 532 | #### ACTIONS FOR EACH CASES |
| 533 | my %unstable_found; |
| 534 | |
| 535 | foreach my $key (sort (keys %{$ref->{testcases}})) |
| 536 | { |
| 537 | foreach my $diag_diag (@handler_list) |
| 538 | { |
| 539 | 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] | 540 | and $ref->{testcases}->{$key}->{$diag_diag->{was}} |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 541 | and $res->{testcases}->{$key}->{$diag_diag->{is}}) |
| 542 | { |
Christophe Lyon | 1ed9310 | 2021-06-30 23:04:43 +0000 | [diff] [blame] | 543 | 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] | 544 | # If testcase is listed as 'unstable' mark it as such |
| 545 | # and skip other processing to avoid listing it twice. |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 546 | { |
| 547 | if (grep { (index $key,$_)!=-1} @unstablelist) |
| 548 | { |
| 549 | print "[unstable] $key\n" if ($debug); |
| 550 | $unstable_found{$key}=1; |
| 551 | } |
| 552 | else { |
| 553 | print "[$diag_diag->{was} => $diag_diag->{is}] $key\n" if ($debug); |
| 554 | if ($diag_diag->{handler}) |
| 555 | { |
| 556 | $diag_diag->{handler} ($ref, $res, $diag_diag, $key); |
| 557 | } |
| 558 | else |
| 559 | { |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 560 | # This transition is flagged as hw-dependent if: |
| 561 | # - the name is in the list |
| 562 | # - the transition should not be reported (but be flagged as hw-dependent instead) |
| 563 | # - --no-hwdep was not provided |
| 564 | if ((grep { (index $key,$_)!=-1} @hwdep_list) |
| 565 | && ($diag_diag->{report_hwdep} eq "false") |
| 566 | && ($no_hwdep == 0)) { |
| 567 | push @{$res->{$HWDEP_CASES}}, $key; |
| 568 | } else { |
| 569 | push @{$res->{$diag_diag->{cat}}}, $key; |
| 570 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 571 | } |
| 572 | } |
| 573 | } |
| 574 | } |
| 575 | } |
| 576 | } |
| 577 | push @{$res->{$UNSTABLE_CASES}}, (sort (keys (%unstable_found))) if ($nounstable == 0); |
| 578 | |
| 579 | } |
| 580 | |
| 581 | ###################################################### |
| 582 | # PRINTING |
| 583 | sub print_tclist($@) |
| 584 | { |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 585 | # 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] | 586 | # associated with the testcase. |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 587 | my ($this_res, $cat, @tclist) = @_; |
Christophe Lyon | c63afc9 | 2021-07-01 09:52:29 +0000 | [diff] [blame] | 588 | my $this_tool_exp = ""; |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 589 | if (scalar(@tclist)) |
| 590 | { |
| 591 | print " - ".$cat.":\n\n"; |
| 592 | foreach my $case (@tclist) |
| 593 | { |
Christophe Lyon | c63afc9 | 2021-07-01 09:52:29 +0000 | [diff] [blame] | 594 | if ($this_tool_exp ne $this_res->{testcases}->{$case}->{TOOL_EXP}) { |
| 595 | $this_tool_exp = $this_res->{testcases}->{$case}->{TOOL_EXP}; |
| 596 | print " Executed from: $this_tool_exp\n"; |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 597 | } |
| 598 | print " $case\n"; |
| 599 | } |
| 600 | print "\n\n"; |
| 601 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 602 | } |
| 603 | |
| 604 | sub print_compare_results_summary($$) |
| 605 | { |
| 606 | my ($ref, $res) = @_; |
| 607 | my $return_value=0; |
Christophe Lyon | f5aeb34 | 2015-12-08 14:47:16 +0100 | [diff] [blame] | 608 | my $total_better = 0; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 609 | my $rtotal = 0; |
| 610 | my $quiet_reg = $quiet; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 611 | my $ref_ratio = 0; |
Christophe Lyon | 0ab7d35 | 2016-04-06 10:39:58 +0200 | [diff] [blame] | 612 | my $ref_total = 0; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 613 | my $res_ratio = 0; |
Christophe Lyon | 0ab7d35 | 2016-04-06 10:39:58 +0200 | [diff] [blame] | 614 | my $res_total = 0; |
Christophe Lyon | ad8c724 | 2016-02-03 13:04:28 +0100 | [diff] [blame] | 615 | my $ignore_exec = 0; |
| 616 | my $ref_has_exec_tests = 0; |
| 617 | my $res_has_exec_tests = 0; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 618 | |
| 619 | # Compute the pass ratio as a sanity check |
Christophe Lyon | 0ab7d35 | 2016-04-06 10:39:58 +0200 | [diff] [blame] | 620 | $ref_total = $ref->{PASS} + |
| 621 | $ref->{XFAIL} + |
| 622 | $ref->{XPASS} + |
| 623 | $ref->{FAIL} + |
| 624 | $ref->{UNRESOLVED} + |
| 625 | $ref->{UNSUPPORTED} + |
| 626 | $ref->{UNTESTED}; |
| 627 | |
| 628 | # It is possible that no test is executed at all (for instance if |
| 629 | # RUNTESTFLAGS was too restrictive). Avoid division by 0. |
| 630 | if ($ref_total > 0) { |
| 631 | $ref_ratio = ($ref->{PASS} + $ref->{XFAIL}) / |
| 632 | $ref_total; |
| 633 | } |
| 634 | |
| 635 | $res_total = $res->{PASS} + |
| 636 | $res->{XFAIL} + |
| 637 | $res->{XPASS} + |
| 638 | $res->{FAIL} + |
| 639 | $res->{UNRESOLVED} + |
| 640 | $res->{UNSUPPORTED} + |
| 641 | $res->{UNTESTED}; |
| 642 | |
| 643 | if ($res_total > 0) { |
| 644 | $res_ratio = ($res->{PASS} + $res->{XFAIL}) / |
| 645 | $res_total; |
| 646 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 647 | |
| 648 | if (not $quiet) |
| 649 | { |
| 650 | printf "Comparing:\n"; |
| 651 | printf "REFERENCE:$ref_file_name\n"; |
| 652 | printf "CURRENT: $res_file_name\n\n"; |
| 653 | } |
| 654 | |
| 655 | #### TESTS STATUS |
| 656 | if (not $quiet and not $short) |
| 657 | { |
| 658 | printf " ` +---------+---------+\n"; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 659 | printf "o RUN STATUS: | REF | RES |\n"; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 660 | printf " +------------------------------------------+---------+---------+\n"; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 661 | printf " | %-40s | %7d | %7d |\n", "Passes [PASS]", $ref->{PASS}, $res->{PASS}; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 662 | printf " | %-40s | %7d | %7d |\n", "Unexpected fails [FAIL]", $ref->{FAIL}, $res->{FAIL}; |
Christophe Lyon | bcbd748 | 2016-09-19 14:54:50 +0200 | [diff] [blame] | 663 | printf " | %-40s | %7d | %7d |\n", "Errors [ERROR]", $ref->{ERROR}, $res->{ERROR}; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 664 | printf " | %-40s | %7d | %7d |\n", "Unexpected passes [XPASS]", $ref->{XPASS}, $res->{XPASS}; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 665 | printf " | %-40s | %7d | %7d |\n", "Expected fails [XFAIL]", $ref->{XFAIL}, $res->{XFAIL}; |
| 666 | printf " | %-40s | %7d | %7d |\n", "Unresolved [UNRESOLVED]", $ref->{UNRESOLVED}, $res->{UNRESOLVED}; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 667 | printf " | %-40s | %7d | %7d |\n", "Unsupported [UNSUPPORTED]", $ref->{UNSUPPORTED}, $res->{UNSUPPORTED}; |
| 668 | printf " | %-40s | %7d | %7d |\n", "Untested [UNTESTED]", $ref->{UNTESTED}, $res->{UNTESTED}; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 669 | printf " +------------------------------------------+---------+---------+\n"; |
| 670 | printf "\n"; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 671 | |
Christophe Lyon | 3d195c2 | 2016-04-06 16:00:25 +0200 | [diff] [blame] | 672 | printf " REF PASS ratio: %f\n", $ref_ratio; |
| 673 | printf " RES PASS ratio: %f\n", $res_ratio; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 674 | if ($ref_ratio < $ratio_thresh) |
| 675 | { |
Christophe Lyon | 1176f96 | 2016-03-03 18:01:10 +0100 | [diff] [blame] | 676 | printf " ***** ERROR: REF PASS ratio is abnormally low *****\n"; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 677 | } |
| 678 | if ($res_ratio < $ratio_thresh) |
| 679 | { |
Christophe Lyon | 1176f96 | 2016-03-03 18:01:10 +0100 | [diff] [blame] | 680 | printf " ***** ERROR: RES PASS ratio is abnormally low *****\n"; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 681 | } |
| 682 | |
Christophe Lyon | ad8c724 | 2016-02-03 13:04:28 +0100 | [diff] [blame] | 683 | # If both PASS and FAIL EXEC tests are zero, assume there is no |
| 684 | # execution test for this tool, and do not warn. |
| 685 | $ref_has_exec_tests = ($ref->{EXEC}->{PASS} + $ref->{EXEC}->{FAIL}) != 0; |
| 686 | if ($ref_has_exec_tests) |
| 687 | { |
| 688 | printf " ***** ERROR: No REF execution test PASSed. Check execution engine configuration. *****\n" if ($ref->{EXEC}->{PASS} == 0); |
| 689 | printf " ***** WARNING: No REF execution test FAILed. Check execution engine configuration. *****\n" if ($ref->{EXEC}->{FAIL} == 0); |
| 690 | } |
| 691 | |
| 692 | $res_has_exec_tests = ($res->{EXEC}->{PASS} + $res->{EXEC}->{FAIL}) != 0; |
| 693 | if ($res_has_exec_tests) |
| 694 | { |
| 695 | printf " ***** ERROR: No RES execution test PASSed. Check execution engine configuration. *****\n" if ($res->{EXEC}->{PASS} == 0); |
| 696 | printf " ***** WARNING: No RES execution test FAILed. Check execution engine configuration. *****\n" if ($res->{EXEC}->{FAIL} == 0); |
| 697 | } |
| 698 | |
| 699 | # Ignore number of execution tests when computing the return |
| 700 | # value, if both REF and RES have no execution test. |
| 701 | $ignore_exec = !$ref_has_exec_tests && !$res_has_exec_tests; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 702 | } |
| 703 | |
| 704 | #### REGRESSIONS ? |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 705 | $rtotal = scalar(@{$res->{$PASS_XPASS}}) |
| 706 | +scalar(@{$res->{$PASS_FAIL}}) |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 707 | +scalar(@{$res->{$PASS_UNRESOLVED}}) |
| 708 | +scalar(@{$res->{$PASSED_NOW_TIMEOUTS}}) |
Christophe Lyon | 3003783 | 2018-11-30 15:33:20 +0000 | [diff] [blame] | 709 | +scalar(@{$res->{$ERROR_APPEARS}}) |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 710 | +scalar(@{$res->{$XPASS_FAIL}}) |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 711 | +scalar(@{$res->{$XPASS_APPEARS}}) |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 712 | +scalar(@{$res->{$XPASS_UNRESOLVED}}) |
| 713 | +scalar(@{$res->{$FAIL_APPEARS}}) |
| 714 | +scalar(@{$res->{$FAIL_UNRESOLVED}}) |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 715 | +scalar(@{$res->{$XFAIL_FAIL}}) |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 716 | +scalar(@{$res->{$XFAIL_UNRESOLVED}}) |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 717 | +scalar(@{$res->{$UNSUPPORTED_FAIL}}) |
| 718 | +scalar(@{$res->{$UNSUPPORTED_XPASS}}) |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 719 | +scalar(@{$res->{$UNSUPPORTED_UNRESOLVED}}) |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 720 | +scalar(@{$res->{$UNTESTED_FAIL}}) |
| 721 | +scalar(@{$res->{$UNTESTED_XPASS}}) |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 722 | +scalar(@{$res->{$UNTESTED_UNRESOLVED}}) |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 723 | +scalar(@{$res->{$UNRESOLVED_FAIL}}) |
| 724 | +scalar(@{$res->{$UNRESOLVED_XPASS}}) |
Christophe Lyon | 3003783 | 2018-11-30 15:33:20 +0000 | [diff] [blame] | 725 | +scalar(@{$res->{$UNRESOLVED_APPEARS}}); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 726 | |
| 727 | $quiet_reg=1 if ($short and not $rtotal); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 728 | |
| 729 | if (not $quiet_reg) |
| 730 | { |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 731 | printf "\n$col_red"."o REGRESSIONS:\n"; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 732 | printf " +------------------------------------------+---------+\n"; |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 733 | 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] | 734 | printf " | %-40s | %7d |\n", $PASS_FAIL, scalar(@{$res->{$PASS_FAIL}}) if (scalar(@{$res->{$PASS_FAIL}})); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 735 | printf " | %-40s | %7d |\n", $PASS_UNRESOLVED, scalar(@{$res->{$PASS_UNRESOLVED}}) if (scalar(@{$res->{$PASS_UNRESOLVED}})); |
| 736 | 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] | 737 | 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] | 738 | printf " | %-40s | %7d |\n", $XPASS_FAIL, scalar(@{$res->{$XPASS_FAIL}}) if (scalar(@{$res->{$XPASS_FAIL}})); |
| 739 | printf " | %-40s | %7d |\n", $XPASS_APPEARS, scalar(@{$res->{$XPASS_APPEARS}}) if (scalar(@{$res->{$XPASS_APPEARS}})); |
| 740 | printf " | %-40s | %7d |\n", $XPASS_UNRESOLVED, scalar(@{$res->{$XPASS_UNRESOLVED}}) if (scalar(@{$res->{$XPASS_UNRESOLVED}})); |
| 741 | printf " | %-40s | %7d |\n", $FAIL_APPEARS, scalar(@{$res->{$FAIL_APPEARS}}) if (scalar(@{$res->{$FAIL_APPEARS}})); |
| 742 | 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] | 743 | 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] | 744 | printf " | %-40s | %7d |\n", $XFAIL_UNRESOLVED, scalar(@{$res->{$XFAIL_UNRESOLVED}}) if (scalar(@{$res->{$XFAIL_UNRESOLVED}})); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 745 | printf " | %-40s | %7d |\n", $UNSUPPORTED_FAIL, scalar(@{$res->{$UNSUPPORTED_FAIL}}) if (scalar(@{$res->{$UNSUPPORTED_FAIL}})); |
| 746 | 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] | 747 | 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] | 748 | printf " | %-40s | %7d |\n", $UNTESTED_FAIL, scalar(@{$res->{$UNTESTED_FAIL}}) if (scalar(@{$res->{$UNTESTED_FAIL}})); |
| 749 | 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] | 750 | 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] | 751 | printf " | %-40s | %7d |\n", $UNRESOLVED_FAIL, scalar(@{$res->{$UNRESOLVED_FAIL}}) if (scalar(@{$res->{$UNRESOLVED_FAIL}})); |
| 752 | 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] | 753 | 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] | 754 | printf " +------------------------------------------+---------+\n"; |
| 755 | printf " | %-40s | %7d |\n", "TOTAL_REGRESSIONS", $rtotal; |
| 756 | printf " +------------------------------------------+---------+\n"; |
| 757 | printf "\n"; |
| 758 | |
| 759 | if ($long) |
| 760 | { |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 761 | print_tclist($res, $PASS_XPASS, @{$res->{$PASS_XPASS}}); |
| 762 | print_tclist($res, $PASS_FAIL, @{$res->{$PASS_FAIL}}); |
| 763 | print_tclist($res, $PASS_UNRESOLVED, @{$res->{$PASS_UNRESOLVED}}); |
| 764 | print_tclist($res, $PASSED_NOW_TIMEOUTS, @{$res->{$PASSED_NOW_TIMEOUTS}}); |
| 765 | print_tclist($res, $ERROR_APPEARS, @{$res->{$ERROR_APPEARS}}); |
| 766 | print_tclist($res, $XPASS_FAIL, @{$res->{$XPASS_FAIL}}); |
| 767 | print_tclist($res, $XPASS_APPEARS, @{$res->{$XPASS_APPEARS}}); |
| 768 | print_tclist($res, $XPASS_UNRESOLVED, @{$res->{$XPASS_UNRESOLVED}}); |
| 769 | print_tclist($res, $FAIL_APPEARS, @{$res->{$FAIL_APPEARS}}); |
| 770 | print_tclist($res, $FAIL_UNRESOLVED, @{$res->{$FAIL_UNRESOLVED}}); |
| 771 | print_tclist($res, $XFAIL_FAIL, @{$res->{$XFAIL_FAIL}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 772 | print_tclist($res, $XFAIL_UNRESOLVED, @{$res->{$XFAIL_UNRESOLVED}}); |
| 773 | print_tclist($res, $UNSUPPORTED_FAIL, @{$res->{$UNSUPPORTED_FAIL}}); |
| 774 | print_tclist($res, $UNSUPPORTED_XPASS, @{$res->{$UNSUPPORTED_XPASS}}); |
| 775 | print_tclist($res, $UNSUPPORTED_UNRESOLVED, @{$res->{$UNSUPPORTED_UNRESOLVED}}); |
| 776 | print_tclist($res, $UNTESTED_FAIL, @{$res->{$UNTESTED_FAIL}}); |
| 777 | print_tclist($res, $UNTESTED_XPASS, @{$res->{$UNTESTED_XPASS}}); |
| 778 | print_tclist($res, $UNTESTED_UNRESOLVED, @{$res->{$UNTESTED_UNRESOLVED}}); |
| 779 | print_tclist($res, $UNRESOLVED_FAIL, @{$res->{$UNRESOLVED_FAIL}}); |
| 780 | print_tclist($res, $UNRESOLVED_XPASS, @{$res->{$UNRESOLVED_XPASS}}); |
| 781 | print_tclist($res, $UNRESOLVED_APPEARS, @{$res->{$UNRESOLVED_APPEARS}}); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 782 | } |
| 783 | printf "$col_reset\n"; |
| 784 | } |
| 785 | |
Christophe Lyon | 924cce4 | 2018-11-30 15:38:19 +0000 | [diff] [blame] | 786 | #### IMPROVEMENTS TO BE CHECKED ? |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 787 | if (not $quiet and not $short) |
| 788 | { |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 789 | $total_better = |
Christophe Lyon | 31279df | 2016-07-04 17:02:12 +0200 | [diff] [blame] | 790 | scalar(@{$res->{$PASS_DISAPPEARS}})+ |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 791 | scalar(@{$res->{$PASS_XFAIL}})+ |
| 792 | scalar(@{$res->{$PASS_APPEARS}})+ |
| 793 | scalar(@{$res->{$PASS_UNSUPPORTED}})+ |
| 794 | scalar(@{$res->{$PASS_UNTESTED}})+ |
| 795 | scalar(@{$res->{$XPASS_PASS}})+ |
| 796 | scalar(@{$res->{$XPASS_XFAIL}})+ |
| 797 | scalar(@{$res->{$XPASS_UNSUPPORTED}})+ |
| 798 | scalar(@{$res->{$XPASS_UNTESTED}})+ |
| 799 | scalar(@{$res->{$XPASS_DISAPPEARS}})+ |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 800 | scalar(@{$res->{$FAIL_PASS}})+ |
| 801 | scalar(@{$res->{$FAIL_XPASS}})+ |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 802 | scalar(@{$res->{$FAIL_XFAIL}})+ |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 803 | scalar(@{$res->{$FAIL_UNSUPPORTED}})+ |
| 804 | scalar(@{$res->{$FAIL_UNTESTED}})+ |
| 805 | scalar(@{$res->{$FAIL_DISAPPEARS}})+ |
Christophe Lyon | 3b675e8 | 2018-11-30 15:24:32 +0000 | [diff] [blame] | 806 | scalar(@{$res->{$XFAIL_DISAPPEARS}})+ |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 807 | scalar(@{$res->{$XFAIL_PASS}})+ |
| 808 | scalar(@{$res->{$XFAIL_XPASS}})+ |
| 809 | scalar(@{$res->{$XFAIL_UNSUPPORTED}})+ |
| 810 | scalar(@{$res->{$XFAIL_UNTESTED}})+ |
| 811 | scalar(@{$res->{$XFAIL_APPEARS}})+ |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 812 | scalar(@{$res->{$UNSUPPORTED_PASS}})+ |
| 813 | scalar(@{$res->{$UNSUPPORTED_XFAIL}})+ |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 814 | scalar(@{$res->{$UNSUPPORTED_UNTESTED}})+ |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 815 | scalar(@{$res->{$UNSUPPORTED_DISAPPEARS}})+ |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 816 | scalar(@{$res->{$UNSUPPORTED_APPEARS}})+ |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 817 | scalar(@{$res->{$UNTESTED_PASS}})+ |
| 818 | scalar(@{$res->{$UNTESTED_XFAIL}})+ |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 819 | scalar(@{$res->{$UNTESTED_UNSUPPORTED}})+ |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 820 | scalar(@{$res->{$UNTESTED_DISAPPEARS}})+ |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 821 | scalar(@{$res->{$UNTESTED_APPEARS}})+ |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 822 | scalar(@{$res->{$UNRESOLVED_PASS}})+ |
| 823 | scalar(@{$res->{$UNRESOLVED_XFAIL}})+ |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 824 | scalar(@{$res->{$UNRESOLVED_UNSUPPORTED}})+ |
| 825 | scalar(@{$res->{$UNRESOLVED_UNTESTED}})+ |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 826 | scalar(@{$res->{$UNRESOLVED_DISAPPEARS}})+ |
Christophe Lyon | bcbd748 | 2016-09-19 14:54:50 +0200 | [diff] [blame] | 827 | scalar(@{$res->{$ERROR_DISAPPEARS}})+ |
Christophe Lyon | f5aeb34 | 2015-12-08 14:47:16 +0100 | [diff] [blame] | 828 | scalar(@{$res->{$UNHANDLED_CASES}}); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 829 | |
Christophe Lyon | 924cce4 | 2018-11-30 15:38:19 +0000 | [diff] [blame] | 830 | printf "$col_pink"."o IMPROVEMENTS TO BE CHECKED:\n"; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 831 | printf " +------------------------------------------+---------+\n"; |
Christophe Lyon | 31279df | 2016-07-04 17:02:12 +0200 | [diff] [blame] | 832 | 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] | 833 | 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] | 834 | printf " | %-40s | %7d |\n", $PASS_APPEARS, scalar(@{$res->{$PASS_APPEARS}}) if (scalar(@{$res->{$PASS_APPEARS}})); |
| 835 | printf " | %-40s | %7d |\n", $PASS_UNSUPPORTED, scalar(@{$res->{$PASS_UNSUPPORTED}}) if (scalar(@{$res->{$PASS_UNSUPPORTED}})); |
| 836 | 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] | 837 | 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] | 838 | printf " | %-40s | %7d |\n", $XPASS_XFAIL, scalar(@{$res->{$XPASS_XFAIL}}) if (scalar(@{$res->{$XPASS_XFAIL}})); |
| 839 | printf " | %-40s | %7d |\n", $XPASS_UNSUPPORTED, scalar(@{$res->{$XPASS_UNSUPPORTED}}) if (scalar(@{$res->{$XPASS_UNSUPPORTED}})); |
| 840 | printf " | %-40s | %7d |\n", $XPASS_UNTESTED, scalar(@{$res->{$XPASS_UNTESTED}}) if (scalar(@{$res->{$XPASS_UNTESTED}})); |
| 841 | 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] | 842 | printf " | %-40s | %7d |\n", $FAIL_PASS, scalar(@{$res->{$FAIL_PASS}}) if (scalar(@{$res->{$FAIL_PASS}})); |
| 843 | 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] | 844 | printf " | %-40s | %7d |\n", $FAIL_XFAIL, scalar(@{$res->{$FAIL_XFAIL}}) if (scalar(@{$res->{$FAIL_XFAIL}})); |
| 845 | printf " | %-40s | %7d |\n", $FAIL_UNSUPPORTED, scalar(@{$res->{$FAIL_UNSUPPORTED}}) if (scalar(@{$res->{$FAIL_UNSUPPORTED}})); |
| 846 | printf " | %-40s | %7d |\n", $FAIL_UNTESTED, scalar(@{$res->{$FAIL_UNTESTED}}) if (scalar(@{$res->{$FAIL_UNTESTED}})); |
| 847 | 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] | 848 | 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] | 849 | printf " | %-40s | %7d |\n", $XFAIL_PASS, scalar(@{$res->{$XFAIL_PASS}}) if (scalar(@{$res->{$XFAIL_PASS}})); |
| 850 | printf " | %-40s | %7d |\n", $XFAIL_XPASS, scalar(@{$res->{$XFAIL_XPASS}}) if (scalar(@{$res->{$XFAIL_XPASS}})); |
| 851 | printf " | %-40s | %7d |\n", $XFAIL_UNSUPPORTED, scalar(@{$res->{$XFAIL_UNSUPPORTED}}) if (scalar(@{$res->{$XFAIL_UNSUPPORTED}})); |
| 852 | printf " | %-40s | %7d |\n", $XFAIL_UNTESTED, scalar(@{$res->{$XFAIL_UNTESTED}}) if (scalar(@{$res->{$XFAIL_UNTESTED}})); |
| 853 | printf " | %-40s | %7d |\n", $XFAIL_APPEARS, scalar(@{$res->{$XFAIL_APPEARS}}) if (scalar(@{$res->{$XFAIL_APPEARS}})); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 854 | printf " | %-40s | %7d |\n", $UNSUPPORTED_PASS, scalar(@{$res->{$UNSUPPORTED_PASS}}) if (scalar(@{$res->{$UNSUPPORTED_PASS}})); |
| 855 | 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] | 856 | 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] | 857 | 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] | 858 | 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] | 859 | printf " | %-40s | %7d |\n", $UNTESTED_PASS, scalar(@{$res->{$UNTESTED_PASS}}) if (scalar(@{$res->{$UNTESTED_PASS}})); |
| 860 | 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] | 861 | 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] | 862 | 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] | 863 | 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] | 864 | printf " | %-40s | %7d |\n", $UNRESOLVED_PASS, scalar(@{$res->{$UNRESOLVED_PASS}}) if (scalar(@{$res->{$UNRESOLVED_PASS}})); |
| 865 | 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] | 866 | printf " | %-40s | %7d |\n", $UNRESOLVED_UNSUPPORTED, scalar(@{$res->{$UNRESOLVED_UNSUPPORTED}}) if (scalar(@{$res->{$UNRESOLVED_UNSUPPORTED}})); |
| 867 | 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] | 868 | 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] | 869 | 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] | 870 | printf " | %-40s | %7d |\n", $UNHANDLED_CASES, scalar(@{$res->{$UNHANDLED_CASES}}) if (scalar(@{$res->{$UNHANDLED_CASES}})); |
| 871 | 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] | 872 | 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] | 873 | printf " +------------------------------------------+---------+\n"; |
Christophe Lyon | 924cce4 | 2018-11-30 15:38:19 +0000 | [diff] [blame] | 874 | 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] | 875 | printf " +------------------------------------------+---------+\n"; |
| 876 | printf "\n"; |
| 877 | |
| 878 | if ($long) |
| 879 | { |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 880 | print_tclist($res, $PASS_DISAPPEARS, @{$res->{$PASS_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 881 | print_tclist($res, $PASS_XFAIL, @{$res->{$PASS_XFAIL}}); |
| 882 | print_tclist($res, $PASS_APPEARS, @{$res->{$PASS_APPEARS}}); |
| 883 | print_tclist($res, $PASS_UNSUPPORTED, @{$res->{$PASS_UNSUPPORTED}}); |
| 884 | print_tclist($res, $PASS_UNTESTED, @{$res->{$PASS_UNTESTED}}); |
| 885 | print_tclist($res, $XPASS_PASS, @{$res->{$XPASS_PASS}}); |
| 886 | print_tclist($res, $XPASS_XFAIL, @{$res->{$XPASS_XFAIL}}); |
| 887 | print_tclist($res, $XPASS_UNSUPPORTED, @{$res->{$XPASS_UNSUPPORTED}}); |
| 888 | print_tclist($res, $XPASS_UNTESTED, @{$res->{$XPASS_UNTESTED}}); |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 889 | print_tclist($res, $XPASS_DISAPPEARS, @{$res->{$XPASS_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 890 | print_tclist($res, $FAIL_PASS, @{$res->{$FAIL_PASS}}); |
| 891 | print_tclist($res, $FAIL_XPASS, @{$res->{$FAIL_XPASS}}); |
| 892 | print_tclist($res, $FAIL_XFAIL, @{$res->{$FAIL_XFAIL}}); |
| 893 | print_tclist($res, $FAIL_UNSUPPORTED, @{$res->{$FAIL_UNSUPPORTED}}); |
| 894 | print_tclist($res, $FAIL_UNTESTED, @{$res->{$FAIL_UNTESTED}}); |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 895 | print_tclist($res, $FAIL_DISAPPEARS, @{$res->{$FAIL_DISAPPEARS}}); |
Christophe Lyon | 3b675e8 | 2018-11-30 15:24:32 +0000 | [diff] [blame] | 896 | print_tclist($res, $XFAIL_DISAPPEARS, @{$res->{$XFAIL_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 897 | print_tclist($res, $XFAIL_PASS, @{$res->{$XFAIL_PASS}}); |
| 898 | print_tclist($res, $XFAIL_XPASS, @{$res->{$XFAIL_XPASS}}); |
| 899 | print_tclist($res, $XFAIL_UNSUPPORTED, @{$res->{$XFAIL_UNSUPPORTED}}); |
| 900 | print_tclist($res, $XFAIL_UNTESTED, @{$res->{$XFAIL_UNTESTED}}); |
| 901 | print_tclist($res, $XFAIL_APPEARS, @{$res->{$XFAIL_APPEARS}}); |
| 902 | print_tclist($res, $UNSUPPORTED_PASS, @{$res->{$UNSUPPORTED_PASS}}); |
| 903 | print_tclist($res, $UNSUPPORTED_XFAIL, @{$res->{$UNSUPPORTED_XFAIL}}); |
| 904 | print_tclist($res, $UNSUPPORTED_UNTESTED, @{$res->{$UNSUPPORTED_UNTESTED}}); |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 905 | print_tclist($res, $UNSUPPORTED_DISAPPEARS, @{$res->{$UNSUPPORTED_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 906 | print_tclist($res, $UNSUPPORTED_APPEARS, @{$res->{$UNSUPPORTED_APPEARS}}); |
| 907 | print_tclist($res, $UNTESTED_PASS, @{$res->{$UNTESTED_PASS}}); |
| 908 | print_tclist($res, $UNTESTED_XFAIL, @{$res->{$UNTESTED_XFAIL}}); |
| 909 | print_tclist($res, $UNTESTED_UNSUPPORTED, @{$res->{$UNTESTED_UNSUPPORTED}}); |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 910 | print_tclist($res, $UNTESTED_DISAPPEARS, @{$res->{$UNTESTED_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 911 | print_tclist($res, $UNTESTED_APPEARS, @{$res->{$UNTESTED_APPEARS}}); |
| 912 | print_tclist($res, $UNRESOLVED_PASS, @{$res->{$UNRESOLVED_PASS}}); |
| 913 | print_tclist($res, $UNRESOLVED_XFAIL, @{$res->{$UNRESOLVED_XFAIL}}); |
| 914 | print_tclist($res, $UNRESOLVED_UNSUPPORTED, @{$res->{$UNRESOLVED_UNSUPPORTED}}); |
| 915 | print_tclist($res, $UNRESOLVED_UNTESTED, @{$res->{$UNRESOLVED_UNTESTED}}); |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 916 | print_tclist($res, $UNRESOLVED_DISAPPEARS, @{$res->{$UNRESOLVED_DISAPPEARS}}); |
| 917 | print_tclist($res, $ERROR_DISAPPEARS, @{$res->{$ERROR_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 918 | print_tclist($res, $UNHANDLED_CASES, @{$res->{$UNHANDLED_CASES}}); |
| 919 | print_tclist($res, $UNSTABLE_CASES, @{$res->{$UNSTABLE_CASES}}); |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 920 | print_tclist($res, $HWDEP_CASES, @{$res->{$HWDEP_CASES}}); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 921 | } |
| 922 | printf "$col_reset\n"; |
| 923 | } |
| 924 | |
Christophe Lyon | f5aeb34 | 2015-12-08 14:47:16 +0100 | [diff] [blame] | 925 | $return_value = 1 if ($total_better); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 926 | |
| 927 | $return_value = 2 if ($rtotal); |
| 928 | |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 929 | # Error if there was no PASS (eg when sth went wrong and no .sum was generated) |
| 930 | $return_value = 2 if (($res->{PASS} + $res->{XFAIL}) == 0); |
| 931 | |
| 932 | # Error if every test passed, or the ratio was too low. This |
| 933 | # generally means the simulator is not configured well. |
| 934 | $return_value = 2 if (($ref_ratio == 100) || ($ref_ratio < $ratio_thresh)); |
| 935 | $return_value = 2 if (($res_ratio == 100) || ($res_ratio < $ratio_thresh)); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 936 | |
Christophe Lyon | ad8c724 | 2016-02-03 13:04:28 +0100 | [diff] [blame] | 937 | # Error if no execution test passed. |
| 938 | # It is possible that no execution test fails, though. |
| 939 | $return_value = 2 if (($ignore_exec == 0) |
| 940 | && (($ref->{EXEC}->{PASS} == 0) |
| 941 | || ($res->{EXEC}->{PASS} == 0))); |
| 942 | |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 943 | return $return_value; |
| 944 | } |