When the test description is part of the OVS_TEST_SKIP_LIST
variable, the test is skipped.

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

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"])])

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to