//
// RUN: rm -rf %t.cache
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps \
-// RUN: -fimplicit-modules-use-lock -Rmodule-lock \
+// RUN: -fimplicit-modules-use-lock -Rmodule-lock -Rmodule-build \
// RUN: -fmodules-cache-path=%t.cache -I%S/Inputs/system-out-of-date \
// RUN: -fsyntax-only %s -Wnon-modular-include-in-framework-module \
-// RUN: -Werror=non-modular-include-in-framework-module 2>&1 \
-// RUN: | FileCheck %s -check-prefix=CHECK-LOCKS
+// RUN: -Werror=non-modular-include-in-framework-module \
+// RUN: -verify=locks,build
//
// RUN: rm -rf %t.cache
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps \
-// RUN: -fno-implicit-modules-use-lock -Rmodule-lock \
+// RUN: -fno-implicit-modules-use-lock -Rmodule-lock -Rmodule-build \
// RUN: -fmodules-cache-path=%t.cache -I%S/Inputs/system-out-of-date \
// RUN: -fsyntax-only %s -Wnon-modular-include-in-framework-module \
-// RUN: -Werror=non-modular-include-in-framework-module 2>&1 \
-// RUN: | FileCheck %s -check-prefix=CHECK-NO-LOCKS -allow-empty
+// RUN: -Werror=non-modular-include-in-framework-module \
+// RUN: -verify=build
-// CHECK-NO-LOCKS-NOT: remark:
-// CHECK-LOCKS: remark: locking '{{.*}}.pcm' to build module 'X' [-Rmodule-lock]
-@import X;
+@import X; // locks-remark-re {{locking '{{.*}}.pcm' to build module 'X'}} \
+ // build-remark {{building module 'X'}} \
+ // build-remark {{finished building module 'X'}}