Skip to content

Commit 7a1a97c

Browse files
author
Shuotian Cheng
authored
[debian]: Do not build test when building with real SAI (sonic-net#932)
1 parent 3faa884 commit 7a1a97c

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

configure.ac

+8-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ AC_CHECK_LIB([team], [team_alloc],
2020
[AC_MSG_WARN([libteam is not installed.])
2121
AM_CONDITIONAL(HAVE_LIBTEAM, false)])
2222

23+
AC_CHECK_LIB([sai], [sai_object_type_query],
24+
AM_CONDITIONAL(HAVE_SAI, true),
25+
[AC_MSG_WARN([libsai is not installed.])
26+
AM_CONDITIONAL(HAVE_SAI, false)])
27+
2328
AC_ARG_ENABLE(debug,
2429
[ --enable-debug Compile with debugging flags],
2530
[case "${enableval}" in
@@ -90,8 +95,10 @@ AC_CONFIG_FILES([
9095
portsyncd/Makefile
9196
teamsyncd/Makefile
9297
swssconfig/Makefile
93-
tests/Makefile
9498
cfgmgr/Makefile
9599
])
96100

101+
AM_COND_IF([HAVE_SAI],[],
102+
[AC_CONFIG_FILES([tests/Makefile])])
103+
97104
AC_OUTPUT

debian/rules

-6
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,8 @@ include /usr/share/dpkg/default.mk
2727
# dh_auto_configure -- \
2828
# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
2929

30-
override_dh_auto_configure:
31-
dh_auto_configure -- --enable-gtest
32-
3330
override_dh_auto_install:
3431
dh_auto_install --destdir=debian/swss
3532

3633
override_dh_strip:
3734
dh_strip --dbg-package=swss-dbg
38-
39-
override_dh_auto_test:
40-
./tests/tests

0 commit comments

Comments
 (0)