From d68951ac245150eeefa6e0f4156e4c1b5c9e9325 Mon Sep 17 00:00:00 2001 From: Jan Gelety Date: Tue, 12 Nov 2019 05:27:43 +0100 Subject: Python3: resources and libraries Change-Id: I1392c06b1d64f62b141d24c0d42a8e36913b15e2 Signed-off-by: Jan Gelety --- resources/tools/integrated/check_crc.py | 53 +++++++++++++++++---------------- 1 file changed, 28 insertions(+), 25 deletions(-) (limited to 'resources/tools/integrated') diff --git a/resources/tools/integrated/check_crc.py b/resources/tools/integrated/check_crc.py index 3d5c30a6d6..157bd9e86d 100644 --- a/resources/tools/integrated/check_crc.py +++ b/resources/tools/integrated/check_crc.py @@ -27,38 +27,41 @@ from resources.libraries.python.VppApiCrc import VppApiCrcChecker # TODO: Read FDIO_VPP_DIR environment variable, or some other input, # instead of using hardcoded relative path? -API_DIR = op.normpath(op.join( - op.dirname(op.abspath(__file__)), "..", "..", "..", "..", - "build-root", "install-vpp-native", "vpp", "share", "vpp", "api")) +API_DIR = op.normpath( + op.join( + op.dirname(op.abspath(__file__)), u"..", u"..", u"..", u"..", + u"build-root", u"install-vpp-native", u"vpp", u"share", u"vpp", u"api" + ) +) CHECKER = VppApiCrcChecker(API_DIR) try: CHECKER.report_initial_conflicts(report_missing=True) except RuntimeError as err: - sys.stderr.write("{err!r}\n".format(err=err)) + sys.stderr.write(f"{err!r}\n") sys.stderr.write( - "\n" - "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n" - "\n" - "VPP CSIT API CHECK FAIL!\n" - "\n" - "This means the patch under test has missing messages,\n" - "or messages with unexpected CRCs compared to what CSIT needs.\n" - "Either this Change and/or its ancestors were editing .api files,\n" - "or your chain is not rebased upon the recent enough VPP codebase.\n" - "\n" - "Please rebase the patch to see if that fixes the problem.\n" - "If that fails email csit-dev@lists.fd.io for a new\n" - "operational branch supporting the api changes.\n" - "\n" - "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n" + u"\n" + u"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n" + u"\n" + u"VPP CSIT API CHECK FAIL!\n" + u"\n" + u"This means the patch under test has missing messages,\n" + u"or messages with unexpected CRCs compared to what CSIT needs.\n" + u"Either this Change and/or its ancestors were editing .api files,\n" + u"or your chain is not rebased upon the recent enough VPP codebase.\n" + u"\n" + u"Please rebase the patch to see if that fixes the problem.\n" + u"If that fails email csit-dev@lists.fd.io for a new\n" + u"operational branch supporting the api changes.\n" + u"\n" + u"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n" ) sys.exit(1) else: sys.stderr.write( - "\n" - "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n" - "\n" - "VPP CSIT API CHECK PASS!\n" - "\n" - "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n" + u"\n" + u"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n" + u"\n" + u"VPP CSIT API CHECK PASS!\n" + u"\n" + u"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n" ) -- cgit 1.2.3-korg