<div dir="ltr"><div>Hi Douglas,<br><br></div>Sorry about this. It seems to me that the reason for this test failure is the slashes that appear in the -path argument in the log:<br><br><pre><span class="gmail-stdout">"-path" "C:\Buildbot\Slave\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.obj\tools\clang\tools\extra\test\clang-tidy\Output/compilation-database-test"
$ "FileCheck" "-check-prefix=CHECK" "C:\Buildbot\Slave\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\tools\extra\test\clang-tidy\clang-tidy-diff.cpp"<br><br></span></pre><pre><span class="gmail-stdout"><span style="font-family:arial,helvetica,sans-serif">However I'm not sure how to fix this. I'm using slashes as the path separator in the test RUN command. Is there a safer platform independent token I should use instead?</span><br></span></pre></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 17, 2017 at 3:57 PM, Yung, Douglas <span dir="ltr"><<a href="mailto:douglas.yung@sony.com" target="_blank">douglas.yung@sony.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Ehsan,<br>
<br>
Your commit has caused the PS4 Windows bot to go red. Can you take a look?<br>
<br>
<a href="http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/5661" rel="noreferrer" target="_blank">http://lab.llvm.org:8011/<wbr>builders/llvm-clang-lld-x86_<wbr>64-scei-ps4-windows10pro-fast/<wbr>builds/5661</a><br>
<br>
$ "FileCheck" "-check-prefix=CHECK" "C:\Buildbot\Slave\llvm-clang-<wbr>lld-x86_64-scei-ps4-<wbr>windows10pro-fast\llvm.src\<wbr>tools\clang\tools\extra\test\<wbr>clang-tidy\clang-tidy-diff.<wbr>cpp"<br>
# command stderr:<br>
C:\Buildbot\Slave\llvm-clang-<wbr>lld-x86_64-scei-ps4-<wbr>windows10pro-fast\llvm.src\<wbr>tools\clang\tools\extra\test\<wbr>clang-tidy\clang-tidy-diff.<wbr>cpp:17:11: error: expected string not found in input<br>
<br>
// CHECK: [[@LINE-2]]:8: warning: annotate this<br>
<br>
^<br>
<br>
<stdin>:1:1: note: scanning from here<br>
<br>
YAML:1:1: error: Unrecognized escape code!<br>
<br>
^<br>
<br>
<stdin>:1:1: note: with expression "@LINE-2" equal to "15"<br>
<br>
YAML:1:1: error: Unrecognized escape code!<br>
<br>
^<br>
<br>
<stdin>:1:7: note: possible intended match here<br>
<br>
YAML:1:1: error: Unrecognized escape code!<br>
<br>
^<br>
<br>
<br>
error: command failed with exit status: 1<br>
<br>
Douglas Yung<br>
<br>
> -----Original Message-----<br>
> From: cfe-commits [mailto:<a href="mailto:cfe-commits-bounces@lists.llvm.org">cfe-commits-bounces@<wbr>lists.llvm.org</a>] On Behalf Of<br>
> Ehsan Akhgari via cfe-commits<br>
> Sent: Friday, February 17, 2017 11:32<br>
> To: <a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
> Subject: [clang-tools-extra] r295482 - [clang-tidy] Add -path option to clang-<br>
> tidy-diff.py<br>
><br>
> Author: ehsan<br>
> Date: Fri Feb 17 13:31:43 2017<br>
> New Revision: 295482<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=295482&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=295482&view=rev</a><br>
> Log:<br>
> [clang-tidy] Add -path option to clang-tidy-diff.py<br>
><br>
> Summary:<br>
> This flag allows specifying a custom path for the compilation database.<br>
> Unfortunately we can't use the -p flag like other clang-tidy tools because<br>
> it's already taken.<br>
><br>
> Reviewers: alexfh<br>
><br>
> Subscribers: JDevlieghere, cfe-commits<br>
><br>
> Differential Revision: <a href="https://reviews.llvm.org/D29806" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D29806</a><br>
><br>
> Modified:<br>
> clang-tools-extra/trunk/clang-<wbr>tidy/tool/clang-tidy-diff.py<br>
> clang-tools-extra/trunk/test/<wbr>clang-tidy/clang-tidy-diff.cpp<br>
><br>
> Modified: clang-tools-extra/trunk/clang-<wbr>tidy/tool/clang-tidy-diff.py<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/clang-tools-extra/<wbr>trunk/clang-</a><br>
> tidy/tool/clang-tidy-diff.py?<wbr>rev=295482&r1=295481&r2=<wbr>295482&view=diff<br>
> ==============================<wbr>==============================<wbr>==================<br>
> --- clang-tools-extra/trunk/clang-<wbr>tidy/tool/clang-tidy-diff.py (original)<br>
> +++ clang-tools-extra/trunk/clang-<wbr>tidy/tool/clang-tidy-diff.py Fri Feb<br>
> +++ 17 13:31:43 2017<br>
> @@ -55,6 +55,8 @@ def main():<br>
> help='checks filter, when not specified, use clang-tidy<br>
> '<br>
> 'default',<br>
> default='')<br>
> + parser.add_argument('-path', dest='build_path',<br>
> + help='Path used to read a compile command<br>
> + database.')<br>
> parser.add_argument('-extra-<wbr>arg', dest='extra_arg',<br>
> action='append', default=[],<br>
> help='Additional argument to append to the compiler '<br>
> @@ -124,6 +126,8 @@ def main():<br>
> command.append('-checks=' + quote + args.checks + quote)<br>
> if args.quiet:<br>
> command.append('-quiet')<br>
> + if args.build_path is not None:<br>
> + command.append('-p=%s' % args.build_path)<br>
> command.extend(lines_by_file.<wbr>keys())<br>
> for arg in args.extra_arg:<br>
> command.append('-extra-arg=%s' % arg)<br>
><br>
> Modified: clang-tools-extra/trunk/test/<wbr>clang-tidy/clang-tidy-diff.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/clang-tools-extra/<wbr>trunk/test/clang-</a><br>
> tidy/clang-tidy-diff.cpp?rev=<wbr>295482&r1=295481&r2=295482&<wbr>view=diff<br>
> ==============================<wbr>==============================<wbr>==================<br>
> --- clang-tools-extra/trunk/test/<wbr>clang-tidy/clang-tidy-diff.cpp (original)<br>
> +++ clang-tools-extra/trunk/test/<wbr>clang-tidy/clang-tidy-diff.cpp Fri Feb<br>
> +++ 17 13:31:43 2017<br>
> @@ -2,6 +2,9 @@<br>
> // RUN: clang-tidy -checks=-*,modernize-use-<wbr>override %t.cpp -- -std=c++11 |<br>
> FileCheck -check-prefix=CHECK-SANITY %s // RUN: not diff -U0 %s %t.cpp |<br>
> %clang_tidy_diff -checks=-*,modernize-use-<wbr>override -- -std=c++11 2>&1 |<br>
> FileCheck %s // RUN: not diff -U0 %s %t.cpp | %clang_tidy_diff -checks=-<br>
> *,modernize-use-override -quiet -- -std=c++11 2>&1 | FileCheck -check-<br>
> prefix=CHECK-QUIET %s<br>
> +// RUN: mkdir -p %T/compilation-database-test/ // RUN: echo<br>
> +'[{"directory": "%T", "command": "clang++ -o test.o -std=c++11 %t.cpp",<br>
> +"file": "%t.cpp"}]' ><br>
> +%T/compilation-database-test/<wbr>compile_commands.json<br>
> +// RUN: not diff -U0 %s %t.cpp | %clang_tidy_diff<br>
> +-checks=-*,modernize-use-<wbr>override -path %T/compilation-database-test<br>
> +2>&1 | FileCheck -check-prefix=CHECK %s<br>
> struct A {<br>
> virtual void f() {}<br>
> virtual void g() {}<br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Ehsan<br></div></div>
</div>