ci: add 'fastnetmon subfolder build' step
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
build in 'build' subfolder and run ldd on artifacts * fix most obvious insufficiencies in fastnetmon_tests.cpp to allow us to build again
This commit is contained in:
parent
c23b1642a6
commit
f088faa94b
38
.drone.yml
38
.drone.yml
@ -114,6 +114,24 @@ 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)"
|
||||
- cd src
|
||||
- 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. -Bbuild
|
||||
- cmake --build build --target all fastnetmon
|
||||
- ldd build/fastnetmon
|
||||
- ldd build/fastnetmon_api_client
|
||||
- ldd build/fastnetmon_client
|
||||
when:
|
||||
status: [success, failure]
|
||||
depends_on: [build fastnetmon explicit features]
|
||||
|
||||
volumes:
|
||||
- name: usrcache
|
||||
temp: {}
|
||||
@ -219,6 +237,26 @@ 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)"
|
||||
- cd src
|
||||
- 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. -Bbuild
|
||||
- cmake --build build --target all fastnetmon --clean-first
|
||||
- ldd build/fastnetmon
|
||||
- ldd build/fastnetmon_api_client
|
||||
- ldd build/fastnetmon_client
|
||||
when:
|
||||
status: [success, failure]
|
||||
depends_on: [build fastnetmon explicit features]
|
||||
|
||||
volumes:
|
||||
- name: usrcache
|
||||
temp: {}
|
||||
|
@ -1,11 +1,14 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <math.h>
|
||||
|
||||
#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 <fstream>
|
||||
|
||||
#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)),
|
||||
|
Loading…
Reference in New Issue
Block a user