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 | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 262 | return \%empty_result; |
| 263 | } |
| 264 | sub I_am_interactive { |
| 265 | return -t STDIN && -t STDOUT; |
| 266 | } |
| 267 | sub usage() |
| 268 | { |
| 269 | print "Usage : $app <ref_file.sum> <result_file.sum>\n"; |
| 270 | exit 1; |
| 271 | } |
| 272 | |
| 273 | |
| 274 | ###################################################### |
| 275 | # PARSING |
| 276 | sub read_sum($) |
| 277 | { |
| 278 | my ($sum_file) = @_; |
| 279 | my $res = empty_result(); |
| 280 | my %testcases; |
| 281 | my %unsupported; |
| 282 | $res->{testcases} = \%testcases; |
| 283 | my $pending_timeout=0; |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 284 | my $current_exp=""; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 285 | |
Christophe Lyon | ad8c724 | 2016-02-03 13:04:28 +0100 | [diff] [blame] | 286 | $res->{EXEC}->{PASS} = 0; |
| 287 | $res->{EXEC}->{FAIL} = 0; |
| 288 | |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 289 | open SUMFILE, $sum_file or die $!; |
| 290 | while (<SUMFILE>) |
| 291 | { |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 292 | if (m/^(PASS|XPASS|FAIL|XFAIL|UNSUPPORTED|UNTESTED|UNRESOLVED|ERROR): *(.*)/) |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 293 | { |
| 294 | my ($diag,$tc) = ($1,$2); |
| 295 | my %tcresult; |
| 296 | $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./; |
| 297 | $testcases{$tc} = empty_result() if (not exists $testcases{$tc}); |
| 298 | $testcases{$tc}->{$diag}++; |
| 299 | $testcases{$tc}->{HAS_TIMED_OUT} = $pending_timeout; |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 300 | $testcases{$tc}->{EXP} = $current_exp; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 301 | $pending_timeout = 0; |
| 302 | $res->{$diag}++; |
Christophe Lyon | ad8c724 | 2016-02-03 13:04:28 +0100 | [diff] [blame] | 303 | # Count execution tests, for a sanity check |
| 304 | if ($tc =~ /execution/) |
| 305 | { |
| 306 | $res->{EXEC}->{$diag}++; |
| 307 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 308 | } |
| 309 | elsif (m/WARNING: program timed out/) |
| 310 | { |
| 311 | $pending_timeout = 1; |
| 312 | } |
| 313 | elsif (m/^(# of expected passes|# of unexpected failures|# of expected failures|# of known failures|# of unsupported tests|# of untested testcases)\s+(.*)/) |
| 314 | { |
| 315 | $res->{"summary - "."$1"} = $2; |
| 316 | } |
| 317 | elsif (m/^\/.*\/([^\/]+)\s+version\s+(.*)/) |
| 318 | { |
| 319 | $res->{tool} = $1; |
| 320 | $res->{version} = $2; |
| 321 | $res->{version} =~ s/ [-(].*//; |
| 322 | } |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 323 | elsif (m/^Running target .*/) |
| 324 | { |
| 325 | } |
| 326 | elsif (m/^Running (.*) \.\.\.*/) |
| 327 | { |
| 328 | $current_exp=$1; |
| 329 | $current_exp =~ s|.*/testsuite/||; |
| 330 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 331 | } |
| 332 | close SUMFILE; |
| 333 | return $res; |
| 334 | } |
| 335 | |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 336 | # Parse list of unstable/hw-dependent tests |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 337 | sub read_unstable($) |
| 338 | { |
| 339 | my ($unstable_file) = @_; |
| 340 | my @unstable_tests = (); |
| 341 | |
| 342 | open UNSTABLEFILE, $unstable_file or die $!; |
| 343 | while (<UNSTABLEFILE>) |
| 344 | { |
| 345 | # Skip lines starting with '#', or with spaces only |
| 346 | if ((/^#/) || (/^[ ]*$/)) |
| 347 | { |
| 348 | } |
| 349 | else |
| 350 | { |
| 351 | chomp; |
| 352 | |
| 353 | my $test = $_; |
| 354 | |
| 355 | # Check if line is of type: target:testname |
Christophe Lyon | 5e7241c | 2015-12-04 12:57:27 +0100 | [diff] [blame] | 356 | if (/^(.*?):/) |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 357 | { |
| 358 | foreach my $unstable_marker (@unstable_markers) |
| 359 | { |
| 360 | if ($unstable_marker eq $1) { |
| 361 | # If target matches the one supplied as script |
| 362 | # argument, add the testname to the list |
Christophe Lyon | 5e7241c | 2015-12-04 12:57:27 +0100 | [diff] [blame] | 363 | $test =~ s/.*?://; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 364 | push @unstable_tests, $test; |
| 365 | } |
| 366 | } |
| 367 | } else { |
| 368 | push @unstable_tests, $test; |
| 369 | } |
| 370 | } |
| 371 | } |
| 372 | close UNSTABLEFILE; |
| 373 | return @unstable_tests; |
| 374 | } |
| 375 | |
| 376 | ###################################################### |
| 377 | # DIFFING |
| 378 | sub handle_pass_fail($$$$) |
| 379 | { |
| 380 | my ($ref, $res, $diag_diag, $tc) = @_; |
| 381 | if ($res->{testcases}->{$tc}->{HAS_TIMED_OUT}) |
| 382 | { |
| 383 | push @{$res->{$PASSED_NOW_TIMEOUTS}}, $tc; |
| 384 | } |
| 385 | else |
| 386 | { |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 387 | # This transition is flagged as hw-dependent if: |
| 388 | # - the name is in the list |
| 389 | # - the transition should not be reported (but be flagged as hw-dependent instead) |
| 390 | # - --no-hwdep was not provided |
| 391 | if ((grep { (index $tc,$_)!=-1} @hwdep_list) |
| 392 | && ($diag_diag->{report_hwdep} eq "false") |
| 393 | && ($no_hwdep == 0)) { |
| 394 | push @{$res->{$HWDEP_CASES}}, $tc; |
| 395 | } else { |
| 396 | push @{$res->{$PASS_FAIL}}, $tc; |
| 397 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 398 | } |
| 399 | } |
| 400 | |
| 401 | sub compare_results($$) |
| 402 | { |
| 403 | my ($ref, $res) = @_; |
| 404 | |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 405 | @{$res->{$PASS_PASS}} = (); |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 406 | @{$res->{$PASS_XPASS}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 407 | @{$res->{$PASS_FAIL}} = (); |
| 408 | @{$res->{$PASS_XFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 409 | @{$res->{$PASS_UNSUPPORTED}} = (); |
| 410 | @{$res->{$PASS_UNTESTED}} = (); |
| 411 | @{$res->{$PASS_UNRESOLVED}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 412 | @{$res->{$PASS_DISAPPEARS}} = (); |
| 413 | @{$res->{$PASS_APPEARS}} = (); |
| 414 | @{$res->{$PASSED_NOW_TIMEOUTS}} = (); |
| 415 | |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 416 | @{$res->{$XPASS_PASS}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 417 | @{$res->{$XPASS_XPASS}} = (); |
| 418 | @{$res->{$XPASS_FAIL}} = (); |
| 419 | @{$res->{$XPASS_XFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 420 | @{$res->{$XPASS_UNSUPPORTED}} = (); |
| 421 | @{$res->{$XPASS_UNTESTED}} = (); |
| 422 | @{$res->{$XPASS_UNRESOLVED}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 423 | @{$res->{$XPASS_DISAPPEARS}} = (); |
| 424 | @{$res->{$XPASS_APPEARS}} = (); |
| 425 | |
| 426 | @{$res->{$FAIL_PASS}} = (); |
| 427 | @{$res->{$FAIL_XPASS}} = (); |
| 428 | @{$res->{$FAIL_FAIL}} = (); |
| 429 | @{$res->{$FAIL_XFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 430 | @{$res->{$FAIL_UNSUPPORTED}} = (); |
| 431 | @{$res->{$FAIL_UNTESTED}} = (); |
| 432 | @{$res->{$FAIL_UNRESOLVED}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 433 | @{$res->{$FAIL_DISAPPEARS}} = (); |
| 434 | @{$res->{$FAIL_APPEARS}} = (); |
| 435 | |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 436 | @{$res->{$XFAIL_PASS}} = (); |
| 437 | @{$res->{$XFAIL_XPASS}} = (); |
| 438 | @{$res->{$XFAIL_FAIL}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 439 | @{$res->{$XFAIL_XFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 440 | @{$res->{$XFAIL_UNSUPPORTED}} = (); |
| 441 | @{$res->{$XFAIL_UNTESTED}} = (); |
| 442 | @{$res->{$XFAIL_UNRESOLVED}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 443 | @{$res->{$XFAIL_DISAPPEARS}} = (); |
| 444 | @{$res->{$XFAIL_APPEARS}} = (); |
| 445 | |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 446 | @{$res->{$UNSUPPORTED_PASS}} = (); |
| 447 | @{$res->{$UNSUPPORTED_XPASS}} = (); |
| 448 | @{$res->{$UNSUPPORTED_FAIL}} = (); |
| 449 | @{$res->{$UNSUPPORTED_XFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 450 | @{$res->{$UNSUPPORTED_UNSUPPORTED}} = (); |
| 451 | @{$res->{$UNSUPPORTED_UNTESTED}} = (); |
| 452 | @{$res->{$UNSUPPORTED_UNRESOLVED}} = (); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 453 | @{$res->{$UNSUPPORTED_DISAPPEARS}} = (); |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 454 | @{$res->{$UNSUPPORTED_APPEARS}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 455 | |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 456 | @{$res->{$UNTESTED_PASS}} = (); |
| 457 | @{$res->{$UNTESTED_XPASS}} = (); |
| 458 | @{$res->{$UNTESTED_FAIL}} = (); |
| 459 | @{$res->{$UNTESTED_XFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 460 | @{$res->{$UNTESTED_UNSUPPORTED}} = (); |
| 461 | @{$res->{$UNTESTED_UNTESTED}} = (); |
| 462 | @{$res->{$UNTESTED_UNRESOLVED}} = (); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 463 | @{$res->{$UNTESTED_DISAPPEARS}} = (); |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 464 | @{$res->{$UNTESTED_APPEARS}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 465 | |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 466 | @{$res->{$UNRESOLVED_PASS}} = (); |
| 467 | @{$res->{$UNRESOLVED_XPASS}} = (); |
| 468 | @{$res->{$UNRESOLVED_FAIL}} = (); |
| 469 | @{$res->{$UNRESOLVED_XFAIL}} = (); |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 470 | @{$res->{$UNRESOLVED_UNSUPPORTED}} = (); |
| 471 | @{$res->{$UNRESOLVED_UNTESTED}} = (); |
| 472 | @{$res->{$UNRESOLVED_UNRESOLVED}} = (); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 473 | @{$res->{$UNRESOLVED_DISAPPEARS}} = (); |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 474 | @{$res->{$UNRESOLVED_APPEARS}} = (); |
Christophe Lyon | fdfbd17 | 2016-06-28 18:38:55 +0200 | [diff] [blame] | 475 | |
Christophe Lyon | bcbd748 | 2016-09-19 14:54:50 +0200 | [diff] [blame] | 476 | @{$res->{$ERROR_DISAPPEARS}} = (); |
| 477 | @{$res->{$ERROR_APPEARS}} = (); |
| 478 | |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 479 | @{$res->{$UNHANDLED_CASES}} = (); |
| 480 | @{$res->{$UNSTABLE_CASES}} = (); |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 481 | @{$res->{$HWDEP_CASES}} = (); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 482 | |
| 483 | #### MERGE REF AND RES |
| 484 | foreach my $key (sort (keys %{$res->{testcases}})) |
| 485 | { |
| 486 | if (not exists $ref->{testcases}->{$key}) { |
| 487 | $ref->{testcases}->{$key} = empty_result(); |
| 488 | $ref->{testcases}->{$key}->{NO_EXIST} = 1; |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 489 | $ref->{testcases}->{$key}->{EXP} = $res->{testcases}->{$key}->{EXP}; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 490 | } |
| 491 | } |
| 492 | foreach my $key (keys %{$ref->{testcases}}) |
| 493 | { |
| 494 | if (not exists $res->{testcases}->{$key}) |
| 495 | { |
| 496 | $res->{testcases}->{$key} = empty_result(); |
| 497 | $res->{testcases}->{$key}->{NO_EXIST} = 1; |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 498 | $res->{testcases}->{$key}->{EXP} = $ref->{testcases}->{$key}->{EXP}; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 499 | } |
| 500 | } |
| 501 | |
| 502 | #### ACTIONS FOR EACH CASES |
| 503 | my %unstable_found; |
| 504 | |
| 505 | foreach my $key (sort (keys %{$ref->{testcases}})) |
| 506 | { |
| 507 | foreach my $diag_diag (@handler_list) |
| 508 | { |
| 509 | if ($ref->{testcases}->{$key}->{$diag_diag->{was}} != $res->{testcases}->{$key}->{$diag_diag->{was}} |
| 510 | and $res->{testcases}->{$key}->{$diag_diag->{is}}) |
| 511 | { |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 512 | print "$key ref was:$ref->{testcases}->{$key}->{$diag_diag->{was}}, res was:$res->{testcases}->{$key}->{$diag_diag->{was}}, res is:$res->{testcases}->{$key}->{$diag_diag->{is}} \n" if ($debug); |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 513 | # If testcase is listed as 'unstable' mark it as such |
| 514 | # and skip other processing to avoid listing it twice. |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 515 | { |
| 516 | if (grep { (index $key,$_)!=-1} @unstablelist) |
| 517 | { |
| 518 | print "[unstable] $key\n" if ($debug); |
| 519 | $unstable_found{$key}=1; |
| 520 | } |
| 521 | else { |
| 522 | print "[$diag_diag->{was} => $diag_diag->{is}] $key\n" if ($debug); |
| 523 | if ($diag_diag->{handler}) |
| 524 | { |
| 525 | $diag_diag->{handler} ($ref, $res, $diag_diag, $key); |
| 526 | } |
| 527 | else |
| 528 | { |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 529 | # This transition is flagged as hw-dependent if: |
| 530 | # - the name is in the list |
| 531 | # - the transition should not be reported (but be flagged as hw-dependent instead) |
| 532 | # - --no-hwdep was not provided |
| 533 | if ((grep { (index $key,$_)!=-1} @hwdep_list) |
| 534 | && ($diag_diag->{report_hwdep} eq "false") |
| 535 | && ($no_hwdep == 0)) { |
| 536 | push @{$res->{$HWDEP_CASES}}, $key; |
| 537 | } else { |
| 538 | push @{$res->{$diag_diag->{cat}}}, $key; |
| 539 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 540 | } |
| 541 | } |
| 542 | } |
| 543 | } |
| 544 | } |
| 545 | } |
| 546 | push @{$res->{$UNSTABLE_CASES}}, (sort (keys (%unstable_found))) if ($nounstable == 0); |
| 547 | |
| 548 | } |
| 549 | |
| 550 | ###################################################### |
| 551 | # PRINTING |
| 552 | sub print_tclist($@) |
| 553 | { |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 554 | # 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] | 555 | # associated with the testcase. |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 556 | my ($this_res, $cat, @tclist) = @_; |
| 557 | my $this_exp = ""; |
| 558 | if (scalar(@tclist)) |
| 559 | { |
| 560 | print " - ".$cat.":\n\n"; |
| 561 | foreach my $case (@tclist) |
| 562 | { |
| 563 | if ($this_exp ne $this_res->{testcases}->{$case}->{EXP}) { |
| 564 | $this_exp = $this_res->{testcases}->{$case}->{EXP}; |
| 565 | print " Executed from: $this_exp\n"; |
| 566 | } |
| 567 | print " $case\n"; |
| 568 | } |
| 569 | print "\n\n"; |
| 570 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 571 | } |
| 572 | |
| 573 | sub print_compare_results_summary($$) |
| 574 | { |
| 575 | my ($ref, $res) = @_; |
| 576 | my $return_value=0; |
Christophe Lyon | f5aeb34 | 2015-12-08 14:47:16 +0100 | [diff] [blame] | 577 | my $total_better = 0; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 578 | my $rtotal = 0; |
| 579 | my $quiet_reg = $quiet; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 580 | my $ref_ratio = 0; |
Christophe Lyon | 0ab7d35 | 2016-04-06 10:39:58 +0200 | [diff] [blame] | 581 | my $ref_total = 0; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 582 | my $res_ratio = 0; |
Christophe Lyon | 0ab7d35 | 2016-04-06 10:39:58 +0200 | [diff] [blame] | 583 | my $res_total = 0; |
Christophe Lyon | ad8c724 | 2016-02-03 13:04:28 +0100 | [diff] [blame] | 584 | my $ignore_exec = 0; |
| 585 | my $ref_has_exec_tests = 0; |
| 586 | my $res_has_exec_tests = 0; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 587 | |
| 588 | # Compute the pass ratio as a sanity check |
Christophe Lyon | 0ab7d35 | 2016-04-06 10:39:58 +0200 | [diff] [blame] | 589 | $ref_total = $ref->{PASS} + |
| 590 | $ref->{XFAIL} + |
| 591 | $ref->{XPASS} + |
| 592 | $ref->{FAIL} + |
| 593 | $ref->{UNRESOLVED} + |
| 594 | $ref->{UNSUPPORTED} + |
| 595 | $ref->{UNTESTED}; |
| 596 | |
| 597 | # It is possible that no test is executed at all (for instance if |
| 598 | # RUNTESTFLAGS was too restrictive). Avoid division by 0. |
| 599 | if ($ref_total > 0) { |
| 600 | $ref_ratio = ($ref->{PASS} + $ref->{XFAIL}) / |
| 601 | $ref_total; |
| 602 | } |
| 603 | |
| 604 | $res_total = $res->{PASS} + |
| 605 | $res->{XFAIL} + |
| 606 | $res->{XPASS} + |
| 607 | $res->{FAIL} + |
| 608 | $res->{UNRESOLVED} + |
| 609 | $res->{UNSUPPORTED} + |
| 610 | $res->{UNTESTED}; |
| 611 | |
| 612 | if ($res_total > 0) { |
| 613 | $res_ratio = ($res->{PASS} + $res->{XFAIL}) / |
| 614 | $res_total; |
| 615 | } |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 616 | |
| 617 | if (not $quiet) |
| 618 | { |
| 619 | printf "Comparing:\n"; |
| 620 | printf "REFERENCE:$ref_file_name\n"; |
| 621 | printf "CURRENT: $res_file_name\n\n"; |
| 622 | } |
| 623 | |
| 624 | #### TESTS STATUS |
| 625 | if (not $quiet and not $short) |
| 626 | { |
| 627 | printf " ` +---------+---------+\n"; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 628 | printf "o RUN STATUS: | REF | RES |\n"; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 629 | printf " +------------------------------------------+---------+---------+\n"; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 630 | printf " | %-40s | %7d | %7d |\n", "Passes [PASS]", $ref->{PASS}, $res->{PASS}; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 631 | printf " | %-40s | %7d | %7d |\n", "Unexpected fails [FAIL]", $ref->{FAIL}, $res->{FAIL}; |
Christophe Lyon | bcbd748 | 2016-09-19 14:54:50 +0200 | [diff] [blame] | 632 | printf " | %-40s | %7d | %7d |\n", "Errors [ERROR]", $ref->{ERROR}, $res->{ERROR}; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 633 | printf " | %-40s | %7d | %7d |\n", "Unexpected passes [XPASS]", $ref->{XPASS}, $res->{XPASS}; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 634 | printf " | %-40s | %7d | %7d |\n", "Expected fails [XFAIL]", $ref->{XFAIL}, $res->{XFAIL}; |
| 635 | printf " | %-40s | %7d | %7d |\n", "Unresolved [UNRESOLVED]", $ref->{UNRESOLVED}, $res->{UNRESOLVED}; |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 636 | printf " | %-40s | %7d | %7d |\n", "Unsupported [UNSUPPORTED]", $ref->{UNSUPPORTED}, $res->{UNSUPPORTED}; |
| 637 | printf " | %-40s | %7d | %7d |\n", "Untested [UNTESTED]", $ref->{UNTESTED}, $res->{UNTESTED}; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 638 | printf " +------------------------------------------+---------+---------+\n"; |
| 639 | printf "\n"; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 640 | |
Christophe Lyon | 3d195c2 | 2016-04-06 16:00:25 +0200 | [diff] [blame] | 641 | printf " REF PASS ratio: %f\n", $ref_ratio; |
| 642 | printf " RES PASS ratio: %f\n", $res_ratio; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 643 | if ($ref_ratio < $ratio_thresh) |
| 644 | { |
Christophe Lyon | 1176f96 | 2016-03-03 18:01:10 +0100 | [diff] [blame] | 645 | printf " ***** ERROR: REF PASS ratio is abnormally low *****\n"; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 646 | } |
| 647 | if ($res_ratio < $ratio_thresh) |
| 648 | { |
Christophe Lyon | 1176f96 | 2016-03-03 18:01:10 +0100 | [diff] [blame] | 649 | printf " ***** ERROR: RES PASS ratio is abnormally low *****\n"; |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 650 | } |
| 651 | |
Christophe Lyon | ad8c724 | 2016-02-03 13:04:28 +0100 | [diff] [blame] | 652 | # If both PASS and FAIL EXEC tests are zero, assume there is no |
| 653 | # execution test for this tool, and do not warn. |
| 654 | $ref_has_exec_tests = ($ref->{EXEC}->{PASS} + $ref->{EXEC}->{FAIL}) != 0; |
| 655 | if ($ref_has_exec_tests) |
| 656 | { |
| 657 | printf " ***** ERROR: No REF execution test PASSed. Check execution engine configuration. *****\n" if ($ref->{EXEC}->{PASS} == 0); |
| 658 | printf " ***** WARNING: No REF execution test FAILed. Check execution engine configuration. *****\n" if ($ref->{EXEC}->{FAIL} == 0); |
| 659 | } |
| 660 | |
| 661 | $res_has_exec_tests = ($res->{EXEC}->{PASS} + $res->{EXEC}->{FAIL}) != 0; |
| 662 | if ($res_has_exec_tests) |
| 663 | { |
| 664 | printf " ***** ERROR: No RES execution test PASSed. Check execution engine configuration. *****\n" if ($res->{EXEC}->{PASS} == 0); |
| 665 | printf " ***** WARNING: No RES execution test FAILed. Check execution engine configuration. *****\n" if ($res->{EXEC}->{FAIL} == 0); |
| 666 | } |
| 667 | |
| 668 | # Ignore number of execution tests when computing the return |
| 669 | # value, if both REF and RES have no execution test. |
| 670 | $ignore_exec = !$ref_has_exec_tests && !$res_has_exec_tests; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 671 | } |
| 672 | |
| 673 | #### REGRESSIONS ? |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 674 | $rtotal = scalar(@{$res->{$PASS_XPASS}}) |
| 675 | +scalar(@{$res->{$PASS_FAIL}}) |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 676 | +scalar(@{$res->{$PASS_UNRESOLVED}}) |
| 677 | +scalar(@{$res->{$PASSED_NOW_TIMEOUTS}}) |
Christophe Lyon | 3003783 | 2018-11-30 15:33:20 +0000 | [diff] [blame] | 678 | +scalar(@{$res->{$ERROR_APPEARS}}) |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 679 | +scalar(@{$res->{$XPASS_FAIL}}) |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 680 | +scalar(@{$res->{$XPASS_APPEARS}}) |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 681 | +scalar(@{$res->{$XPASS_UNRESOLVED}}) |
| 682 | +scalar(@{$res->{$FAIL_APPEARS}}) |
| 683 | +scalar(@{$res->{$FAIL_UNRESOLVED}}) |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 684 | +scalar(@{$res->{$XFAIL_FAIL}}) |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 685 | +scalar(@{$res->{$XFAIL_UNRESOLVED}}) |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 686 | +scalar(@{$res->{$UNSUPPORTED_FAIL}}) |
| 687 | +scalar(@{$res->{$UNSUPPORTED_XPASS}}) |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 688 | +scalar(@{$res->{$UNSUPPORTED_UNRESOLVED}}) |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 689 | +scalar(@{$res->{$UNTESTED_FAIL}}) |
| 690 | +scalar(@{$res->{$UNTESTED_XPASS}}) |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 691 | +scalar(@{$res->{$UNTESTED_UNRESOLVED}}) |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 692 | +scalar(@{$res->{$UNRESOLVED_FAIL}}) |
| 693 | +scalar(@{$res->{$UNRESOLVED_XPASS}}) |
Christophe Lyon | 3003783 | 2018-11-30 15:33:20 +0000 | [diff] [blame] | 694 | +scalar(@{$res->{$UNRESOLVED_APPEARS}}); |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 695 | |
| 696 | $quiet_reg=1 if ($short and not $rtotal); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 697 | |
| 698 | if (not $quiet_reg) |
| 699 | { |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 700 | printf "\n$col_red"."o REGRESSIONS:\n"; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 701 | printf " +------------------------------------------+---------+\n"; |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 702 | 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] | 703 | 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] | 704 | printf " | %-40s | %7d |\n", $PASS_UNRESOLVED, scalar(@{$res->{$PASS_UNRESOLVED}}) if (scalar(@{$res->{$PASS_UNRESOLVED}})); |
| 705 | 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] | 706 | 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] | 707 | printf " | %-40s | %7d |\n", $XPASS_FAIL, scalar(@{$res->{$XPASS_FAIL}}) if (scalar(@{$res->{$XPASS_FAIL}})); |
| 708 | printf " | %-40s | %7d |\n", $XPASS_APPEARS, scalar(@{$res->{$XPASS_APPEARS}}) if (scalar(@{$res->{$XPASS_APPEARS}})); |
| 709 | printf " | %-40s | %7d |\n", $XPASS_UNRESOLVED, scalar(@{$res->{$XPASS_UNRESOLVED}}) if (scalar(@{$res->{$XPASS_UNRESOLVED}})); |
| 710 | printf " | %-40s | %7d |\n", $FAIL_APPEARS, scalar(@{$res->{$FAIL_APPEARS}}) if (scalar(@{$res->{$FAIL_APPEARS}})); |
| 711 | 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] | 712 | 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] | 713 | 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] | 714 | printf " | %-40s | %7d |\n", $UNSUPPORTED_FAIL, scalar(@{$res->{$UNSUPPORTED_FAIL}}) if (scalar(@{$res->{$UNSUPPORTED_FAIL}})); |
| 715 | 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] | 716 | 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] | 717 | printf " | %-40s | %7d |\n", $UNTESTED_FAIL, scalar(@{$res->{$UNTESTED_FAIL}}) if (scalar(@{$res->{$UNTESTED_FAIL}})); |
| 718 | 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] | 719 | 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] | 720 | printf " | %-40s | %7d |\n", $UNRESOLVED_FAIL, scalar(@{$res->{$UNRESOLVED_FAIL}}) if (scalar(@{$res->{$UNRESOLVED_FAIL}})); |
| 721 | 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] | 722 | 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] | 723 | printf " +------------------------------------------+---------+\n"; |
| 724 | printf " | %-40s | %7d |\n", "TOTAL_REGRESSIONS", $rtotal; |
| 725 | printf " +------------------------------------------+---------+\n"; |
| 726 | printf "\n"; |
| 727 | |
| 728 | if ($long) |
| 729 | { |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 730 | print_tclist($res, $PASS_XPASS, @{$res->{$PASS_XPASS}}); |
| 731 | print_tclist($res, $PASS_FAIL, @{$res->{$PASS_FAIL}}); |
| 732 | print_tclist($res, $PASS_UNRESOLVED, @{$res->{$PASS_UNRESOLVED}}); |
| 733 | print_tclist($res, $PASSED_NOW_TIMEOUTS, @{$res->{$PASSED_NOW_TIMEOUTS}}); |
| 734 | print_tclist($res, $ERROR_APPEARS, @{$res->{$ERROR_APPEARS}}); |
| 735 | print_tclist($res, $XPASS_FAIL, @{$res->{$XPASS_FAIL}}); |
| 736 | print_tclist($res, $XPASS_APPEARS, @{$res->{$XPASS_APPEARS}}); |
| 737 | print_tclist($res, $XPASS_UNRESOLVED, @{$res->{$XPASS_UNRESOLVED}}); |
| 738 | print_tclist($res, $FAIL_APPEARS, @{$res->{$FAIL_APPEARS}}); |
| 739 | print_tclist($res, $FAIL_UNRESOLVED, @{$res->{$FAIL_UNRESOLVED}}); |
| 740 | print_tclist($res, $XFAIL_FAIL, @{$res->{$XFAIL_FAIL}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 741 | print_tclist($res, $XFAIL_UNRESOLVED, @{$res->{$XFAIL_UNRESOLVED}}); |
| 742 | print_tclist($res, $UNSUPPORTED_FAIL, @{$res->{$UNSUPPORTED_FAIL}}); |
| 743 | print_tclist($res, $UNSUPPORTED_XPASS, @{$res->{$UNSUPPORTED_XPASS}}); |
| 744 | print_tclist($res, $UNSUPPORTED_UNRESOLVED, @{$res->{$UNSUPPORTED_UNRESOLVED}}); |
| 745 | print_tclist($res, $UNTESTED_FAIL, @{$res->{$UNTESTED_FAIL}}); |
| 746 | print_tclist($res, $UNTESTED_XPASS, @{$res->{$UNTESTED_XPASS}}); |
| 747 | print_tclist($res, $UNTESTED_UNRESOLVED, @{$res->{$UNTESTED_UNRESOLVED}}); |
| 748 | print_tclist($res, $UNRESOLVED_FAIL, @{$res->{$UNRESOLVED_FAIL}}); |
| 749 | print_tclist($res, $UNRESOLVED_XPASS, @{$res->{$UNRESOLVED_XPASS}}); |
| 750 | print_tclist($res, $UNRESOLVED_APPEARS, @{$res->{$UNRESOLVED_APPEARS}}); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 751 | } |
| 752 | printf "$col_reset\n"; |
| 753 | } |
| 754 | |
Christophe Lyon | 924cce4 | 2018-11-30 15:38:19 +0000 | [diff] [blame] | 755 | #### IMPROVEMENTS TO BE CHECKED ? |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 756 | if (not $quiet and not $short) |
| 757 | { |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 758 | $total_better = |
Christophe Lyon | 31279df | 2016-07-04 17:02:12 +0200 | [diff] [blame] | 759 | scalar(@{$res->{$PASS_DISAPPEARS}})+ |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 760 | scalar(@{$res->{$PASS_XFAIL}})+ |
| 761 | scalar(@{$res->{$PASS_APPEARS}})+ |
| 762 | scalar(@{$res->{$PASS_UNSUPPORTED}})+ |
| 763 | scalar(@{$res->{$PASS_UNTESTED}})+ |
| 764 | scalar(@{$res->{$XPASS_PASS}})+ |
| 765 | scalar(@{$res->{$XPASS_XFAIL}})+ |
| 766 | scalar(@{$res->{$XPASS_UNSUPPORTED}})+ |
| 767 | scalar(@{$res->{$XPASS_UNTESTED}})+ |
| 768 | scalar(@{$res->{$XPASS_DISAPPEARS}})+ |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 769 | scalar(@{$res->{$FAIL_PASS}})+ |
| 770 | scalar(@{$res->{$FAIL_XPASS}})+ |
Christophe Lyon | dded4d8 | 2016-06-28 18:12:38 +0200 | [diff] [blame] | 771 | scalar(@{$res->{$FAIL_XFAIL}})+ |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 772 | scalar(@{$res->{$FAIL_UNSUPPORTED}})+ |
| 773 | scalar(@{$res->{$FAIL_UNTESTED}})+ |
| 774 | scalar(@{$res->{$FAIL_DISAPPEARS}})+ |
Christophe Lyon | 3b675e8 | 2018-11-30 15:24:32 +0000 | [diff] [blame] | 775 | scalar(@{$res->{$XFAIL_DISAPPEARS}})+ |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 776 | scalar(@{$res->{$XFAIL_PASS}})+ |
| 777 | scalar(@{$res->{$XFAIL_XPASS}})+ |
| 778 | scalar(@{$res->{$XFAIL_UNSUPPORTED}})+ |
| 779 | scalar(@{$res->{$XFAIL_UNTESTED}})+ |
| 780 | scalar(@{$res->{$XFAIL_APPEARS}})+ |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 781 | scalar(@{$res->{$UNSUPPORTED_PASS}})+ |
| 782 | scalar(@{$res->{$UNSUPPORTED_XFAIL}})+ |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 783 | scalar(@{$res->{$UNSUPPORTED_UNTESTED}})+ |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 784 | scalar(@{$res->{$UNSUPPORTED_DISAPPEARS}})+ |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 785 | scalar(@{$res->{$UNSUPPORTED_APPEARS}})+ |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 786 | scalar(@{$res->{$UNTESTED_PASS}})+ |
| 787 | scalar(@{$res->{$UNTESTED_XFAIL}})+ |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 788 | scalar(@{$res->{$UNTESTED_UNSUPPORTED}})+ |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 789 | scalar(@{$res->{$UNTESTED_DISAPPEARS}})+ |
Christophe Lyon | dc66fc5 | 2016-04-05 17:38:07 +0200 | [diff] [blame] | 790 | scalar(@{$res->{$UNTESTED_APPEARS}})+ |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 791 | scalar(@{$res->{$UNRESOLVED_PASS}})+ |
| 792 | scalar(@{$res->{$UNRESOLVED_XFAIL}})+ |
Christophe Lyon | 9dde333 | 2016-06-28 23:00:00 +0200 | [diff] [blame] | 793 | scalar(@{$res->{$UNRESOLVED_UNSUPPORTED}})+ |
| 794 | scalar(@{$res->{$UNRESOLVED_UNTESTED}})+ |
Christophe Lyon | a140aa8 | 2015-12-17 22:53:03 +0100 | [diff] [blame] | 795 | scalar(@{$res->{$UNRESOLVED_DISAPPEARS}})+ |
Christophe Lyon | bcbd748 | 2016-09-19 14:54:50 +0200 | [diff] [blame] | 796 | scalar(@{$res->{$ERROR_DISAPPEARS}})+ |
Christophe Lyon | f5aeb34 | 2015-12-08 14:47:16 +0100 | [diff] [blame] | 797 | scalar(@{$res->{$UNHANDLED_CASES}}); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 798 | |
Christophe Lyon | 924cce4 | 2018-11-30 15:38:19 +0000 | [diff] [blame] | 799 | printf "$col_pink"."o IMPROVEMENTS TO BE CHECKED:\n"; |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 800 | printf " +------------------------------------------+---------+\n"; |
Christophe Lyon | 31279df | 2016-07-04 17:02:12 +0200 | [diff] [blame] | 801 | 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] | 802 | 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] | 803 | printf " | %-40s | %7d |\n", $PASS_APPEARS, scalar(@{$res->{$PASS_APPEARS}}) if (scalar(@{$res->{$PASS_APPEARS}})); |
| 804 | printf " | %-40s | %7d |\n", $PASS_UNSUPPORTED, scalar(@{$res->{$PASS_UNSUPPORTED}}) if (scalar(@{$res->{$PASS_UNSUPPORTED}})); |
| 805 | 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] | 806 | 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] | 807 | printf " | %-40s | %7d |\n", $XPASS_XFAIL, scalar(@{$res->{$XPASS_XFAIL}}) if (scalar(@{$res->{$XPASS_XFAIL}})); |
| 808 | printf " | %-40s | %7d |\n", $XPASS_UNSUPPORTED, scalar(@{$res->{$XPASS_UNSUPPORTED}}) if (scalar(@{$res->{$XPASS_UNSUPPORTED}})); |
| 809 | printf " | %-40s | %7d |\n", $XPASS_UNTESTED, scalar(@{$res->{$XPASS_UNTESTED}}) if (scalar(@{$res->{$XPASS_UNTESTED}})); |
| 810 | 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] | 811 | printf " | %-40s | %7d |\n", $FAIL_PASS, scalar(@{$res->{$FAIL_PASS}}) if (scalar(@{$res->{$FAIL_PASS}})); |
| 812 | 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] | 813 | printf " | %-40s | %7d |\n", $FAIL_XFAIL, scalar(@{$res->{$FAIL_XFAIL}}) if (scalar(@{$res->{$FAIL_XFAIL}})); |
| 814 | printf " | %-40s | %7d |\n", $FAIL_UNSUPPORTED, scalar(@{$res->{$FAIL_UNSUPPORTED}}) if (scalar(@{$res->{$FAIL_UNSUPPORTED}})); |
| 815 | printf " | %-40s | %7d |\n", $FAIL_UNTESTED, scalar(@{$res->{$FAIL_UNTESTED}}) if (scalar(@{$res->{$FAIL_UNTESTED}})); |
| 816 | 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] | 817 | 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] | 818 | printf " | %-40s | %7d |\n", $XFAIL_PASS, scalar(@{$res->{$XFAIL_PASS}}) if (scalar(@{$res->{$XFAIL_PASS}})); |
| 819 | printf " | %-40s | %7d |\n", $XFAIL_XPASS, scalar(@{$res->{$XFAIL_XPASS}}) if (scalar(@{$res->{$XFAIL_XPASS}})); |
| 820 | printf " | %-40s | %7d |\n", $XFAIL_UNSUPPORTED, scalar(@{$res->{$XFAIL_UNSUPPORTED}}) if (scalar(@{$res->{$XFAIL_UNSUPPORTED}})); |
| 821 | printf " | %-40s | %7d |\n", $XFAIL_UNTESTED, scalar(@{$res->{$XFAIL_UNTESTED}}) if (scalar(@{$res->{$XFAIL_UNTESTED}})); |
| 822 | 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] | 823 | printf " | %-40s | %7d |\n", $UNSUPPORTED_PASS, scalar(@{$res->{$UNSUPPORTED_PASS}}) if (scalar(@{$res->{$UNSUPPORTED_PASS}})); |
| 824 | 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] | 825 | 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] | 826 | 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] | 827 | 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] | 828 | printf " | %-40s | %7d |\n", $UNTESTED_PASS, scalar(@{$res->{$UNTESTED_PASS}}) if (scalar(@{$res->{$UNTESTED_PASS}})); |
| 829 | 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] | 830 | 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] | 831 | 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] | 832 | 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] | 833 | printf " | %-40s | %7d |\n", $UNRESOLVED_PASS, scalar(@{$res->{$UNRESOLVED_PASS}}) if (scalar(@{$res->{$UNRESOLVED_PASS}})); |
| 834 | 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] | 835 | printf " | %-40s | %7d |\n", $UNRESOLVED_UNSUPPORTED, scalar(@{$res->{$UNRESOLVED_UNSUPPORTED}}) if (scalar(@{$res->{$UNRESOLVED_UNSUPPORTED}})); |
| 836 | 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] | 837 | 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] | 838 | 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] | 839 | printf " | %-40s | %7d |\n", $UNHANDLED_CASES, scalar(@{$res->{$UNHANDLED_CASES}}) if (scalar(@{$res->{$UNHANDLED_CASES}})); |
| 840 | 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] | 841 | 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] | 842 | printf " +------------------------------------------+---------+\n"; |
Christophe Lyon | 924cce4 | 2018-11-30 15:38:19 +0000 | [diff] [blame] | 843 | 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] | 844 | printf " +------------------------------------------+---------+\n"; |
| 845 | printf "\n"; |
| 846 | |
| 847 | if ($long) |
| 848 | { |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 849 | print_tclist($res, $PASS_DISAPPEARS, @{$res->{$PASS_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 850 | print_tclist($res, $PASS_XFAIL, @{$res->{$PASS_XFAIL}}); |
| 851 | print_tclist($res, $PASS_APPEARS, @{$res->{$PASS_APPEARS}}); |
| 852 | print_tclist($res, $PASS_UNSUPPORTED, @{$res->{$PASS_UNSUPPORTED}}); |
| 853 | print_tclist($res, $PASS_UNTESTED, @{$res->{$PASS_UNTESTED}}); |
| 854 | print_tclist($res, $XPASS_PASS, @{$res->{$XPASS_PASS}}); |
| 855 | print_tclist($res, $XPASS_XFAIL, @{$res->{$XPASS_XFAIL}}); |
| 856 | print_tclist($res, $XPASS_UNSUPPORTED, @{$res->{$XPASS_UNSUPPORTED}}); |
| 857 | print_tclist($res, $XPASS_UNTESTED, @{$res->{$XPASS_UNTESTED}}); |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 858 | print_tclist($res, $XPASS_DISAPPEARS, @{$res->{$XPASS_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 859 | print_tclist($res, $FAIL_PASS, @{$res->{$FAIL_PASS}}); |
| 860 | print_tclist($res, $FAIL_XPASS, @{$res->{$FAIL_XPASS}}); |
| 861 | print_tclist($res, $FAIL_XFAIL, @{$res->{$FAIL_XFAIL}}); |
| 862 | print_tclist($res, $FAIL_UNSUPPORTED, @{$res->{$FAIL_UNSUPPORTED}}); |
| 863 | print_tclist($res, $FAIL_UNTESTED, @{$res->{$FAIL_UNTESTED}}); |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 864 | print_tclist($res, $FAIL_DISAPPEARS, @{$res->{$FAIL_DISAPPEARS}}); |
Christophe Lyon | 3b675e8 | 2018-11-30 15:24:32 +0000 | [diff] [blame] | 865 | print_tclist($res, $XFAIL_DISAPPEARS, @{$res->{$XFAIL_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 866 | print_tclist($res, $XFAIL_PASS, @{$res->{$XFAIL_PASS}}); |
| 867 | print_tclist($res, $XFAIL_XPASS, @{$res->{$XFAIL_XPASS}}); |
| 868 | print_tclist($res, $XFAIL_UNSUPPORTED, @{$res->{$XFAIL_UNSUPPORTED}}); |
| 869 | print_tclist($res, $XFAIL_UNTESTED, @{$res->{$XFAIL_UNTESTED}}); |
| 870 | print_tclist($res, $XFAIL_APPEARS, @{$res->{$XFAIL_APPEARS}}); |
| 871 | print_tclist($res, $UNSUPPORTED_PASS, @{$res->{$UNSUPPORTED_PASS}}); |
| 872 | print_tclist($res, $UNSUPPORTED_XFAIL, @{$res->{$UNSUPPORTED_XFAIL}}); |
| 873 | print_tclist($res, $UNSUPPORTED_UNTESTED, @{$res->{$UNSUPPORTED_UNTESTED}}); |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 874 | print_tclist($res, $UNSUPPORTED_DISAPPEARS, @{$res->{$UNSUPPORTED_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 875 | print_tclist($res, $UNSUPPORTED_APPEARS, @{$res->{$UNSUPPORTED_APPEARS}}); |
| 876 | print_tclist($res, $UNTESTED_PASS, @{$res->{$UNTESTED_PASS}}); |
| 877 | print_tclist($res, $UNTESTED_XFAIL, @{$res->{$UNTESTED_XFAIL}}); |
| 878 | print_tclist($res, $UNTESTED_UNSUPPORTED, @{$res->{$UNTESTED_UNSUPPORTED}}); |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 879 | print_tclist($res, $UNTESTED_DISAPPEARS, @{$res->{$UNTESTED_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 880 | print_tclist($res, $UNTESTED_APPEARS, @{$res->{$UNTESTED_APPEARS}}); |
| 881 | print_tclist($res, $UNRESOLVED_PASS, @{$res->{$UNRESOLVED_PASS}}); |
| 882 | print_tclist($res, $UNRESOLVED_XFAIL, @{$res->{$UNRESOLVED_XFAIL}}); |
| 883 | print_tclist($res, $UNRESOLVED_UNSUPPORTED, @{$res->{$UNRESOLVED_UNSUPPORTED}}); |
| 884 | print_tclist($res, $UNRESOLVED_UNTESTED, @{$res->{$UNRESOLVED_UNTESTED}}); |
Christophe Lyon | 28a9278 | 2017-09-13 09:00:39 +0000 | [diff] [blame] | 885 | print_tclist($res, $UNRESOLVED_DISAPPEARS, @{$res->{$UNRESOLVED_DISAPPEARS}}); |
| 886 | print_tclist($res, $ERROR_DISAPPEARS, @{$res->{$ERROR_DISAPPEARS}}); |
Christophe Lyon | 14d1ec8 | 2017-03-23 14:59:58 +0000 | [diff] [blame] | 887 | print_tclist($res, $UNHANDLED_CASES, @{$res->{$UNHANDLED_CASES}}); |
| 888 | print_tclist($res, $UNSTABLE_CASES, @{$res->{$UNSTABLE_CASES}}); |
Christophe Lyon | 73ac1d8 | 2018-06-12 13:32:47 +0000 | [diff] [blame] | 889 | print_tclist($res, $HWDEP_CASES, @{$res->{$HWDEP_CASES}}); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 890 | } |
| 891 | printf "$col_reset\n"; |
| 892 | } |
| 893 | |
Christophe Lyon | f5aeb34 | 2015-12-08 14:47:16 +0100 | [diff] [blame] | 894 | $return_value = 1 if ($total_better); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 895 | |
| 896 | $return_value = 2 if ($rtotal); |
| 897 | |
Christophe Lyon | d618f66 | 2016-02-02 19:07:58 +0100 | [diff] [blame] | 898 | # Error if there was no PASS (eg when sth went wrong and no .sum was generated) |
| 899 | $return_value = 2 if (($res->{PASS} + $res->{XFAIL}) == 0); |
| 900 | |
| 901 | # Error if every test passed, or the ratio was too low. This |
| 902 | # generally means the simulator is not configured well. |
| 903 | $return_value = 2 if (($ref_ratio == 100) || ($ref_ratio < $ratio_thresh)); |
| 904 | $return_value = 2 if (($res_ratio == 100) || ($res_ratio < $ratio_thresh)); |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 905 | |
Christophe Lyon | ad8c724 | 2016-02-03 13:04:28 +0100 | [diff] [blame] | 906 | # Error if no execution test passed. |
| 907 | # It is possible that no execution test fails, though. |
| 908 | $return_value = 2 if (($ignore_exec == 0) |
| 909 | && (($ref->{EXEC}->{PASS} == 0) |
| 910 | || ($res->{EXEC}->{PASS} == 0))); |
| 911 | |
Christophe Lyon | bff3961 | 2015-11-18 16:29:11 +0100 | [diff] [blame] | 912 | return $return_value; |
| 913 | } |