Tests: Refactor tearDown show command logging, add lifecycle markers.
[vpp.git] / test / test_ping.py
index 4f3921e..7e5c92f 100644 (file)
@@ -36,10 +36,15 @@ class TestPing(VppTestCase):
             super(TestPing, cls).tearDownClass()
             raise
 
+    @classmethod
+    def tearDownClass(cls):
+        super(TestPing, cls).tearDownClass()
+
     def tearDown(self):
         super(TestPing, self).tearDown()
-        if not self.vpp_dead:
-            self.vapi.cli("show hardware")
+
+    def show_commands_at_teardown(self):
+        self.logger.info(self.vapi.cli("show hardware"))
 
     def test_ping_basic(self):
         """ basic ping test """