From 3747c75a215f082bc52198a7229e1b1e529d7666 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Mon, 10 Apr 2017 06:30:17 +0200 Subject: make test: automatic "vpp finishes startup" check Add code which checks if vpp doesn't crash/exit immediately after startup to aid debugging stuff like mistyped graph node name or so. Refuse to run tests if the vpp is unable to start, complain loudly and print vpp's stderr at critical log level if this happens to make spotting these problems in jenkins easy. Change-Id: I40d3fbd05c822c0534713bae6bef05ecfb0e0c1d Signed-off-by: Klement Sekera --- test/sanity_run_vpp.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/sanity_run_vpp.py (limited to 'test/sanity_run_vpp.py') diff --git a/test/sanity_run_vpp.py b/test/sanity_run_vpp.py new file mode 100644 index 00000000..527b618f --- /dev/null +++ b/test/sanity_run_vpp.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +from __future__ import print_function +from framework import VppTestCase +from hook import VppDiedError +from sys import exit + + +class SanityTestCase(VppTestCase): + """ Dummy test case used to check if VPP is able to start """ + pass + +if __name__ == '__main__': + rc = 0 + tc = SanityTestCase + try: + tc.setUpClass() + except VppDiedError: + rc = -1 + else: + try: + tc.tearDownClass() + except: + pass + + exit(rc) -- cgit 1.2.3-korg