Skip to content

Commit

Permalink
update script
Browse files Browse the repository at this point in the history
Signed-off-by: pettershao-ragilenetworks <[email protected]>
  • Loading branch information
pettershao-ragilenetworks authored and sdk committed Nov 3, 2022
1 parent e5a6cf8 commit a278cf1
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 24 deletions.
28 changes: 14 additions & 14 deletions .azure-pipelines/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,20 +181,20 @@ jobs:
- publish: $(System.DefaultWorkingDirectory)/
artifact: ${{ parameters.artifact_name }}
displayName: "Archive sonic sairedis debian packages"
- ${{ if eq(parameters.archive_gcov, true) }}:
- script: |
set -ex
# Install .NET CORE
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo apt-add-repository https://packages.microsoft.com/debian/10/prod
sudo apt-get update
sudo apt-get install -y dotnet-sdk-5.0
displayName: "Install .NET CORE"
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage.xml'
displayName: 'Publish test coverage'
# - ${{ if eq(parameters.archive_gcov, true) }}:
# - script: |
# set -ex
# # Install .NET CORE
# curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
# sudo apt-add-repository https://packages.microsoft.com/debian/10/prod
# sudo apt-get update
# sudo apt-get install -y dotnet-sdk-5.0
# displayName: "Install .NET CORE"
# - task: PublishCodeCoverageResults@1
# inputs:
# codeCoverageTool: Cobertura
# summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage.xml'
# displayName: 'Publish test coverage'
- script: |
pwd
sudo chmod a+r /var/log/syslog*
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ stages:

- stage: BuildSwss
dependsOn: Build
condition: succeeded('Build')
condition: always()
jobs:
- template: .azure-pipelines/build-swss-template.yml
parameters:
Expand All @@ -101,7 +101,7 @@ stages:

- stage: BuildDocker
dependsOn: BuildSwss
condition: succeeded('BuildSwss')
condition: always()
jobs:
- template: .azure-pipelines/build-docker-sonic-vs-template.yml
parameters:
Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ override_dh_install:
if egrep -q '(^| )--enable-rpcserver=yes( |$$)' /tmp/syncd-build && [ -f debian/syncd-rpc/usr/bin/syncd_init_common.sh ] ; then
sed -i 's|ENABLE_SAITHRIFT=0|ENABLE_SAITHRIFT=1 # Add a comment to fix https://github.com/Azure/sonic-buildimage/issues/2694 |' debian/syncd-rpc/usr/bin/syncd_init_common.sh
fi
mkdir -p debian/sairedis/tmp/gcov
mkdir -p debian/syncd/tmp/gcov
sh ./gcov_support.sh collect syncd

override_dh_installinit:
Expand Down
2 changes: 2 additions & 0 deletions gcov_support.sh
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,9 @@ gcov_support_collect_gcno()
mkdir -p ${work_dir}/debian/$submodule_name/usr
mkdir -p ${work_dir}/debian/$submodule_name/usr/lib
cp ./gcovpreload/libgcovpreload.so ${work_dir}/debian/$submodule_name/usr/lib
cp ./gcovpreload/libgcovpreload.so ${work_dir}/debian/tmp/usr/lib
sudo chmod 777 -R /${work_dir}/debian/$submodule_name/usr/lib/libgcovpreload.so
sudo chmod 777 -R /${work_dir}/debian/tmp/usr/lib/libgcovpreload.so
rm $GCNO_LIST_FILE
echo " === Collect finished... === "
fi
Expand Down
4 changes: 0 additions & 4 deletions syncd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,4 @@ tests_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON)
tests_LDFLAGS = -Wl,-rpath,$(top_srcdir)/lib/.libs -Wl,-rpath,$(top_srcdir)/meta/.libs
tests_LDADD = libSyncd.a -lhiredis -lswsscommon -lpthread -L$(top_srcdir)/lib/.libs -lsairedis \
-L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta -lzmq $(CODE_COVERAGE_LIBS)

if GCOV_ENABLED
tests_LDADD += -lgcovpreload
endif
TESTS = tests
3 changes: 0 additions & 3 deletions vslib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,5 @@ tests_SOURCES = tests.cpp
tests_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON)
tests_LDADD = -lhiredis -lswsscommon -lpthread libsaivs.la -L$(top_srcdir)/meta/.libs -lsaimetadata -lsaimeta -lzmq

if GCOV_ENABLED
tests_LDADD += -lgcovpreload
endif

TESTS = tests

0 comments on commit a278cf1

Please sign in to comment.