Skip to content

Commit

Permalink
Switch to using stock gcovr 5.2 (#726) (#731)
Browse files Browse the repository at this point in the history
* Switch to using stock gcovr 5.2 (#726)

* Switch to using stock gcovr 5.2

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: missing sonic-db-cli in docker-sonic-vs image (#640)

* Purge package sonic-db-cli which depends on libswsscommon (#628)

Since sonic-db-cli depends on libswsscommon, we could not simply only purge libswsscommon, so we purge both together.

The build error is as below

Step 8/19 : RUN dpkg --purge libswsscommon
 ---> Running in ed8132d457e9
dpkg: dependency problems prevent removal of libswsscommon:
 sonic-db-cli depends on libswsscommon.

dpkg: error processing package libswsscommon (--purge):
 dependency problems - not removing
Errors were encountered while processing:
 libswsscommon

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Co-authored-by: Saikrishna Arcot <sarcot@microsoft.com>
Co-authored-by: Qi Luo <qiluo-msft@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 3, 2023
1 parent 56627aa commit 27e5228
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .azure-pipelines/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: 2 additions & 8 deletions .azure-pipelines/docker-sonic-vs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,12 @@ ARG docker_container_name

ADD ["debs", "/debs"]

RUN dpkg --purge python-swsscommon
RUN dpkg --purge python3-swsscommon
RUN dpkg --purge swss
RUN dpkg --purge libsairedis
RUN dpkg --purge libswsscommon
RUN dpkg --purge libsaimetadata
RUN dpkg --purge libsaivs
RUN dpkg --purge syncd-vs
RUN dpkg --purge python-swsscommon python3-swsscommon swss libsairedis sonic-db-cli libswsscommon libsaimetadata libsaivs syncd-vs

RUN dpkg -i /debs/libswsscommon_1.0.0_amd64.deb
RUN dpkg -i /debs/python-swsscommon_1.0.0_amd64.deb
RUN dpkg -i /debs/python3-swsscommon_1.0.0_amd64.deb
RUN dpkg -i /debs/sonic-db-cli_1.0.0_amd64.deb

RUN dpkg -i /debs/libsaimetadata_1.0.0_amd64.deb
RUN dpkg -i /debs/libsairedis_1.0.0_amd64.deb
Expand Down

0 comments on commit 27e5228

Please sign in to comment.