Commit ffc26bc3 authored by Karol Latecki's avatar Karol Latecki Committed by Darek Stojaczyk
Browse files

test/vhost: fix pep8 W605 warnings in python scripts



Latest pep8 versions detect regex syntax as W605 wargnins -
"Invalid escape sequence".

Adding "r" prefix to regex string fixes this.

Change-Id: I82cd9c260e3c5242ed3c9886a0f6c8ac77daf465
Signed-off-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457923


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 5089a9c5
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -8,8 +8,8 @@ import collections
os.chdir(os.path.join(os.path.dirname(sys.argv[0]), "results"))

scsi_logs = filter(lambda x: x.endswith(".log"), os.listdir("./"))
scsi_1_pattern = re.compile("(ASSERTION\s[1-9][\d+]?\.\d+\s)(.+\s)([\w\W]+?)(Result:\s)(\w+)", re.I | re.M)
scsi_2_pattern = re.compile("(?:Start:\s)(ASSERTION:\s)?(.+)(?:,.+=\s)([\w\W]+?)(End:\s)(\w+)(,.*)", re.I | re.M)
scsi_1_pattern = re.compile(r"(ASSERTION\s[1-9][\d+]?\.\d+\s)(.+\s)([\w\W]+?)(Result:\s)(\w+)", re.I | re.M)
scsi_2_pattern = re.compile(r"(?:Start:\s)(ASSERTION:\s)?(.+)(?:,.+=\s)([\w\W]+?)(End:\s)(\w+)(,.*)", re.I | re.M)
fails = []
warns = []

@@ -64,8 +64,8 @@ for log in scsi_logs:

    # Go through output for each test from log file; parse and save to dict
    for m in matches_found:
        test_name = re.sub("\s+", "_", (m[0] + m[1]).strip())
        test_name = re.sub("[():]", "", test_name)
        test_name = re.sub(r"\s+", "_", (m[0] + m[1]).strip())
        test_name = re.sub(r"[():]", "", test_name)
        test_name = test_name[0:-1] if "." in test_name[-1] else test_name
        tc_result = m[4].upper()