From c083b0c24035620ec14db062fff8e62bd689c237 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Tue, 6 Dec 2016 16:47:00 +0000 Subject: [PATCH] Make test case slightly more robust by explicitly passing --sysroot. Otherwise it would change when DEFAULT_SYSROOT is provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288823 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Driver/compilation_database.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Driver/compilation_database.c b/test/Driver/compilation_database.c index bb6c9c7599..15b5f59c84 100644 --- a/test/Driver/compilation_database.c +++ b/test/Driver/compilation_database.c @@ -1,8 +1,8 @@ -// RUN: %clang -MD -MP -c -x c %s -xc++ %s -Wall -MJ - 2>&1 | FileCheck %s +// RUN: %clang -MD -MP --sysroot=somewhere -c -x c %s -xc++ %s -Wall -MJ - 2>&1 | FileCheck %s // RUN: not %clang -c -x c %s -MJ %s/non-existant 2>&1 | FileCheck --check-prefix=ERROR %s -// CHECK: { "directory": "[[CWD:[^"]+]]", "file": "[[SRC:[^"]+[/|\\]compilation_database.c]]", "output": "compilation_database.o", "arguments": ["{{[^"]*}}clang{{[^"]*}}", "-xc", "[[SRC]]", "-c", "-Wall", "--target={{[^"]+}}"]}, -// CHECK: { "directory": "[[CWD:[^"]+]]", "file": "[[SRC:[^"]+[/|\\]compilation_database.c]]", "output": "compilation_database.o", "arguments": ["{{[^"]*}}clang{{[^"]*}}", "-xc++", "[[SRC]]", "-c", "-Wall", "--target={{[^"]+}}"]}, +// CHECK: { "directory": "[[CWD:[^"]+]]", "file": "[[SRC:[^"]+[/|\\]compilation_database.c]]", "output": "compilation_database.o", "arguments": ["{{[^"]*}}clang{{[^"]*}}", "-xc", "[[SRC]]", "--sysroot=somewhere", "-c", "-Wall", "--target={{[^"]+}}"]}, +// CHECK: { "directory": "[[CWD:[^"]+]]", "file": "[[SRC:[^"]+[/|\\]compilation_database.c]]", "output": "compilation_database.o", "arguments": ["{{[^"]*}}clang{{[^"]*}}", "-xc++", "[[SRC]]", "--sysroot=somewhere", "-c", "-Wall", "--target={{[^"]+}}"]}, // ERROR: error: compilation database '{{.*}}/non-existant' could not be opened: int main(void) { -- 2.40.0