File tree Expand file tree Collapse file tree 2 files changed +32
-6
lines changed Expand file tree Collapse file tree 2 files changed +32
-6
lines changed Original file line number Diff line number Diff line change
1
+ # !/bin/perl -n
2
+
3
+ sub analyze_errors () {
4
+ / ^(FAIL|ERROR|XPASS):\s ([^:\s ]+):?\s +(.+)/ ;
5
+
6
+ my $type = $1 ;
7
+ my $filename = $2 ;
8
+ my $message = $3 ;
9
+ my $line ;
10
+
11
+ if ( !$type ) { return ; }
12
+
13
+ if ( $message =~ / (at line (\d +))?.+(test for \w +, line (\d +))/g ) {
14
+ $line = $2 || $4 ;
15
+ }
16
+
17
+ my $command = " ::error file=gcc/testsuite/$filename " ;
18
+ if ($line ) {
19
+ $command = " $command ,line=$line " ;
20
+ }
21
+
22
+ print " $command ,title=Test failure ($type )::$message \n " ;
23
+ }
24
+
25
+ analyze_errors();
Original file line number Diff line number Diff line change 77
77
- name : Check regressions
78
78
run : |
79
79
cd gccrs-build; \
80
- if grep -e "unexpected" -e "unresolved" gcc/testsuite/rust/rust.sum;\
80
+ if grep -e "unexpected" -e "unresolved" -e "ERROR:" gcc/testsuite/rust/rust.sum;\
81
81
then \
82
- echo "some tests are not correct"; \
82
+ echo "::error title=Regression test failed::some tests are not correct"; \
83
+ perl -n ../.github/emit_test_errors.pl < gcc/testsuite/rust/rust.sum; \
83
84
exit 1; \
84
85
else \
85
86
exit 0; \
@@ -142,9 +143,9 @@ jobs:
142
143
- name : Check regressions
143
144
run : |
144
145
cd gccrs-build; \
145
- if grep -e "unexpected" -e "unresolved" gcc/testsuite/rust/rust.sum;\
146
+ if grep -e "unexpected" -e "unresolved" -e "ERROR:" gcc/testsuite/rust/rust.sum;\
146
147
then \
147
- echo "some tests are not correct"; \
148
+ echo "::error title=Regression test failed:: some tests are not correct"; \
148
149
exit 1; \
149
150
else \
150
151
exit 0; \
@@ -196,9 +197,9 @@ jobs:
196
197
- name : Check regressions
197
198
run : |
198
199
cd gccrs-build; \
199
- if grep -e "unexpected" -e "unresolved" gcc/testsuite/rust/rust.sum;\
200
+ if grep -e "unexpected" -e "unresolved" -e "ERROR:" gcc/testsuite/rust/rust.sum;\
200
201
then \
201
- echo "some tests are not correct"; \
202
+ echo "::error title=Regression test failed:: some tests are not correct"; \
202
203
exit 1; \
203
204
else \
204
205
exit 0; \
You can’t perform that action at this time.
0 commit comments