diff mbox series

[ovs-dev,v5,01/15] tests: Allow system-traffic tests to be skipped based on a list.

Message ID 166920195583.2283155.6076127001328718742.stgit@ebuild
State Superseded
Headers show
Series tests: Add system-traffic.at tests to check-offloads. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/intel-ovs-compilation success test: success

Commit Message

Eelco Chaudron Nov. 23, 2022, 11:12 a.m. UTC
When the test description is part of the OVS_TEST_SKIP_LIST
variable, the test is skipped.

Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Roi Dayan <roid@nvidia.com>
---
 tests/ofproto-macros.at |    5 ++++-
 tests/ovs-macros.at     |    7 +++++++
 2 files changed, 11 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at
index 676d55aa9..5c033f771 100644
--- a/tests/ofproto-macros.at
+++ b/tests/ofproto-macros.at
@@ -161,7 +161,10 @@  m4_define([TESTABLE_LOG], [-vPATTERN:ANY:'%c|%p|%m'])
 # before starting ovs-vswitchd.
 #
 m4_define([_OVS_VSWITCHD_START],
-  [dnl Create database.
+  [dnl Check if test needs to be run.
+   OVS_SKIP_TEST_IF_REQUESTED()
+
+   dnl Create database.
    touch .conf.db.~lock~
    AT_CHECK([ovsdb-tool create conf.db $abs_top_srcdir/vswitchd/vswitch.ovsschema])
 
diff --git a/tests/ovs-macros.at b/tests/ovs-macros.at
index 39fbfceeb..f3eff5c05 100644
--- a/tests/ovs-macros.at
+++ b/tests/ovs-macros.at
@@ -371,3 +371,10 @@  dnl Add a rule to always accept the traffic.
 m4_define([IPTABLES_ACCEPT],
   [AT_CHECK([iptables -I INPUT 1 -i $1 -j ACCEPT])
    on_exit 'iptables -D INPUT 1 -i $1'])
+
+# OVS_TEST_SKIP_LIST()
+m4_define([OVS_TEST_SKIP_LIST], [ echo ""])
+
+# OVS_SKIP_TEST_IF_REQUESTED()
+m4_define([OVS_SKIP_TEST_IF_REQUESTED],
+    [AT_SKIP_IF([OVS_TEST_SKIP_LIST() | grep -qx "$at_desc"])])