1 // REQUIRES: shell 2 // REQUIRES: systemz-registered-target 3 4 // RUN: unset CLANG_NO_DEFAULT_CONFIG 5 6 // RUN: export CLANG_CONFIG_PATH=%S/Inputs/config-zos 7 // RUN: %clang --target=s390x-ibm-zos -c -### %s 2>&1 | FileCheck %s 8 // CHECK: Configuration file: {{.*}}/Inputs/config-zos/clang.cfg 9 // CHECK: "-D" "ABC=123" 10 11 // RUN: export CLANG_CONFIG_PATH=%S/Inputs/config-zos/def.cfg 12 // RUN: %clang --target=s390x-ibm-zos -c -### %s 2>&1 | FileCheck %s -check-prefix=CHECK-DEF 13 // CHECK-DEF: Configuration file: {{.*}}/Inputs/config-zos/def.cfg 14 // CHECK-DEF: "-D" "DEF=456" 15 16 // RUN: export CLANG_CONFIG_PATH=%S/Inputs/config-zos/Garbage 17 // RUN: not %clang --target=s390x-ibm-zos -c -### %s 2>&1 | FileCheck %s -check-prefix=CHECK-ERR 18 // CHECK-ERR: error: configuration file '{{.*}}/Inputs/config-zos/Garbage' cannot be found 19 20 // The directory exists but no clang.cfg in it 21 // RUN: export CLANG_CONFIG_PATH=%S/Inputs/config-zos/tst 22 // RUN: not %clang --target=s390x-ibm-zos -c -### %s 2>&1 | FileCheck %s -check-prefix=CHECK-ERRDIR 23 // CHECK-ERRDIR: error: configuration file '{{.*}}/Inputs/config-zos/tst/clang.cfg' cannot be found 24