Skip to content

Add test main function#45

Closed
lolyu wants to merge 1 commit intosonic-net:masterfrom
lolyu:add_test_main
Closed

Add test main function#45
lolyu wants to merge 1 commit intosonic-net:masterfrom
lolyu:add_test_main

Conversation

@lolyu
Copy link
Contributor

@lolyu lolyu commented Mar 21, 2022

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • New feature
  • Doc/Design
  • Unit test

Approach

What is the motivation for this PR?

Explicitly add test main function to enable customized testing features:

  1. initialize mux logger before tests.
  2. introduce gmock

Depends on: sonic-net/sonic-buildimage#10294

Signed-off-by: Longxiang Lyu [email protected]

How did you do it?

  1. add LinkMgrdTestMain.cpp to explicitly define main function.
  2. in the main function, init the logger and hook up gmock

How did you verify/test it?

Any platform specific information?

Documentation

Explicitly add test main function to enable customized testing features:
1. initialize mux logger before tests.
2. introduce `gmock`

Signed-off-by: Longxiang Lyu <[email protected]>
@lolyu lolyu requested review from yxieca and zjswhhh March 21, 2022 15:40
@lolyu lolyu closed this Mar 21, 2022
lolyu added a commit to sonic-net/sonic-buildimage that referenced this pull request Apr 14, 2022
Why I did it
Add libgmock-dev to the package list required by linkmgrd unittests.
Required by PR: sonic-net/sonic-linkmgrd#45

How I did it
Add the package to the package list.

How to verify it
Build docker-mux with KEEP_SLAVE_ON=yes and verify libgmock-dev is present.

Signed-off-by: Longxiang Lyu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants