diff --git a/.drone.yml b/.drone.yml index b982936b..cf586383 100644 --- a/.drone.yml +++ b/.drone.yml @@ -124,6 +124,25 @@ steps: status: [success, failure] depends_on: [build fastnetmon] +- name: fastnetmon subfolder build + pull: if-not-exists + image: immawanderer/archlinux-cdev:latest + volumes: + - name: usrcache + path: /usr + commands: + - export MAKEFLAGS="$MAKEFLAGS -j$(nproc)" + - mkdir -pv src/build && cd src/build + - cmake -D"USE_NEW_ATOMIC_BUILTINS=ON" -D"ENABLE_AFPACKET_SUPPORT=ON" -D"ENABLE_GOBGP_SUPPORT=ON" -D"BUILD_PLUGIN_RUNNER=ON" -D"BUILD_TESTS=OFF" -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS -Wall -Wextra" -S.. -B. + - ls -lah + - make clean fastnetmon all + - ldd fastnetmon + - ldd fastnetmon_api_client + - ldd fastnetmon_client + when: + status: [success, failure] + depends_on: [build fastnetmon explicit features] + volumes: - name: usrcache temp: {} @@ -242,6 +261,27 @@ steps: status: [success, failure] depends_on: [build fastnetmon] +- name: fastnetmon subfolder build + pull: if-not-exists + image: fedora:34 + volumes: + - name: etc + path: /etc + - name: usrcache + path: /usr + commands: + - export MAKEFLAGS="$MAKEFLAGS -j$(nproc)" + - mkdir -pv src/build && cd src/build + - cmake -D"USE_NEW_ATOMIC_BUILTINS=ON" -D"ENABLE_AFPACKET_SUPPORT=ON" -D"ENABLE_GOBGP_SUPPORT=ON" -D"BUILD_PLUGIN_RUNNER=ON" -D"BUILD_TESTS=OFF" -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS -Wall -Wextra" --clean-first -S .. -B. + - ls -lah + - make clean fastnetmon all + - ldd fastnetmon + - ldd fastnetmon_api_client + - ldd fastnetmon_client + when: + status: [success, failure] + depends_on: [build fastnetmon explicit features] + volumes: - name: usrcache temp: {} diff --git a/src/fastnetmon_tests.cpp b/src/fastnetmon_tests.cpp index 8d7575b7..394fe2d2 100644 --- a/src/fastnetmon_tests.cpp +++ b/src/fastnetmon_tests.cpp @@ -1,11 +1,14 @@ #include #include -#include "bgp_flow_spec.h" +/* bgp_flow_spec.{cpp,h} has been renamed to bgp_protocol.{cpp,hpp} in + * a7357e3ee06a5ca6f7e200e66d9d9183bba26ef0 */ +#include "bgp_protocol.hpp" #include "fast_library.h" #include +#include "fastnetmon_types.h" #include "log4cpp/Appender.hh" #include "log4cpp/BasicLayout.hh" #include "log4cpp/Category.hh" @@ -435,7 +438,7 @@ TEST(patricia, positive_lookup_ipv6_prefix) { } TEST(serialize_attack_description, blank_attack) { - attack_details current_attack; + attack_details_t current_attack; std::string result = serialize_attack_description(current_attack); EXPECT_EQ( result, @@ -458,7 +461,7 @@ TEST(serialize_attack_description, blank_attack) { } TEST(serialize_attack_description_to_json, blank_attack) { - attack_details current_attack; + attack_details_t current_attack; json_object* jobj = serialize_attack_description_to_json(current_attack); EXPECT_EQ(std::string(json_object_to_json_string(jobj)), @@ -479,7 +482,7 @@ TEST(serialize_attack_description_to_json, blank_attack) { } TEST(serialize_network_load_to_text, blank_attck_average) { - map_element network_speed_meter; + map_element_t network_speed_meter; EXPECT_EQ(serialize_network_load_to_text(network_speed_meter, true), "Average network incoming traffic: 0 mbps\nAverage network outgoing traffic: 0 " @@ -488,7 +491,7 @@ TEST(serialize_network_load_to_text, blank_attck_average) { } TEST(serialize_network_load_to_text, blank_attck_absolute) { - map_element network_speed_meter; + map_element_t network_speed_meter; EXPECT_EQ(serialize_network_load_to_text(network_speed_meter, false), "Network incoming traffic: 0 mbps\nNetwork outgoing traffic: 0 mbps\nNetwork " @@ -496,7 +499,7 @@ TEST(serialize_network_load_to_text, blank_attck_absolute) { } TEST(serialize_network_load_to_json, blank_attack_average) { - map_element network_speed_meter; + map_element_t network_speed_meter; json_object* jobj = serialize_network_load_to_json(network_speed_meter); EXPECT_EQ(std::string(json_object_to_json_string(jobj)),