Ben Langmuir | 1ecf750 | 2014-05-05 16:58:47 +0000 | [diff] [blame] | 1 | // REQUIRES: shell |
| 2 | // RUN: rm -rf %t |
| 3 | // RUN: mkdir %t |
| 4 | // RUN: echo '// A' > %t/A.h |
Richard Smith | 99891da | 2014-10-14 02:08:30 +0000 | [diff] [blame^] | 5 | // RUN: echo '#include "C.h"' > %t/B.h |
| 6 | // RUN: echo '// C' > %t/C.h |
Ben Langmuir | 1ecf750 | 2014-05-05 16:58:47 +0000 | [diff] [blame] | 7 | // RUN: echo 'module A { header "A.h" }' > %t/module.modulemap |
| 8 | // RUN: echo 'module B { header "B.h" }' >> %t/module.modulemap |
Richard Smith | 99891da | 2014-10-14 02:08:30 +0000 | [diff] [blame^] | 9 | // RUN: echo 'module C { header "C.h" }' >> %t/module.modulemap |
Ben Langmuir | 1ecf750 | 2014-05-05 16:58:47 +0000 | [diff] [blame] | 10 | |
| 11 | // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -verify \ |
Richard Smith | 3be1cb2 | 2014-08-07 00:24:21 +0000 | [diff] [blame] | 12 | // RUN: -I %t -Rmodule-build |
Ben Langmuir | 1ecf750 | 2014-05-05 16:58:47 +0000 | [diff] [blame] | 13 | |
Richard Smith | 99891da | 2014-10-14 02:08:30 +0000 | [diff] [blame^] | 14 | @import A; // expected-remark{{building module 'A' as}} expected-remark {{finished building module 'A'}} |
| 15 | @import B; // expected-remark{{building module 'B' as}} expected-remark {{finished building module 'B'}} |
Ben Langmuir | 1ecf750 | 2014-05-05 16:58:47 +0000 | [diff] [blame] | 16 | @import A; // no diagnostic |
| 17 | @import B; // no diagnostic |
| 18 | |
Richard Smith | 99891da | 2014-10-14 02:08:30 +0000 | [diff] [blame^] | 19 | // RUN: echo ' ' >> %t/C.h |
Ben Langmuir | 1ecf750 | 2014-05-05 16:58:47 +0000 | [diff] [blame] | 20 | // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \ |
Richard Smith | 3be1cb2 | 2014-08-07 00:24:21 +0000 | [diff] [blame] | 21 | // RUN: -Rmodule-build 2>&1 | FileCheck %s |
| 22 | |
Richard Smith | 99891da | 2014-10-14 02:08:30 +0000 | [diff] [blame^] | 23 | // RUN: echo ' ' >> %t/C.h |
Richard Smith | 3be1cb2 | 2014-08-07 00:24:21 +0000 | [diff] [blame] | 24 | // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \ |
| 25 | // RUN: -Reverything 2>&1 | FileCheck %s |
| 26 | |
| 27 | // RUN: echo ' ' >> %t/B.h |
| 28 | // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \ |
Justin Bogner | 69ba330 | 2014-08-07 18:45:21 +0000 | [diff] [blame] | 29 | // RUN: 2>&1 | FileCheck -allow-empty -check-prefix=NO-REMARKS %s |
Richard Smith | 3be1cb2 | 2014-08-07 00:24:21 +0000 | [diff] [blame] | 30 | |
| 31 | // RUN: echo ' ' >> %t/B.h |
| 32 | // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \ |
Justin Bogner | 69ba330 | 2014-08-07 18:45:21 +0000 | [diff] [blame] | 33 | // RUN: -Rmodule-build -Rno-everything 2>&1 | \ |
| 34 | // RUN: FileCheck -allow-empty -check-prefix=NO-REMARKS %s |
Ben Langmuir | 1ecf750 | 2014-05-05 16:58:47 +0000 | [diff] [blame] | 35 | |
| 36 | // CHECK-NOT: building module 'A' |
| 37 | // CHECK: building module 'B' |
Richard Smith | 99891da | 2014-10-14 02:08:30 +0000 | [diff] [blame^] | 38 | // CHECK: building module 'C' |
| 39 | // CHECK: finished building module 'C' |
| 40 | // CHECK: finished building module 'B' |
Justin Bogner | 69ba330 | 2014-08-07 18:45:21 +0000 | [diff] [blame] | 41 | // NO-REMARKS-NOT: building module 'A' |
| 42 | // NO-REMARKS-NOT: building module 'B' |