Skip to content

Commit bd00952

Browse files
authored
Merge pull request #39 from xoviat/sonarqube
Tests: FIXUP sonarqube.
2 parents c200742 + 60e1ccd commit bd00952

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

appveyor.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ install:
8585
- "%CMD_IN_ENV% python tests/scripts/appveyor/fetch_wrapper.py"
8686

8787
- "%CMD_IN_ENV% build-wrapper-win-x86-64 --out-dir sonar python setup.py bdist_wheel"
88+
- "%CMD_IN_ENV% python tests/scripts/appveyor/fixup_wrapper.py sonar/build-wrapper-dump.json"
8889
- "%CMD_IN_ENV% python tests/scripts/install_wheels.py dist"
8990

9091
build: none
@@ -119,8 +120,8 @@ on_finish:
119120
"https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)",
120121
(Resolve-Path .\junit-results.xml)
121122
)
122-
123-
- "%CMD_IN_ENV% python tests/scripts/appveyor/fixup_wrapper.py sonar/build-wrapper-dump.json"
123+
$LastExitCode = 0
124+
124125
- ps: |
125126
if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
126127
sonar-scanner `
@@ -130,3 +131,4 @@ on_finish:
130131
"-Dsonar.login=%SONAR_TOKEN%" `
131132
"-Dsonar.cfamily.build-wrapper-output=sonar"
132133
}
134+
$LastExitCode = 0

tests/scripts/appveyor/fixup_wrapper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212

1313
wrapper = json.loads(wrapper_file.read())
1414

15-
for i in range(len(wrapper['captures'])):
15+
for i, item in enumerate(wrapper['captures']):
1616
wrapper['captures'][i]['stdout'] = wrapper['captures'][0]['stdout']
1717
wrapper['captures'][i]['stderr'] = wrapper['captures'][0]['stderr']
1818

19+
wrapper_file.seek(0)
20+
wrapper_file.truncate()
1921
wrapper_file.write(json.dumps(wrapper))

0 commit comments

Comments
 (0)