hsa: move vcl test apps to hsa

Type: refactor

Change-Id: I352975585c1091bfc5b85d7f8fe985f9059820a7
Signed-off-by: Florin Coras <fcoras@cisco.com>
This commit is contained in:
Florin Coras
2019-06-25 12:55:15 -07:00
committed by Dave Wallace
parent 33cd4823d6
commit 00dd74cee7
12 changed files with 40 additions and 31 deletions

View File

@ -411,6 +411,9 @@ F: extras/vom/vom/
Plugin - Host Stack Applications
I: hsa
M: Florin Coras <fcoras@cisco.com>
M: Dave Wallace <dwallacelf@gmail.com>
M: Aloys Augustin <aloaugus@cisco.com>
M: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
F: src/plugins/hs_apps/
THE REST

View File

@ -11,6 +11,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
##############################################################################
# vpp builtin hs apps
##############################################################################
add_vpp_plugin(hs_apps
SOURCES
echo_client.c
@ -20,24 +23,46 @@ add_vpp_plugin(hs_apps
proxy.c
)
option(VPP_BUILD_SESSION_ECHO_APPS "Build session echo apps." ON)
if(VPP_BUILD_SESSION_ECHO_APPS)
##############################################################################
# vpp external hs apps that use the "raw" session layer api
##############################################################################
option(VPP_BUILD_HS_SAPI_APPS "Build hs apps that use the session api." ON)
if(VPP_BUILD_HS_SAPI_APPS)
add_vpp_executable(tcp_echo
SOURCES tcp_echo.c
SOURCES sapi/tcp_echo.c
LINK_LIBRARIES vlibmemoryclient svm vppinfra pthread m rt
DEPENDS api_headers
NO_INSTALL
)
add_vpp_executable(quic_echo
SOURCES quic_echo.c
SOURCES sapi/quic_echo.c
LINK_LIBRARIES vlibmemoryclient svm vppinfra pthread m rt
DEPENDS api_headers
NO_INSTALL
)
add_vpp_executable(udp_echo
SOURCES udp_echo.c
SOURCES sapi/udp_echo.c
LINK_LIBRARIES vlibmemoryclient svm vppinfra pthread m rt
DEPENDS api_headers
NO_INSTALL
)
endif(VPP_BUILD_SESSION_ECHO_APPS)
endif(VPP_BUILD_HS_SAPI_APPS)
##############################################################################
# vcl tests
##############################################################################
option(VPP_BUILD_VCL_TESTS "Build vcl tests." ON)
if(VPP_BUILD_VCL_TESTS)
foreach(test
vcl_test_server
vcl_test_client
sock_test_server
sock_test_client
)
add_vpp_executable(${test}
SOURCES "vcl/${test}.c"
LINK_LIBRARIES vppcom pthread
NO_INSTALL
)
endforeach()
endif(VPP_BUILD_VCL_TESTS)

View File

@ -20,7 +20,7 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <vcl/vcl_test.h>
#include <hs_apps/vcl/vcl_test.h>
#define SOCK_TEST_AF_UNIX_FILENAME "/tmp/ldp_server_af_unix_socket"
#define SOCK_TEST_MIXED_EPOLL_DATA "Hello, world! (over an AF_UNIX socket)"

View File

@ -22,7 +22,7 @@
#include <stdio.h>
#include <time.h>
#include <arpa/inet.h>
#include <vcl/sock_test.h>
#include <hs_apps/vcl/sock_test.h>
#include <fcntl.h>
#ifndef VCL_TEST
#include <sys/un.h>

View File

@ -21,7 +21,7 @@
#include <string.h>
#include <time.h>
#include <ctype.h>
#include <vcl/sock_test.h>
#include <hs_apps/vcl/sock_test.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>

View File

@ -22,7 +22,7 @@
#include <stdio.h>
#include <time.h>
#include <arpa/inet.h>
#include <vcl/vcl_test.h>
#include <hs_apps/vcl/vcl_test.h>
#include <pthread.h>
typedef struct

View File

@ -23,7 +23,7 @@
#include <ctype.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <vcl/vcl_test.h>
#include <hs_apps/vcl/vcl_test.h>
#include <sys/epoll.h>
#include <vppinfra/mem.h>
#include <pthread.h>

View File

@ -40,27 +40,8 @@ add_vpp_library(vcl_ldpreload
add_vpp_headers(vcl
ldp.h
sock_test.h
ldp_glibc_socket.h
vcl_test.h
vppcom.h
vcl_locked.h
ldp_socket_wrapper.h
)
##############################################################################
# vcl tests
##############################################################################
option(VPP_BUILD_VCL_TESTS "Build vcl tests." ON)
if(VPP_BUILD_VCL_TESTS)
foreach(test
vcl_test_server
vcl_test_client
sock_test_server
sock_test_client
)
add_vpp_executable(${test} SOURCES ${test}.c LINK_LIBRARIES vppcom pthread
NO_INSTALL)
endforeach()
endif(VPP_BUILD_VCL_TESTS)
)