clang-x86-ninja-win10 fixed slash replacement
now only replacing slashes in lines that define paths
diff --git a/buildbot/google/docker/buildbot-windows10-vs2019/Dockerfile b/buildbot/google/docker/buildbot-windows10-vs2019/Dockerfile
index b19884a..49162a2 100644
--- a/buildbot/google/docker/buildbot-windows10-vs2019/Dockerfile
+++ b/buildbot/google/docker/buildbot-windows10-vs2019/Dockerfile
@@ -5,6 +5,7 @@
# copy script to start the agent
COPY run.ps1 .
+COPY fix_buildbot_tac_paths.py .
# Set location for sccache cache
ENV SCCACHE_DIR="C:\volumes\sccache"
diff --git a/buildbot/google/docker/buildbot-windows10-vs2019/VERSION b/buildbot/google/docker/buildbot-windows10-vs2019/VERSION
index b6a7d89..98d9bcb 100644
--- a/buildbot/google/docker/buildbot-windows10-vs2019/VERSION
+++ b/buildbot/google/docker/buildbot-windows10-vs2019/VERSION
@@ -1 +1 @@
-16
+17
diff --git a/buildbot/google/docker/buildbot-windows10-vs2019/fix_buildbot_tac_paths.py b/buildbot/google/docker/buildbot-windows10-vs2019/fix_buildbot_tac_paths.py
new file mode 100644
index 0000000..0c721c6
--- /dev/null
+++ b/buildbot/google/docker/buildbot-windows10-vs2019/fix_buildbot_tac_paths.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python3
+# Replace backward slashes in the paths in a "buildbot.tac" file
+
+import argparse
+import re
+import shutil
+
+
+def fix_slashes(buildbot_tac_path : str):
+ shutil.copy(buildbot_tac_path, buildbot_tac_path + ".bak")
+ result = []
+ with open(buildbot_tac_path) as buildbot_tac_file:
+ buildbot_tac = buildbot_tac_file.readlines()
+ for line in buildbot_tac:
+ if line.lstrip().startswith('basedir'):
+ line = line.replace(r'\\','/')
+ result.append(line)
+ with open(buildbot_tac_path, 'w') as buildbot_tac_file:
+ buildbot_tac_file.writelines(result)
+
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser()
+ parser.add_argument('buildbot_tac_path', help="path of 'buildbot.tac' file")
+ args = parser.parse_args()
+ fix_slashes(args.buildbot_tac_path)
diff --git a/buildbot/google/docker/buildbot-windows10-vs2019/run.ps1 b/buildbot/google/docker/buildbot-windows10-vs2019/run.ps1
index 0030146..e6176f3 100644
--- a/buildbot/google/docker/buildbot-windows10-vs2019/run.ps1
+++ b/buildbot/google/docker/buildbot-windows10-vs2019/run.ps1
@@ -31,15 +31,13 @@
Write-Output "creating worker..."
buildslave create-slave --keepalive=200 Q: `
"lab.llvm.org:9994" "$env:WORKER_NAME" "$WORKER_PASSWORD"
-
# Note: Powershell does NOT exit on non-zero return codes, so we need to check manually.
-if ($LASTEXITCODE -ne 0) { throw "Exit code is $LASTEXITCODE" }
+if ($LASTEXITCODE -ne 0) { throw "Exit code of 'buildslave create' is $LASTEXITCODE" }
# Replace backward slashes with forward slashes on buildbot.tac
# Otherwise Cmake will go into infinite re-configuration loops
-$buildbottac=Get-Content -Path "buildbot.tac"
-$buildbottac=$buildbottac -replace "\\\\", "/"
-$buildbottac | Set-Content -Path "buildbot.tac"
+python C:\buildbot\fix_buildbot_tac_paths.py buildbot.tac
+if ($LASTEXITCODE -ne 0) { throw "Exit code of 'fix_buildbot_tac_paths' is $LASTEXITCODE" }
# start the daemon, as this does not print and logs to std out, run it in the background
Write-Output "starting worker..."
diff --git a/buildbot/google/terraform/main.tf b/buildbot/google/terraform/main.tf
index 6c946d7..2dcfbb0 100644
--- a/buildbot/google/terraform/main.tf
+++ b/buildbot/google/terraform/main.tf
@@ -205,7 +205,7 @@
spec {
container {
- image = "${var.gcp_config.gcr_prefix}/buildbot-windows10-vs2019:16"
+ image = "${var.gcp_config.gcr_prefix}/buildbot-windows10-vs2019:17"
name = "windows10-vs2019"
# reserve "<number of cores>-1" for this image, kubernetes also