Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 36 additions & 34 deletions clang/test/Driver/config-file3.c

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions clang/test/Driver/config-zos.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// REQUIRES: shell
// Needs symlinks
// UNSUPPORTED: system-windows
// REQUIRES: systemz-registered-target

// RUN: unset CLANG_NO_DEFAULT_CONFIG
// RUN: rm -rf %t && mkdir %t

// RUN: mkdir -p %t/testbin
// RUN: mkdir -p %t/etc
// RUN: ln -s %clang %t/testbin/clang
// RUN: echo "-DXYZ=789" >%t/etc/clang.cfg
// RUN: %t/testbin/clang --target=s390x-ibm-zos -c -### -no-canonical-prefixes %s 2>&1 | FileCheck -DDIR=%t %s
// RUN: %t/testbin/clang --target=s390x-ibm-zos -c -### -no-canonical-prefixes --no-default-config %s 2>&1 | FileCheck -check-prefix=NOCONFIG %s
// RUN: env -u CLANG_NO_DEFAULT_CONFIG %t/testbin/clang --target=s390x-ibm-zos -c -### -no-canonical-prefixes %s 2>&1 | FileCheck -DDIR=%t %s
// RUN: env -u CLANG_NO_DEFAULT_CONFIG %t/testbin/clang --target=s390x-ibm-zos -c -### -no-canonical-prefixes --no-default-config %s 2>&1 | FileCheck -check-prefix=NOCONFIG %s
//
// CHECK: Configuration file: [[DIR]]/etc/clang.cfg
// CHECK: "-D" "XYZ=789"
Expand Down
12 changes: 5 additions & 7 deletions clang/test/Driver/config-zos1.c
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
// REQUIRES: shell
// UNSUPPORTED: system-windows
// REQUIRES: systemz-registered-target

// RUN: unset CLANG_NO_DEFAULT_CONFIG

// RUN: export CLANG_CONFIG_PATH=%S/Inputs/config-zos
// RUN: %clang --target=s390x-ibm-zos -c -### %s 2>&1 | FileCheck %s
// RUN: env -u CLANG_NO_DEFAULT_CONFIG %clang --target=s390x-ibm-zos -c -### %s 2>&1 | FileCheck %s
// CHECK: Configuration file: {{.*}}/Inputs/config-zos/clang.cfg
// CHECK: "-D" "ABC=123"

// RUN: export CLANG_CONFIG_PATH=%S/Inputs/config-zos/def.cfg
// RUN: %clang --target=s390x-ibm-zos -c -### %s 2>&1 | FileCheck %s -check-prefix=CHECK-DEF
// RUN: env -u CLANG_NO_DEFAULT_CONFIG %clang --target=s390x-ibm-zos -c -### %s 2>&1 | FileCheck %s -check-prefix=CHECK-DEF
// CHECK-DEF: Configuration file: {{.*}}/Inputs/config-zos/def.cfg
// CHECK-DEF: "-D" "DEF=456"

// RUN: export CLANG_CONFIG_PATH=%S/Inputs/config-zos/Garbage
// RUN: not %clang --target=s390x-ibm-zos -c -### %s 2>&1 | FileCheck %s -check-prefix=CHECK-ERR
// RUN: env -u CLANG_NO_DEFAULT_CONFIG not %clang --target=s390x-ibm-zos -c -### %s 2>&1 | FileCheck %s -check-prefix=CHECK-ERR
// CHECK-ERR: error: configuration file '{{.*}}/Inputs/config-zos/Garbage' cannot be found

// The directory exists but no clang.cfg in it
// RUN: export CLANG_CONFIG_PATH=%S/Inputs/config-zos/tst
// RUN: not %clang --target=s390x-ibm-zos -c -### %s 2>&1 | FileCheck %s -check-prefix=CHECK-ERRDIR
// RUN: env -u CLANG_NO_DEFAULT_CONFIG not %clang --target=s390x-ibm-zos -c -### %s 2>&1 | FileCheck %s -check-prefix=CHECK-ERRDIR
// CHECK-ERRDIR: error: configuration file '{{.*}}/Inputs/config-zos/tst/clang.cfg' cannot be found
4 changes: 2 additions & 2 deletions clang/test/Driver/coverage.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// GCNO-LOCATION-REL: "-coverage-notes-file={{.*}}{{/|\\\\}}foo/bar.gcno"

/// GCC allows PWD to change the paths.
// RUN: %if system-linux %{ PWD=/proc/self/cwd %clang -### -c --coverage %s -o foo/bar.o 2>&1 | FileCheck --check-prefix=PWD %s %}
// RUN: %if system-linux %{ env PWD=/proc/self/cwd %clang -### -c --coverage %s -o foo/bar.o 2>&1 | FileCheck --check-prefix=PWD %s %}
// PWD: "-coverage-notes-file=/proc/self/cwd/foo/bar.gcno" "-coverage-data-file=/proc/self/cwd/foo/bar.gcda"

/// Don't warn -Wunused-command-line-argument.
Expand Down Expand Up @@ -50,6 +50,6 @@
// LINK2: -cc1{{.*}} "-coverage-notes-file={{.*}}{{/|\\\\}}f/gb.gcno" "-coverage-data-file={{.*}}{{/|\\\\}}f/gb.gcda"

/// GCC allows PWD to change the paths.
// RUN: %if system-linux %{ PWD=/proc/self/cwd %clang -### --coverage d/a.c d/b.c -o e/x -fprofile-dir=f 2>&1 | FileCheck %s --check-prefix=LINK3 %}
// RUN: %if system-linux %{ env PWD=/proc/self/cwd %clang -### --coverage d/a.c d/b.c -o e/x -fprofile-dir=f 2>&1 | FileCheck %s --check-prefix=LINK3 %}
// LINK3: -cc1{{.*}} "-coverage-notes-file=/proc/self/cwd/e/x-a.gcno" "-coverage-data-file=f/proc/self/cwd/e/x-a.gcda"
// LINK3: -cc1{{.*}} "-coverage-notes-file=/proc/self/cwd/e/x-b.gcno" "-coverage-data-file=f/proc/self/cwd/e/x-b.gcda"
6 changes: 4 additions & 2 deletions clang/test/Modules/crash-vfs-path-symlink-component.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// REQUIRES: crash-recovery, shell
// Needs symlinks
// UNSUPPORTED: system-windows
// REQUIRES: crash-recovery

// FIXME: This XFAIL is cargo-culted from crash-report.c. Do we need it?
// XFAIL: target={{.*-windows-gnu}}
Expand Down Expand Up @@ -59,7 +61,7 @@
// %/t/i directory containing the symlink component.

// RUN: rm -rf %/t/i
// RUN: unset FORCE_CLANG_DIAGNOSTICS_CRASH
// RUN: env -u FORCE_CLANG_DIAGNOSTICS_CRASH \
// RUN: %clang -E %s -I %/t/i -isysroot %/t/sysroot/ \
// RUN: -ivfsoverlay %t/crash-vfs-*.cache/vfs/vfs.yaml -fmodules \
// RUN: -fmodules-cache-path=%t/m/ 2>&1 \
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Modules/crash-vfs-path-traversal.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// REQUIRES: crash-recovery, shell
// REQUIRES: crash-recovery
// UNSUPPORTED: ms-sdk, target={{.*-(ps4|ps5)}}

// FIXME: Canonicalizing paths to remove relative traversal components
Expand Down Expand Up @@ -57,7 +57,7 @@
// RUN: sed -e "s@usr/include@usr/include/../include@g" \
// RUN: %t/crash-vfs-*.cache/vfs/vfs.yaml > %t/vfs.yaml
// RUN: cp %t/vfs.yaml %t/crash-vfs-*.cache/vfs/vfs.yaml
// RUN: unset FORCE_CLANG_DIAGNOSTICS_CRASH
// RUN: env -u FORCE_CLANG_DIAGNOSTICS_CRASH \
// RUN: %clang -E %s -I %S/Inputs/crash-recovery -isysroot %/t/i/ \
// RUN: -ivfsoverlay %t/crash-vfs-*.cache/vfs/vfs.yaml -fmodules \
// RUN: -fmodules-cache-path=%t/m/ 2>&1 \
Expand Down
5 changes: 3 additions & 2 deletions clang/test/Modules/crash-vfs-relative-overlay.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: crash-recovery, shell
// UNSUPPORTED: system-windows
// REQUIRES: crash-recovery

// FIXME: This XFAIL is cargo-culted from crash-report.c. Do we need it?
// XFAIL: target={{.*-windows-gnu}}
Expand Down Expand Up @@ -52,7 +53,7 @@
// Test that reading the YAML file will yield the correct path after
// the overlay dir is prefixed to access headers in .cache/vfs directory.

// RUN: unset FORCE_CLANG_DIAGNOSTICS_CRASH
// RUN: env -u FORCE_CLANG_DIAGNOSTICS_CRASH \
// RUN: %clang -E %s -I %S/Inputs/crash-recovery/usr/include -isysroot %/t/i/ \
// RUN: -ivfsoverlay %t/crash-vfs-*.cache/vfs/vfs.yaml -fmodules \
// RUN: -fmodules-cache-path=%t/m/ 2>&1 \
Expand Down