summaryrefslogtreecommitdiffstats
path: root/debuginfo-tests
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2019-11-01 11:47:53 -0700
committerReid Kleckner <rnk@google.com>2019-11-05 10:49:57 -0800
commit63f49465c3268e59ce2dc02345da187393adabd7 (patch)
treee0032bb1f60d8b2c471b13d0d46d29a69be60b7e /debuginfo-tests
parent7035ea6e3e4371fff223a3a8f660ec149a954876 (diff)
downloadbcm5719-llvm-63f49465c3268e59ce2dc02345da187393adabd7.tar.gz
bcm5719-llvm-63f49465c3268e59ce2dc02345da187393adabd7.zip
[dexter] Fix feature tests on Windows
First, add LLD as a dependency on Windows. The windows batch scripts pass -fuse-ld=lld, so they need it. Second, decode builder stdout/stderr even if the command fails. Otherwise it gets printed as b'line 1\n\rline 2\n\r'. Last, make the batch script one line less noisy. We might want to try to do more here, though. It would be nice if we could get as close to possible as lit, where you can literally copy & paste the failing command to re-run it. With the two changes above, now the feature tests that use clang++.bat pass for me. The clang-cl_vs2015 ones still fail, and I'll fix them separately. Reviewers: jmorse Differential Revision: https://reviews.llvm.org/D69725
Diffstat (limited to 'debuginfo-tests')
-rw-r--r--debuginfo-tests/CMakeLists.txt5
-rw-r--r--debuginfo-tests/dexter/dex/builder/Builder.py4
-rw-r--r--debuginfo-tests/dexter/dex/builder/scripts/windows/clang.bat2
3 files changed, 9 insertions, 2 deletions
diff --git a/debuginfo-tests/CMakeLists.txt b/debuginfo-tests/CMakeLists.txt
index 68ce6398445..025f468c48a 100644
--- a/debuginfo-tests/CMakeLists.txt
+++ b/debuginfo-tests/CMakeLists.txt
@@ -13,6 +13,11 @@ set(DEBUGINFO_TEST_DEPS
not
)
+# The Windows builder scripts pass -fuse-ld=lld.
+if (WIN32)
+ set(DEBUGINFO_TEST_DEPS ${DEBUGINFO_TEST_DEPS} lld)
+endif()
+
# If we don't already have Python 3, throw away any previous results and try to
# find it again.
set(DEBUGINFO_UNSET_PYTHON3 OFF)
diff --git a/debuginfo-tests/dexter/dex/builder/Builder.py b/debuginfo-tests/dexter/dex/builder/Builder.py
index a2bab863568..153c7685a23 100644
--- a/debuginfo-tests/dexter/dex/builder/Builder.py
+++ b/debuginfo-tests/dexter/dex/builder/Builder.py
@@ -80,12 +80,14 @@ def run_external_build_script(context, script_path, source_files,
stderr=subprocess.PIPE)
out, err = process.communicate()
returncode = process.returncode
+ out = out.decode('utf-8')
+ err = err.decode('utf-8')
if returncode != 0:
raise BuildScriptException(
'{}: failed with returncode {}.\nstdout:\n{}\n\nstderr:\n{}\n'.
format(script_path, returncode, out, err),
script_error=err)
- return out.decode('utf-8'), err.decode('utf-8'), builderIR
+ return out, err, builderIR
except OSError as e:
raise BuildScriptException('{}: {}'.format(e.strerror, script_path))
diff --git a/debuginfo-tests/dexter/dex/builder/scripts/windows/clang.bat b/debuginfo-tests/dexter/dex/builder/scripts/windows/clang.bat
index a83e4d4c1bb..4aa9e28a601 100644
--- a/debuginfo-tests/dexter/dex/builder/scripts/windows/clang.bat
+++ b/debuginfo-tests/dexter/dex/builder/scripts/windows/clang.bat
@@ -1,4 +1,4 @@
-setlocal EnableDelayedExpansion
+@setlocal EnableDelayedExpansion
for %%I in (%SOURCE_INDEXES%) do (
%PATHTOCLANGPP% -fuse-ld=lld -c !COMPILER_OPTIONS_%%I! !SOURCE_FILE_%%I! -o !OBJECT_FILE_%%I!
OpenPOWER on IntegriCloud