@@ -15,7 +15,8 @@ func test() {
15
15
// UNSUPPORTED: OS=windows-msvc
16
16
17
17
// -----------------------------------------------------------------------------
18
- // Test that modifications for frameworks in '-Fsystem' doesn't affect the result.
18
+ // Test that modifications for frameworks in '-Fsystem' doesn't affect the result
19
+ // within a session, and that they are propagated after restarting SourceKit.
19
20
20
21
// RUN: %empty-directory(%t/ModuleCache)
21
22
// RUN: %empty-directory(%t/System/Frameworks)
@@ -69,7 +70,7 @@ func test() {
69
70
// RUN: -shell -- cp -R %S/../Inputs/build_session/Frameworks_modified/FooHelper.framework %t/System/Frameworks/ == \
70
71
// RUN: -shell -- echo '## TWO' == \
71
72
// RUN: -req=sema %s -- %s -D TWO -F %t/Frameworks -Fsystem %t/System/Frameworks -module-cache-path %t/ModuleCache \
72
- // RUN: | tee %t.reponse | %FileCheck %s --check-prefix=CHECK_USER
73
+ // RUN: | %FileCheck %s --check-prefix=CHECK_USER
73
74
74
75
// CHECK_USER-LABEL: ## ONE
75
76
// CHECK_USER-NOT: key.description
@@ -81,3 +82,35 @@ func test() {
81
82
// CHECK_USER: key.severity: source.diagnostic.severity.error,
82
83
// CHECK_USER-NEXT: key.description: "use of unresolved identifier 'fooSubFunc'",
83
84
// CHECK_USER-NOT: key.severity:
85
+
86
+ // -----------------------------------------------------------------------------
87
+ // Test that modifications for frameworks in '-Fsystem' doesn't affect the result
88
+ // across SourceKit sessions *if* '-disable-modules-validate-system-headers' is
89
+ // passed.
90
+
91
+ // RUN: %empty-directory(%t/ModuleCache)
92
+ // RUN: %empty-directory(%t/System/Frameworks)
93
+ // RUN: cp -R %S/../Inputs/build_session/Frameworks/Foo.framework %t/System/Frameworks/
94
+ // RUN: cp -R %S/../Inputs/build_session/Frameworks/FooHelper.framework %t/System/Frameworks/
95
+ // RUN: %sourcekitd-test \
96
+ // RUN: -shell -- echo '## ONE' == \
97
+ // RUN: -req=sema %s -- %s -D ONE -Fsystem %t/System/Frameworks -module-cache-path %t/ModuleCache -Xfrontend -disable-modules-validate-system-headers == \
98
+ // RUN: -shell -- cp -R %S/../Inputs/build_session/Frameworks_modified/Foo.framework %t/System/Frameworks/ == \
99
+ // RUN: -shell -- cp -R %S/../Inputs/build_session/Frameworks_modified/FooHelper.framework %t/System/Frameworks/ == \
100
+ // RUN: -shell -- echo '## TWO' == \
101
+ // RUN: -req=sema %s -- %s -D TWO -Fsystem %t/System/Frameworks -module-cache-path %t/ModuleCache -Xfrontend -disable-modules-validate-system-headers \
102
+ // RUN: | %FileCheck %s --check-prefix=CHECK_DISABLED
103
+ // RUN: sleep 2
104
+ // RUN: %sourcekitd-test \
105
+ // RUN: -shell -- echo '## THREE' == \
106
+ // RUN: -req=sema %s -- %s -D THREE -Fsystem %t/System/Frameworks -module-cache-path %t/ModuleCache -Xfrontend -disable-modules-validate-system-headers \
107
+ // RUN: | %FileCheck %s --check-prefix=CHECK_DISABLED_2
108
+
109
+ // CHECK_DISABLED-LABEL: ## ONE
110
+ // CHECK_DISABLED-NOT: key.description
111
+
112
+ // CHECK_DISABLED-LABEL: ## TWO
113
+ // CHECK_DISABLED-NOT: key.description
114
+
115
+ // CHECK_DISABLED_2-LABEL: ## THREE
116
+ // CHECK_DISABLED_2-NOT: key.description
0 commit comments