File tree Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -313,6 +313,8 @@ Other substitutions:
313
313
* ``%platform-sdk-overlay-dir ``: absolute path of the directory where the SDK
314
314
overlay module files for the target platform are stored.
315
315
316
+ * ``%{python} ``: run the same Python interpreter that's being used to run the
317
+ current ``lit `` test.
316
318
317
319
When writing a test where output (or IR, SIL) depends on the bitness of the
318
320
target CPU, use this pattern::
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import os
22
22
import platform
23
23
import re
24
24
import subprocess
25
+ import sys
25
26
import tempfile
26
27
27
28
import lit .formats
@@ -271,6 +272,7 @@ completion_cache_path = tempfile.mkdtemp(prefix="swift-testsuite-completion-cach
271
272
ccp_opt = "-completion-cache-path %r" % completion_cache_path
272
273
lit_config .note ("Using code completion cache: " + completion_cache_path )
273
274
275
+ config .substitutions .append ( ('%{python}' , sys .executable ) )
274
276
config .substitutions .append ( ('%mcp_opt' , mcp_opt ) )
275
277
config .substitutions .append ( ('%swift_driver_plain' , "%r" % config .swift ) )
276
278
config .substitutions .append ( ('%swiftc_driver_plain' , "%r" % config .swiftc ) )
Original file line number Diff line number Diff line change
1
+ // RUN: %{python} -m unittest discover -s %S/../../utils/cmpcodesize
You can’t perform that action at this time.
0 commit comments