Skip to content

Commit 1e630a5

Browse files
committed
test: plumb --triple to the resilience test helper
The resilience test helper builds up invocations of the tooling. In order to do this, we need to know what host we are building for. Plumb the value for `-triple` from the test harness into the utility. This will be used subsequently to enable additional testing for Windows.
1 parent 9c9fd35 commit 1e630a5

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

test/lit.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1341,11 +1341,11 @@ if swift_execution_tests_extra_flags:
13411341
config.target_resilience_test = (
13421342
'%s --target-build-swift "%s" --target-run "%s" --t %%t --S %%S --s %%s '
13431343
'--lib-prefix "%s" --lib-suffix "%s" --target-codesign "%s" '
1344-
'--additional-compile-flags "%s"'
1344+
'--additional-compile-flags "%s" --triple "%s"'
13451345
% (config.rth, config.target_build_swift, config.target_run,
13461346
config.target_shared_library_prefix,
13471347
config.target_shared_library_suffix, config.target_codesign,
1348-
rth_flags))
1348+
rth_flags, config.variant_triple))
13491349

13501350
# FIXME: Get symbol diffing working with binutils nm as well. The flags are slightly
13511351
# different.

utils/rth

+4-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ResilienceTest(object):
3333

3434
def __init__(self, target_build_swift, target_run, target_codesign,
3535
target_nm, tmp_dir, test_dir, test_src, lib_prefix,
36-
lib_suffix, additional_compile_flags,
36+
lib_suffix, additional_compile_flags, triple,
3737
backward_deployment, no_symbol_diff):
3838
self.target_build_swift = shlex.split(target_build_swift)
3939
self.target_run = shlex.split(target_run)
@@ -45,6 +45,7 @@ class ResilienceTest(object):
4545
self.lib_prefix = lib_prefix
4646
self.lib_suffix = lib_suffix
4747
self.additional_compile_flags = shlex.split(additional_compile_flags)
48+
self.triple = triple
4849

4950
self.before_dir = os.path.join(self.tmp_dir, 'before')
5051
self.after_dir = os.path.join(self.tmp_dir, 'after')
@@ -229,14 +230,15 @@ def main():
229230
action='store_true')
230231
parser.add_argument('--no-symbol-diff', default=False,
231232
action='store_true')
233+
parser.add_argument('--triple', required=True)
232234

233235
args = parser.parse_args()
234236

235237
resilience_test = ResilienceTest(args.target_build_swift, args.target_run,
236238
args.target_codesign, args.target_nm,
237239
args.t, args.S, args.s, args.lib_prefix,
238240
args.lib_suffix,
239-
args.additional_compile_flags,
241+
args.additional_compile_flags, args.triple,
240242
args.backward_deployment,
241243
args.no_symbol_diff)
242244

validation-test/Evolution/test_keypaths.swift.gyb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: %empty-directory(%t/rth)
44
// RUN: env PYTHONPATH=%S/Inputs %gyb < %s > %t/test_keypaths.swift
55
// RUN: env PYTHONPATH=%S/Inputs %gyb < %S/Inputs/keypaths.swift.gyb > %t/Inputs/keypaths.swift
6-
// RUN: %rth --target-build-swift "%target-build-swift" --target-run "%target-run" --t "%t/rth" --S "%t" --s "%t/test_keypaths.swift" --lib-prefix "lib" --lib-suffix "%{target-shared-library-suffix}" --target-codesign "%target-codesign" --no-symbol-diff
6+
// RUN: %target-resilience-test --t "%t/rth" --S "%t" --s "%t/test_keypaths.swift" --no-symbol-diff
77

88
// REQUIRES: executable_test
99

0 commit comments

Comments
 (0)