Skip to content

Commit

Permalink
[tests] Add vssyncd it's own main.cpp (sonic-net#889)
Browse files Browse the repository at this point in the history
Main motivation is to avoid linking the same files across different directories to simplify future coverage data collection.
  • Loading branch information
kcudnik authored Aug 10, 2021
1 parent 7f8413a commit f58058c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ endif

SAILIB=-L$(top_srcdir)/vslib/src/.libs -lsaivs

vssyncd_SOURCES = ../syncd/main.cpp
vssyncd_SOURCES = main.cpp

vssyncd_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
vssyncd_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON) $(SAIFLAGS) $(CODE_COVERAGE_CXXFLAGS)
Expand Down
10 changes: 10 additions & 0 deletions tests/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include "swss/logger.h"

int syncd_main(int argc, char **argv);

int main(int argc, char **argv)
{
SWSS_LOG_ENTER();

return syncd_main(argc, argv);
}

0 comments on commit f58058c

Please sign in to comment.