metrics: fix build on Windows
Change-Id: Ia9bff58e6d856cab8919ffde752195e2e03fc8c0
diff --git a/tools/gen_merged_sql_metrics.py b/tools/gen_merged_sql_metrics.py
index 319d0d3..e806be6 100755
--- a/tools/gen_merged_sql_metrics.py
+++ b/tools/gen_merged_sql_metrics.py
@@ -104,6 +104,9 @@
for path in sql_outputs.keys():
name = os.path.basename(path)
variable = filename_to_variable(os.path.splitext(name)[0])
+
+ # This is for Windows which has \ as a path separator.
+ path = path.replace("\\", "\\\\")
output.write('\n {{"{}", {}}},\n'.format(path, variable))
output.write("};\n")