brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.8 KiB · dc4fcde Raw
48 lines · c
1//--- '--config' must be followed by config file name.2//3// RUN: not %clang --config 2>&1 | FileCheck %s -check-prefix CHECK-MISSING-FILE4// CHECK-MISSING-FILE: argument to '--config' is missing (expected 1 value)5 6 7//--- Argument of '--config' must be existing file, if it is specified by path.8//9// RUN: not %clang --config somewhere/nonexistent-config-file 2>&1 | FileCheck -DMSG=%errc_ENOENT %s -check-prefix CHECK-NONEXISTENT10// CHECK-NONEXISTENT: configuration file '{{.*}}somewhere{{.}}nonexistent-config-file' cannot be opened: [[MSG]]11 12 13//--- All '--config' arguments must be existing files.14//15// RUN: not %clang --config %S/Inputs/config-4.cfg --config somewhere/nonexistent-config-file 2>&1 | FileCheck -DMSG=%errc_ENOENT %s -check-prefix CHECK-NONEXISTENT16 17 18//--- Argument of '--config' must exist somewhere in well-known directories, if it is specified by bare name.19//20// RUN: not %clang --config-system-dir= --config-user-dir= --config nonexistent-config-file.cfg 2>&1 | FileCheck %s -check-prefix CHECK-NOTFOUND021// CHECK-NOTFOUND0: configuration file 'nonexistent-config-file.cfg' cannot be found22// CHECK-NOTFOUND0-NEXT: was searched for in the directory:23// CHECK-NOTFOUND0-NOT: was searched for in the directory:24//25// RUN: not %clang --config-system-dir= --config-user-dir=%S/Inputs/config2 --config nonexistent-config-file.cfg 2>&1 | FileCheck %s -check-prefix CHECK-NOTFOUND126// CHECK-NOTFOUND1: configuration file 'nonexistent-config-file.cfg' cannot be found27// CHECK-NOTFOUND1-NEXT: was searched for in the directory: {{.*}}/Inputs/config228// CHECK-NOTFOUND1-NEXT: was searched for in the directory:29// CHECK-NOTFOUND1-NOT: was searched for in the directory:30//31// RUN: not %clang --config-system-dir=%S/Inputs/config --config-user-dir= --config nonexistent-config-file.cfg 2>&1 | FileCheck %s -check-prefix CHECK-NOTFOUND232// CHECK-NOTFOUND2: configuration file 'nonexistent-config-file.cfg' cannot be found33// CHECK-NOTFOUND2-NEXT: was searched for in the directory: {{.*}}/Inputs/config34// CHECK-NOTFOUND2-NEXT: was searched for in the directory:35// CHECK-NOTFOUND2-NOT: was searched for in the directory:36//37// RUN: not %clang --config-system-dir=%S/Inputs/config --config-user-dir=%S/Inputs/config2 --config nonexistent-config-file.cfg 2>&1 | FileCheck %s -check-prefix CHECK-NOTFOUND338// CHECK-NOTFOUND3: configuration file 'nonexistent-config-file.cfg' cannot be found39// CHECK-NOTFOUND3-NEXT: was searched for in the directory: {{.*}}/Inputs/config240// CHECK-NOTFOUND3-NEXT: was searched for in the directory: {{.*}}/Inputs/config41// CHECK-NOTFOUND3-NEXT: was searched for in the directory:42 43 44//--- Argument in config file cannot cross the file boundary45//46// RUN: not %clang --config %S/Inputs/config-5.cfg x86_64-unknown-linux-gnu -c %s 2>&1 | FileCheck %s -check-prefix CHECK-CROSS47// CHECK-CROSS: error: argument to '-target' is missing48