X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fsanity_run_vpp.py;h=5e2b3c1f92becc8cf2b4874ab0129231442b9df9;hb=3f245e687c6bd837dcf7c6734aeed788bdbb4220;hp=4b21de12dfed2419bb7053b704462b4fad5a942b;hpb=558ceabc6c08f275ce6c6e7ff295e74272eb851a;p=vpp.git diff --git a/test/sanity_run_vpp.py b/test/sanity_run_vpp.py index 4b21de12dfe..5e2b3c1f92b 100644 --- a/test/sanity_run_vpp.py +++ b/test/sanity_run_vpp.py @@ -8,7 +8,8 @@ from framework import VppDiedError, VppTestCase, KeepAliveReporter class SanityTestCase(VppTestCase): - """ Sanity test case - verify whether VPP is able to start """ + """Sanity test case - verify whether VPP is able to start""" + cpus = [0] # don't ask to debug SanityTestCase @@ -24,7 +25,7 @@ class SanityTestCase(VppTestCase): pass -if __name__ == '__main__': +def main(): rc = 0 tc = SanityTestCase x, y = Pipe() @@ -43,8 +44,11 @@ if __name__ == '__main__': y.close() if rc == 0: - print('Sanity test case passed.') + print("Sanity test case passed.") else: - print('Sanity test case failed.') + print("Sanity test case failed.") + return rc + - sys.exit(rc) +if __name__ == "__main__": + sys.exit(main())