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: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457923
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Karol Latecki 2019-06-13 09:17:08 +02:00 committed by Darek Stojaczyk
parent 5089a9c5f9
commit ffc26bc3b6

View File

@ -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()