[V1] tests/TestSuite_dcf_lifecycle: recovery ENV for other cases run
diff mbox series

Message ID 20200727160817.9609-1-jianweix.mei@intel.com
State New
Headers show
Series
  • [V1] tests/TestSuite_dcf_lifecycle: recovery ENV for other cases run
Related show

Commit Message

Jianwei Mei July 27, 2020, 4:08 p.m. UTC
Recovery ENV after test case test_dcf_with_l2fwd_03 or test_dcf_with_l2fwd_02 run

Signed-off-by: Jianwei Mei <jianweix.mei@intel.com>
---
 tests/TestSuite_dcf_lifecycle.py | 4 ++++
 1 file changed, 4 insertions(+)

Patch
diff mbox series

diff --git a/tests/TestSuite_dcf_lifecycle.py b/tests/TestSuite_dcf_lifecycle.py
index 3971941..e3954d0 100644
--- a/tests/TestSuite_dcf_lifecycle.py
+++ b/tests/TestSuite_dcf_lifecycle.py
@@ -1048,6 +1048,10 @@  class TestDcfLifeCycle(TestCase):
         """
         Run after each test case.
         """
+        if self._suite_result.test_case == "test_dcf_with_l2fwd_03" or self._suite_result.test_case == "test_dcf_with_l2fwd_02":
+            self.destroy_resource()
+            self.init_suite()
+            self.preset_test_environment()
         self.dut.kill_all()
         self.clear_flags()