Skip to content

Commit

Permalink
[debian]: Do not build test when building with real SAI (sonic-net#932)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuotian Cheng committed Jun 13, 2019
1 parent 3faa884 commit 7a1a97c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 8 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ AC_CHECK_LIB([team], [team_alloc],
[AC_MSG_WARN([libteam is not installed.])
AM_CONDITIONAL(HAVE_LIBTEAM, false)])

AC_CHECK_LIB([sai], [sai_object_type_query],
AM_CONDITIONAL(HAVE_SAI, true),
[AC_MSG_WARN([libsai is not installed.])
AM_CONDITIONAL(HAVE_SAI, false)])

AC_ARG_ENABLE(debug,
[ --enable-debug Compile with debugging flags],
[case "${enableval}" in
Expand Down Expand Up @@ -90,8 +95,10 @@ AC_CONFIG_FILES([
portsyncd/Makefile
teamsyncd/Makefile
swssconfig/Makefile
tests/Makefile
cfgmgr/Makefile
])

AM_COND_IF([HAVE_SAI],[],
[AC_CONFIG_FILES([tests/Makefile])])

AC_OUTPUT
6 changes: 0 additions & 6 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,8 @@ include /usr/share/dpkg/default.mk
# dh_auto_configure -- \
# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)

override_dh_auto_configure:
dh_auto_configure -- --enable-gtest

override_dh_auto_install:
dh_auto_install --destdir=debian/swss

override_dh_strip:
dh_strip --dbg-package=swss-dbg

override_dh_auto_test:
./tests/tests

0 comments on commit 7a1a97c

Please sign in to comment.