File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -232,3 +232,16 @@ else:
232232for name in ('swift-build' , 'FileCheck' , 'readelf' ):
233233 config .substitutions .append ((' {0} ' .format (name ),
234234 ' unquoted-command-name-{0} ' .format (name )))
235+
236+ # Add substitutions for SourceKit stress tester executables
237+ sk_stress_test_path = lit_config .params .get (
238+ "sk-stress-test" ,
239+ os .path .join (package_path , "usr" , "bin" , "sk-stress-test" ))
240+ sk_swiftc_wrapper_path = lit_config .params .get (
241+ "sk-swiftc-wrapper" ,
242+ os .path .join (package_path , "usr" , "bin" , "sk-swiftc-wrapper" ))
243+
244+ lit_config .note ("testing using 'sk-stress-test': {}" .format (sk_stress_test_path ))
245+ lit_config .note ("testing using 'sk-swiftc-wrapper': {}" .format (sk_swiftc_wrapper_path ))
246+ config .substitutions .append ( ('%{sk-stress-test}' , sk_stress_test_path ) )
247+ config .substitutions .append ( ('%{sk-swiftc-wrapper}' , sk_swiftc_wrapper_path ) )
Original file line number Diff line number Diff line change 1+ // Trivial test for the SourceKit stress tester and compiler wrapper.
2+ //
3+ // REQUIRES: platform=Darwin
4+ //
5+ // RUN: rm -rf %t.dir
6+ // RUN: mkdir -p %t.dir
7+ // RUN: cp %s %t.dir/test.swift
8+ //
9+ // 1) Make sure both exit successfully running over a valid file
10+ // RUN: %{sk-stress-test} %t.dir/test.swift swiftc %t.dir/test.swift
11+ // RUN: %{sk-swiftc-wrapper} %t.dir/test.swift
12+ //
13+ // 2) Make sure the wrapper fails when the underlying compilation fails
14+ // RUN: echo " undefined_symbol " >> %t.dir/test.swift
15+ // RUN: %{not} %{sk-swiftc-wrapper} %t.dir/test.swift
16+ //
17+
18+ func foo() {
19+ print("hello")
20+ }
You can’t perform that action at this time.
0 commit comments