[SDFAB-635] Save Onos Diagnostics if a testcase fails
- Add to Segment Routing utility module's cleanup
function, so most tests don't need to explicitly
call function
Change-Id: I47c8b7ae39350631037f61e5194afc1e5a40896f
diff --git a/TestON/tests/USECASE/SegmentRouting/INT/dependencies/IntTest.py b/TestON/tests/USECASE/SegmentRouting/INT/dependencies/IntTest.py
index e10248f..2249ce2 100644
--- a/TestON/tests/USECASE/SegmentRouting/INT/dependencies/IntTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/INT/dependencies/IntTest.py
@@ -3,6 +3,8 @@
import os
from tests.dependencies.Network import Network
+from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
+ Testcaselib as run
class IntTest:
@@ -23,6 +25,7 @@
hostHandle.startScapy()
def cleanUp(self, main):
+ run.saveOnosDiagsIfFailure(main)
for host in self.hosts:
if self.scapy:
hostHandle = getattr(main, host)