[PATCH] D27504: Compilation database test: don't try to output to CWD

Benjamin Kramer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 7 01:24:07 PST 2016


bkramer accepted this revision.
bkramer added a comment.
This revision is now accepted and ready to land.

Annoying. This test really shouldn't generate binary object files.

Can we check in this patch now to unblock stuff and then look into how to do a dry run with -MJ? Usually driver tests use `-###` for that but the code for -MJ explicitly disables itself when `-###` is found on the command line.



================
Comment at: test/Driver/compilation_database.c:2
+// RUN: cd "%T" && %clang -MD -MP --sysroot=somewhere -c -x c %s -xc++ %s -Wall -MJ - -no-canonical-prefixes 2>&1 | FileCheck %s
+// RUN: cd "%T" && not %clang -c -x c %s -MJ %s/non-existant -no-canonical-prefixes 2>&1 | FileCheck --check-prefix=ERROR %s
 
----------------
You can hoist the cd %T to a separate RUN line at the top instead of duplicating it.


https://reviews.llvm.org/D27504





More information about the cfe-commits mailing list