[libc++abi] Fix remote execution of .sh.cpp tests
This aims to fix test failures on the following buildbots:
- http://lab.llvm.org:8011/builders/llvm-clang-win-x-armv7l
- http://lab.llvm.org:8011/builders/llvm-clang-win-x-aarch64
Differential Revision: https://reviews.llvm.org/D77190
diff --git a/libcxx/utils/ssh.py b/libcxx/utils/ssh.py
index 02e1e3b..86ef5cf 100644
--- a/libcxx/utils/ssh.py
+++ b/libcxx/utils/ssh.py
@@ -15,6 +15,7 @@
import argparse
import os
+import posixpath
import subprocess
import sys
@@ -53,7 +54,7 @@
scp = lambda src, dst: ['scp', '-oBatchMode=yes', '-r', src, '{}:{}'.format(args.host, dst)]
# Create a temporary directory where the test will be run
- tmp = subprocess.check_output(ssh('mktemp -d /tmp/libcxx.XXXXXXXXXX')).strip()
+ tmp = subprocess.check_output(ssh('mktemp -d /tmp/libcxx.XXXXXXXXXX'), universal_newlines=True).strip()
# Ensure the test dependencies exist and scp them to the temporary directory.
# Test dependencies can be either files or directories, so the `scp` command
@@ -68,7 +69,7 @@
# We know it has been copied to the remote host when we handled the test
# dependencies above.
if exe:
- exe = os.path.join(tmp, os.path.basename(exe))
+ exe = posixpath.join(tmp, os.path.basename(exe))
# If there's an executable, make sure it has 'execute' permissions on the
# remote host. The host that compiled the executable might not have a notion