mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 14:01:57 -09:00
support/testing: consistently use raw strings for re.compile
Otherwise Python 3.x flake8 complains with:
W605 invalid escape sequence '\s'
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Titouan Christophe <titouan.christophe@railnova.eu>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit b0078c058a)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
0d5b46ecfe
commit
0134c34c85
@@ -78,7 +78,7 @@ def get_elf_arch_tag(builddir, prefix, fpath, tag):
|
|||||||
cmd = ["host/bin/{}-readelf".format(prefix),
|
cmd = ["host/bin/{}-readelf".format(prefix),
|
||||||
"-A", os.path.join("target", fpath)]
|
"-A", os.path.join("target", fpath)]
|
||||||
out = run_cmd_on_host(builddir, cmd)
|
out = run_cmd_on_host(builddir, cmd)
|
||||||
regexp = re.compile("^ {}: (.*)$".format(tag))
|
regexp = re.compile(r"^ {}: (.*)$".format(tag))
|
||||||
for line in out.splitlines():
|
for line in out.splitlines():
|
||||||
m = regexp.match(line)
|
m = regexp.match(line)
|
||||||
if not m:
|
if not m:
|
||||||
@@ -105,7 +105,7 @@ def get_elf_prog_interpreter(builddir, prefix, fpath):
|
|||||||
cmd = ["host/bin/{}-readelf".format(prefix),
|
cmd = ["host/bin/{}-readelf".format(prefix),
|
||||||
"-l", os.path.join("target", fpath)]
|
"-l", os.path.join("target", fpath)]
|
||||||
out = run_cmd_on_host(builddir, cmd)
|
out = run_cmd_on_host(builddir, cmd)
|
||||||
regexp = re.compile("^ *\[Requesting program interpreter: (.*)\]$")
|
regexp = re.compile(r"^ *\[Requesting program interpreter: (.*)\]$")
|
||||||
for line in out.splitlines():
|
for line in out.splitlines():
|
||||||
m = regexp.match(line)
|
m = regexp.match(line)
|
||||||
if not m:
|
if not m:
|
||||||
|
|||||||
Reference in New Issue
Block a user