aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYohanPipereau <ypiperea@cisco.com>2019-04-05 20:14:09 +0200
committerYohanPipereau <ypiperea@cisco.com>2019-04-09 15:32:18 +0200
commit3320f7c7224e051b4a30a74e0a683159ed8b9dea (patch)
tree9f78bdc71d366a402970b44016d92ac922b399c3 /src
parenta760dfb253161911fc3aa3c8b879c461d53ade6e (diff)
Modify build system
-Clean Makefile -Fix errors in scvpp length copies -Add testing when building scvpp Change-Id: I5a331386a1812b147dfec26310dfbd3aed327dae Signed-off-by: YohanPipereau <ypiperea@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/cmake/Packager.cmake4
-rw-r--r--src/plugins/openconfig/openconfig_local_routing.c2
-rw-r--r--src/scvpp/src/interface.c4
-rw-r--r--src/scvpp/tests/CMakeLists.txt6
4 files changed, 10 insertions, 6 deletions
diff --git a/src/cmake/Packager.cmake b/src/cmake/Packager.cmake
index 4305652..fddb382 100644
--- a/src/cmake/Packager.cmake
+++ b/src/cmake/Packager.cmake
@@ -33,7 +33,7 @@ macro(make_packages)
set(OS_${_name} ${_value})
endforeach()
- # extract version from git
+ #extract version from git
execute_process(
COMMAND git describe --long --match v*
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
@@ -51,6 +51,8 @@ macro(make_packages)
list(GET VER 1 commit_num)
list(GET VER 2 commit_name)
+ message("${tag}")
+
if (NOT DEFINED ENV{BUILD_NUMBER})
set(bld "b1")
else()
diff --git a/src/plugins/openconfig/openconfig_local_routing.c b/src/plugins/openconfig/openconfig_local_routing.c
index 5d18b52..6a3b5bd 100644
--- a/src/plugins/openconfig/openconfig_local_routing.c
+++ b/src/plugins/openconfig/openconfig_local_routing.c
@@ -381,7 +381,7 @@ oc_next_hop_state_cb(const char *xpath, sr_val_t **values, size_t *values_cnt,
VPP_IP4_PREFIX_STRING_LEN, &state);
rc |= get_xpath_key(index, (char*)xpath, "next-hop", "index",
- VPP_IP4_PREFIX_STRING_LEN, &state);
+ HOP_INDEX_SIZE, &state);
if (rc != 0)
return SR_ERR_INVAL_ARG;
diff --git a/src/scvpp/src/interface.c b/src/scvpp/src/interface.c
index 53cea1c..8f3b30b 100644
--- a/src/scvpp/src/interface.c
+++ b/src/scvpp/src/interface.c
@@ -20,6 +20,8 @@
#include <scvpp/comm.h>
#include <scvpp/interface.h>
+#define IFACE_SUBSTR 49
+
// Use VAPI macros to define symbols
DEFINE_VAPI_MSG_IDS_INTERFACE_API_JSON
@@ -53,7 +55,7 @@ bin_api_sw_interface_dump(vapi_payload_sw_interface_details *details,
/* Dump a specific interfaces */
mp->payload.name_filter_valid = true;
- strncpy((char *)mp->payload.name_filter, iface_name, VPP_INTFC_NAME_LEN);
+ strncpy((char *)mp->payload.name_filter, iface_name, IFACE_SUBSTR);
VAPI_CALL(vapi_sw_interface_dump(g_vapi_ctx, mp,
sw_interface_dump_cb, details));
diff --git a/src/scvpp/tests/CMakeLists.txt b/src/scvpp/tests/CMakeLists.txt
index 2b6de4a..19b7f7b 100644
--- a/src/scvpp/tests/CMakeLists.txt
+++ b/src/scvpp/tests/CMakeLists.txt
@@ -29,12 +29,12 @@ set(TEST_SRC
add_executable(scvpp_test ${TEST_SRC})
target_link_libraries(scvpp_test ${CMOCKA_LIBRARIES} scvpp_a)
target_include_directories(scvpp_test PRIVATE ../inc)
-add_test(scvpp_test scvpp_test)
+add_test(scvpp_test ./scvpp_test)
if(valgrind_FOUND)
- add_test(${TEST_NAME}_valgrind valgrind
+ add_test(scvpp_valgrind valgrind
--error-exitcode=1 --read-var-info=yes
--leak-check=full --show-leak-kinds=all
- ./${TEST_NAME}
+ ./scvpp_test
)
endif(valgrind_FOUND)