Skip to content

Commit

Permalink
Fix sonic-slave docker image environment issue. (#728)
Browse files Browse the repository at this point in the history
* Switch to using stock gcovr 5.2 (#726)
The custom branch we were using previously has since been deleted. That
branch appears to have some fix for searching for the source file (for a
gcda file) recursively. I don't know if it's needed or not today, but
using the stock gcovr 5.2 (from the official repo) appears to work.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

* Fix sonic-slave docker image environment issue.
Signed-off-by: shilongliu <shilongliu@microsoft.com>
  • Loading branch information
liushilongbuaa authored Dec 28, 2022
1 parent 8fee1b4 commit 8a276c6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/build-sairedis-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
vmImage: 'ubuntu-20.04'

container:
image: sonicdev-microsoft.azurecr.io:443/${{ parameters.sonic_slave }}:latest
image: sonicdev-microsoft.azurecr.io:443/${{ parameters.sonic_slave }}

steps:
- checkout: sonic-sairedis
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/build-swss-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
vmImage: 'ubuntu-20.04'

container:
image: sonicdev-microsoft.azurecr.io:443/${{ parameters.sonic_slave }}:latest
image: sonicdev-microsoft.azurecr.io:443/${{ parameters.sonic_slave }}

steps:
- checkout: sonic-swss
Expand Down
10 changes: 5 additions & 5 deletions .azure-pipelines/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
vmImage: 'ubuntu-20.04'

container:
image: sonicdev-microsoft.azurecr.io:443/${{ parameters.sonic_slave }}:latest
image: sonicdev-microsoft.azurecr.io:443/${{ parameters.sonic_slave }}

steps:
- checkout: self
Expand All @@ -73,14 +73,14 @@ jobs:
- ${{ if eq(parameters.run_unit_test, true) }}:
- script: |
set -ex
git clone https://github.com/Spacetown/gcovr.git
git clone https://github.com/gcovr/gcovr.git
cd gcovr/
git checkout origin/recursive_search_file
git checkout 5.2
sudo pip3 install setuptools
sudo python3 setup.py install
cd ..
sudo rm -rf gcovr
displayName: "Install gcovr 5.0 with recursive fix"
displayName: "Install gcovr 5.2 (for --exclude-throw-branches support)"
- script: |
set -ex
sudo pip install Pympler==0.8
Expand All @@ -98,7 +98,7 @@ jobs:
redis-cli FLUSHALL
pytest --cov=. --cov-report=xml
mv coverage.xml tests/coverage.xml
gcovr -r ./ -e ".*/swsscommon_wrap.cpp" --exclude-unreachable-branches --exclude-throw-branches -x --xml-pretty -o coverage.xml
gcovr -r ./ -e ".*/swsscommon_wrap.cpp" --exclude-unreachable-branches --exclude-throw-branches --gcov-ignore-parse-errors -x --xml-pretty -o coverage.xml
displayName: "Run swss common unit tests"
- publish: $(System.DefaultWorkingDirectory)/
artifact: ${{ parameters.artifact_name }}
Expand Down
10 changes: 5 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ stages:
- template: .azure-pipelines/build-template.yml
parameters:
arch: amd64
sonic_slave: sonic-slave-${{ parameters.debian_version }}
sonic_slave: sonic-slave-${{ parameters.debian_version }}:$(BUILD_BRANCH)
artifact_name: sonic-swss-common
run_unit_test: true
archive_gcov: true
Expand All @@ -105,15 +105,15 @@ stages:
arch: armhf
timeout: 180
pool: sonicbld-armhf
sonic_slave: sonic-slave-${{ parameters.debian_version }}-armhf
sonic_slave: sonic-slave-${{ parameters.debian_version }}-armhf:$(BUILD_BRANCH)
artifact_name: sonic-swss-common.armhf

- template: .azure-pipelines/build-template.yml
parameters:
arch: arm64
timeout: 180
pool: sonicbld-arm64
sonic_slave: sonic-slave-${{ parameters.debian_version }}-arm64
sonic_slave: sonic-slave-${{ parameters.debian_version }}-arm64:$(BUILD_BRANCH)
artifact_name: sonic-swss-common.arm64

- stage: BuildSairedis
Expand All @@ -123,7 +123,7 @@ stages:
- template: .azure-pipelines/build-sairedis-template.yml
parameters:
arch: amd64
sonic_slave: sonic-slave-${{ parameters.debian_version }}
sonic_slave: sonic-slave-${{ parameters.debian_version }}:$(BUILD_BRANCH)
swss_common_artifact_name: sonic-swss-common
artifact_name: sonic-sairedis
syslog_artifact_name: sonic-sairedis.syslog
Expand All @@ -135,7 +135,7 @@ stages:
- template: .azure-pipelines/build-swss-template.yml
parameters:
arch: amd64
sonic_slave: sonic-slave-${{ parameters.debian_version }}
sonic_slave: sonic-slave-${{ parameters.debian_version }}:$(BUILD_BRANCH)
swss_common_artifact_name: sonic-swss-common
sairedis_artifact_name: sonic-sairedis
artifact_name: sonic-swss
Expand Down

0 comments on commit 8a276c6

Please sign in to comment.