On 05/08/2014 22:49, Reid Kleckner wrote:
Author: rnk
Date: Tue Aug 5 15:49:12 2014
New Revision: 214924
URL: http://llvm.org/viewvc/llvm-project?rev=214924&view=rev
Log:
Make crash diagnostics on Windows the tiniest bit more useful
This escapes any backslashes in the executable path and fixes an issue
with a trailing quote when the main file name had to be quoted during
printing.
It's impossible to test this without putting backslashes or quotes into
the executable path, so I didn't add automated tests.
The crash diagnostics are still only useful if you're using bash on
Windows, though. This should probably be writing a batch file instead.
This also broke the lnt nightly testers.
I now get:
mysandbox/bin/lnt runtest nt --sandbox nt --cc build/bin/clang --cxx
build/bin/clang++ --test-suite test-suite/
--only-test=MultiSource/Benchmarks/MallocBench/gs
Traceback (most recent call last):
File "mysandbox/bin/lnt", line 9, in <module>
load_entry_point('LNT==0.4.1dev', 'console_scripts', 'lnt')()
File "/home/grosser/Projects/polly/lnt/lnt/lnttool/main.py", line
443, in main
return tool.main(*args, **kwargs)
File "/home/grosser/Projects/polly/lnt/lnt/util/multitool.py", line
60, in main
self.commands[cmd]('%s %s' % (os.path.basename(args[0]), cmd),
args[2:])
File "/home/grosser/Projects/polly/lnt/lnt/lnttool/main.py", line
155, in action_runtest
test_instance.run_test('%s %s' % (name, test_name), args)
File "/home/grosser/Projects/polly/lnt/lnt/tests/nt.py", line 1491,
in run_test
report = run_test(nick, None, config)
File "/home/grosser/Projects/polly/lnt/lnt/tests/nt.py", line 847, in
run_test
make_variables, public_make_variables =
config.compute_run_make_variables()
File "/home/grosser/Projects/polly/lnt/lnt/tests/nt.py", line 188, in
compute_run_make_variables
cc_info = self.cc_info
File "/home/grosser/Projects/polly/lnt/lnt/tests/nt.py", line 145, in
cc_info
self.target_flags)
File
"/home/grosser/Projects/polly/lnt/lnt/testing/util/compilers.py", line
74, in get_cc_info
cc1_binary, = m.groups()
AttributeError: 'NoneType' object has no attribute 'groups'
It seems the reason is that a white space at the beginning of the last
line of 'clang -v -E -x c /dev/null -###' is not longer emitted, but LNT
seems to match for exactly this white space. I am not sure if and why
this white space was there and if it carried some meaning, but in case
this change on the clang side was intentional, I attached a patch to fix
LNT.
Cheers,
Tobias
>From 02608ecb8909d4b4b5db7a5b50529eccd75d9477 Mon Sep 17 00:00:00 2001
From: Tobias Grosser <[email protected]>
Date: Thu, 7 Aug 2014 00:21:50 +0200
Subject: [PATCH] Fix LNT after Reid's changes
---
lnt/testing/util/compilers.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lnt/testing/util/compilers.py b/lnt/testing/util/compilers.py
index ffdd061..43406b0 100644
--- a/lnt/testing/util/compilers.py
+++ b/lnt/testing/util/compilers.py
@@ -67,7 +67,7 @@ def get_cc_info(path, cc_flags=[]):
if ' version ' in ln:
version_ln = ln
elif 'cc1' in ln or 'clang-cc' in ln:
- m = re.match(r' "?([^"]*)"?.*"?-E"?.*', ln)
+ m = re.match(r' ?"?([^"]*)"?.*"?-E"?.*', ln)
if not m:
error("unable to determine cc1 binary: %r: %r" % (cc, ln))
cc1_binary, = m.groups()
--
1.8.3.2
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits