diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index b32bed721a0..f4f3ec30890 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -124,3 +124,4 @@ jobs: run: source tools/ci.sh && ${{matrix.cmd_action}} env: ETHERNET_INTERFACE: eth0 + SKIP_ETHERNET: true diff --git a/tests/pubsub/check_pubsub_connection_ethernet.c b/tests/pubsub/check_pubsub_connection_ethernet.c index 7ebed089592..3437e93eecc 100644 --- a/tests/pubsub/check_pubsub_connection_ethernet.c +++ b/tests/pubsub/check_pubsub_connection_ethernet.c @@ -215,6 +215,9 @@ START_TEST(GetMaximalConnectionConfigurationAndCompareValues){ } END_TEST int main(void) { + if(SKIP_ETHERNET && strlen(SKIP_ETHERNET) > 0) + return EXIT_SUCCESS; + TCase *tc_add_pubsub_connections_minimal_config = tcase_create("Create PubSub Ethernet Connections with minimal valid config"); tcase_add_checked_fixture(tc_add_pubsub_connections_minimal_config, setup, teardown); tcase_add_test(tc_add_pubsub_connections_minimal_config, AddConnectionsWithMinimalValidConfiguration); diff --git a/tests/pubsub/check_pubsub_connection_ethernet_etf.c b/tests/pubsub/check_pubsub_connection_ethernet_etf.c index ff71a42f28f..3ffc5f9da75 100644 --- a/tests/pubsub/check_pubsub_connection_ethernet_etf.c +++ b/tests/pubsub/check_pubsub_connection_ethernet_etf.c @@ -266,6 +266,9 @@ START_TEST(GetMaximalConnectionConfigurationAndCompareValues){ } END_TEST int main(void) { + if(SKIP_ETHERNET && strlen(SKIP_ETHERNET) > 0) + return EXIT_SUCCESS; + TCase *tc_add_pubsub_connections_minimal_config = tcase_create("Create PubSub Ethernet ETF Connections with minimal valid config"); tcase_add_checked_fixture(tc_add_pubsub_connections_minimal_config, setup, teardown); tcase_add_test(tc_add_pubsub_connections_minimal_config, AddConnectionsWithMinimalValidConfiguration); diff --git a/tests/pubsub/check_pubsub_publish_ethernet_etf.c b/tests/pubsub/check_pubsub_publish_ethernet_etf.c index c212289aff2..7106215255e 100644 --- a/tests/pubsub/check_pubsub_publish_ethernet_etf.c +++ b/tests/pubsub/check_pubsub_publish_ethernet_etf.c @@ -181,6 +181,9 @@ START_TEST(EthernetSendWithVLANTag) { } END_TEST int main(void) { + if(SKIP_ETHERNET && strlen(SKIP_ETHERNET) > 0) + return EXIT_SUCCESS; + /*Test case to run both publisher*/ TCase *tc_pubsub_ethernet_etf_publish = tcase_create("Publisher publishing Ethernet packets based on etf"); tcase_add_checked_fixture(tc_pubsub_ethernet_etf_publish, setup, teardown); diff --git a/tests/pubsub/ethernet_config.h b/tests/pubsub/ethernet_config.h index 09e42314e46..35292688529 100644 --- a/tests/pubsub/ethernet_config.h +++ b/tests/pubsub/ethernet_config.h @@ -1,2 +1,3 @@ #define ETHERNET_INTERFACE getenv("ETHERNET_INTERFACE") +#define SKIP_ETHERNET getenv("SKIP_ETHERNET") #define MULTICAST_MAC_ADDRESS "opc.eth://08-00-27-b9-65-4a" diff --git a/tools/ci.sh b/tools/ci.sh index 2e20a77be89..d8a0a640786 100644 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -292,7 +292,7 @@ function unit_tests_pubsub_sks { -DUA_FORCE_WERROR=ON \ .. make ${MAKEOPTS} - # set_capabilities not possible with valgrind + set_capabilities make test ARGS="-V -R sks" } @@ -347,7 +347,7 @@ function unit_tests_valgrind { .. make ${MAKEOPTS} # set_capabilities not possible with valgrind - make test ARGS="-V" + sudo bash -c "make test ARGS=\"-V\"" } ######################################## @@ -388,7 +388,8 @@ function examples_valgrind { # Run each example with valgrind. Wait 10 seconds and send the SIGINT # signal. Wait for the process to terminate and collect the exit status. # Abort when the exit status is non-null. - python3 ../tools/examples_with_valgrind.py + # set_capabilities not possible with valgrind + sudo bash -c "python3 ../tools/examples_with_valgrind.py" EXIT_CODE=$? if [[ $EXIT_CODE -ne 0 ]]; then echo "Processing failed with exit code $EXIT_CODE"