Skip to content

Commit 75860e1

Browse files
committed
Merge branch 'topic/tests_on_err' into 'master'
Enable test result uploading on errors. See merge request eng/ide/ada_language_server!1142
2 parents 950b5a9 + fec6d81 commit 75860e1

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ build_and_test:
7878
- if [ ! -z ${FAILED+x} ]; then echo "There was at least one testcase failure" && exit 1; fi
7979

8080
artifacts:
81+
when: always # Upload on errors too
8182
paths:
8283
- xunit_output.xml
8384
reports:

testsuite/drivers/basic.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,12 @@ def run(self, previous_values, slot):
4141

4242
if process.status:
4343
# Nonzero status?
44-
if process.status == 100:
45-
# This one is an xfail
46-
status = TestStatus.XFAIL
47-
break
48-
else:
49-
# Unknown status!
50-
status = TestStatus.ERROR
51-
break
52-
else:
53-
# Status is 0...
54-
if output:
55-
# ... and there is an output: that's a FAIL
56-
status = TestStatus.FAIL
57-
break
44+
status = TestStatus.FAIL
45+
break
5846

5947
self.result.set_status(status)
6048
if output:
61-
# If there's an output, capture it
62-
self.result.out = output
49+
# If there's an output, capture it as log
50+
self.result.log = output
6351

6452
self.push_result()

0 commit comments

Comments
 (0)