[cross-project-tests] Fix invalid escape sequences (#94031)
These generate a SyntaxWarning with Python 3.12.
diff --git a/cross-project-tests/lit.cfg.py b/cross-project-tests/lit.cfg.py
index c2a8bce..66fdd63 100644
--- a/cross-project-tests/lit.cfg.py
+++ b/cross-project-tests/lit.cfg.py
@@ -223,7 +223,7 @@
xcode_lldb_vers = subprocess.check_output(["xcrun", "lldb", "--version"]).decode(
"utf-8"
)
- match = re.search("lldb-(\d+)", xcode_lldb_vers)
+ match = re.search(r"lldb-(\d+)", xcode_lldb_vers)
if match:
apple_lldb_vers = int(match.group(1))
if apple_lldb_vers < 1000:
@@ -247,7 +247,7 @@
if len(gdb_vers_lines) < 1:
print("Unkown GDB version format (too few lines)", file=sys.stderr)
return None
- match = re.search("GNU gdb \(.*?\) ((\d|\.)+)", gdb_vers_lines[0].strip())
+ match = re.search(r"GNU gdb \(.*?\) ((\d|\.)+)", gdb_vers_lines[0].strip())
if match is None:
print(f"Unkown GDB version format: {gdb_vers_lines[0]}", file=sys.stderr)
return None
@@ -261,7 +261,7 @@
# Get the flags passed by the driver and look for -dwarf-version.
cmd = f'{llvm_config.use_llvm_tool("clang")} -g -xc -c - -v -### --target={triple}'
stderr = subprocess.run(cmd.split(), stderr=subprocess.PIPE).stderr.decode()
- match = re.search("-dwarf-version=(\d+)", stderr)
+ match = re.search(r"-dwarf-version=(\d+)", stderr)
if match is None:
print("Cannot determine default dwarf version", file=sys.stderr)
return None