Skip to content

Commit 01a0de2

Browse files
authored
[test] Update for remote-run-ing tests on a different macOS (#18966)
Most of this is just "remember to specify the inputs and outputs on the command line, so remote-run can see them". A bit is "prefix environment variables with '%env-'". And the last few are "yeah, this was never going to work in a remote environment". In the few cases where I couldn't think of anything reasonable, I just marked the test as "UNSUPPORTED: remote_run", a new "feature".
1 parent 649c326 commit 01a0de2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+292
-74
lines changed

test/Interpreter/SDK/objc_swift3_deprecated_objc_inference.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -swift-version 4 -Xfrontend -enable-swift3-objc-inference %s -o %t/a.out
33
// RUN: %target-run %t/a.out 2>&1 | %FileCheck %s -check-prefix=CHECK_WARNINGS
4-
// RUN: env SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=0 SIMCTL_CHILD_SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=0 %target-run %t/a.out 2>&1 | %FileCheck %s -check-prefix=CHECK_NOTHING
4+
// RUN: env %env-SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=0 %target-run %t/a.out 2>&1 | %FileCheck %s -check-prefix=CHECK_NOTHING
55

6-
// RUN: env SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=1 SIMCTL_CHILD_SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=2 %target-run %t/a.out > %t/level1.log 2>&1
6+
// RUN: env %env-SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=1 %target-run %t/a.out > %t/level1.log 2>&1
77
// RUN: %FileCheck %s -check-prefix=CHECK_WARNINGS < %t/level1.log
88

9-
// RUN: env SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=2 SIMCTL_CHILD_SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=2 %target-run %t/a.out > %t/level2.log 2>&1
9+
// RUN: env %env-SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=2 %target-run %t/a.out > %t/level2.log 2>&1
1010
// RUN: %FileCheck %s -check-prefix=CHECK_WARNINGS < %t/level2.log
1111

12-
// RUN: SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=3 SIMCTL_CHILD_SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=3 %target-run %t/a.out -expect-crash > %t/level3.log 2>&1
12+
// RUN: env %env-SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=3 %target-run %t/a.out -expect-crash > %t/level3.log 2>&1
1313
// RUN: %FileCheck %s -check-prefix=CHECK_CRASH < %t/level3.log
1414

1515
// REQUIRES: executable_test
1616
// REQUIRES: objc_interop
17-
// REQUIRES: OS=macosx
1817

1918
import StdlibUnittest
2019
import Foundation
21-
import Darwin
2220

2321
var DeprecatedObjCInferenceTestSuite = TestSuite("DeprecatedObjCInferenceTestSuite")
2422

2523
class MyClass : NSObject {
24+
// The line numbers of the next two methods are mentioned in the CHECK lines
25+
// below. Please keep them as 26 and 27.
2626
func foo() { }
2727
class func bar() { }
2828
}

test/Interpreter/SDK/object_literals.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: %empty-directory(%t/Test.app/Contents/MacOS)
33
// RUN: cp -r %S/Inputs/object_literals-Resources %t/Test.app/Contents/Resources
44
// RUN: %target-build-swift %s -o %t/Test.app/Contents/MacOS/main
5-
// RUN: %target-run %t/Test.app/Contents/MacOS/main
5+
// RUN: %target-run %t/Test.app/Contents/MacOS/main %t/Test.app/Contents/Resources/*
66

77
// REQUIRES: executable_test
88
// REQUIRES: OS=macosx

test/Interpreter/conditional_conformances_modules.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: %target-build-swift-dylib(%t/libWithAssoc.%target-dylib-extension) %S/../Inputs/conditional_conformance_with_assoc.swift -module-name WithAssoc -emit-module -emit-module-path %t/WithAssoc.swiftmodule
44
// RUN: %target-build-swift-dylib(%t/libSubclass.%target-dylib-extension) %S/../Inputs/conditional_conformance_subclass.swift -module-name Subclass -emit-module -emit-module-path %t/Subclass.swiftmodule
55
// RUN: %target-build-swift -I%t -L%t -lBasic -lWithAssoc -lSubclass %s -o %t/conditional_conformances_modules -Xlinker -rpath -Xlinker %t
6-
// RUN: %target-run %t/conditional_conformances_modules %t/libBasic.%target-dylib-extension %t/libWithAssoc.%target-dylib-extension
6+
// RUN: %target-run %t/conditional_conformances_modules %t/libBasic.%target-dylib-extension %t/libWithAssoc.%target-dylib-extension %t/libSubclass.%target-dylib-extension
77

88
// REQUIRES: executable_test
99
// FIXME: seems to fail on 32-bit simulator?

test/Profiler/coverage_smoke.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -profile-coverage-mapping -Xfrontend -disable-incremental-llvm-codegen -o %t/main
3-
// RUN: env LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
3+
4+
// This unusual use of 'sh' allows the path of the profraw file to be
5+
// substituted by %target-run.
6+
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
7+
48
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
59
// RUN: %llvm-profdata show %t/default.profdata -function=f_internal | %FileCheck %s --check-prefix=CHECK-INTERNAL
610
// RUN: %llvm-profdata show %t/default.profdata -function=f_private | %FileCheck %s --check-prefix=CHECK-PRIVATE
@@ -11,6 +15,7 @@
1115
// RUN: rm -rf %t
1216

1317
// REQUIRES: profile_runtime
18+
// REQUIRES: executable_test
1419
// REQUIRES: OS=macosx
1520

1621
// CHECK-INTERNAL: Functions shown: 1

test/Profiler/pgo_checked_cast.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11

22
// RUN: %empty-directory(%t)
33
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_checked_cast -o %t/main
4-
// RUN: env LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
4+
5+
// This unusual use of 'sh' allows the path of the profraw file to be
6+
// substituted by %target-run.
7+
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
8+
59
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
610
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -emit-sorted-sil -emit-sil -module-name pgo_checked_cast -o - | %FileCheck %s --check-prefix=SIL
711
// need to lower checked_cast_addr_br(addr) into IR for this
@@ -11,6 +15,7 @@
1115
// %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -O -emit-ir -module-name pgo_checked_cast -o - | %FileCheck %s --check-prefix=IR-OPT
1216

1317
// REQUIRES: profile_runtime
18+
// REQUIRES: executable_test
1419
// REQUIRES: OS=macosx
1520

1621
// SIL-LABEL: // pgo_checked_cast.check1<A>(Any, A) -> A

test/Profiler/pgo_foreach.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_foreach -o %t/main
3-
// RUN: env LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
3+
4+
// This unusual use of 'sh' allows the path of the profraw file to be
5+
// substituted by %target-run.
6+
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
7+
48
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
59
// need to move counts attached to expr for this
610
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -emit-sorted-sil -emit-sil -module-name pgo_foreach -o - | %FileCheck %s --check-prefix=SIL
@@ -12,6 +16,7 @@
1216
// %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -O -emit-ir -module-name pgo_foreach -o - | %FileCheck %s --check-prefix=IR-OPT
1317

1418
// REQUIRES: profile_runtime
19+
// REQUIRES: executable_test
1520
// REQUIRES: OS=macosx
1621

1722
// SIL-LABEL: // pgo_foreach.guessForEach1

test/Profiler/pgo_guard.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_guard -o %t/main
3-
// RUN: env LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
3+
4+
// This unusual use of 'sh' allows the path of the profraw file to be
5+
// substituted by %target-run.
6+
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
7+
48
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
59
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -emit-sorted-sil -emit-sil -module-name pgo_guard -o - | %FileCheck %s --check-prefix=SIL
610
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -emit-ir -module-name pgo_guard -o - | %FileCheck %s --check-prefix=IR
711
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -O -emit-sorted-sil -emit-sil -module-name pgo_guard -o - | %FileCheck %s --check-prefix=SIL-OPT
812
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -O -emit-ir -module-name pgo_guard -o - | %FileCheck %s --check-prefix=IR-OPT
913

1014
// REQUIRES: profile_runtime
15+
// REQUIRES: executable_test
1116
// REQUIRES: OS=macosx
1217

1318
// SIL-LABEL: // pgo_guard.guess1

test/Profiler/pgo_if.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_if -o %t/main
3-
// RUN: env LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
3+
4+
// This unusual use of 'sh' allows the path of the profraw file to be
5+
// substituted by %target-run.
6+
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
7+
48
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
59
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -emit-sorted-sil -emit-sil -module-name pgo_if -o - | %FileCheck %s --check-prefix=SIL
610
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -emit-ir -module-name pgo_if -o - | %FileCheck %s --check-prefix=IR
@@ -9,6 +13,7 @@
913

1014
// REQUIRES: profile_runtime
1115
// REQUIRES: OS=macosx
16+
// REQUIRES: executable_test
1217

1318
// SIL-LABEL: // pgo_if.guess1
1419
// SIL-LABEL: sil @$S6pgo_if6guess11xs5Int32VAE_tF : $@convention(thin) (Int32) -> Int32 !function_entry_count(5001) {

test/Profiler/pgo_repeatwhile.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_repeatwhile -o %t/main
3-
// RUN: env LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
3+
4+
// This unusual use of 'sh' allows the path of the profraw file to be
5+
// substituted by %target-run.
6+
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
7+
48
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
59
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -emit-sorted-sil -emit-sil -module-name pgo_repeatwhile -o - | %FileCheck %s --check-prefix=SIL
610
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -emit-ir -module-name pgo_repeatwhile -o - | %FileCheck %s --check-prefix=IR
@@ -9,6 +13,7 @@
913
// %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -O -emit-ir -module-name pgo_repeatwhile -o - | %FileCheck %s --check-prefix=IR-OPT
1014

1115
// REQUIRES: profile_runtime
16+
// REQUIRES: executable_test
1217
// REQUIRES: OS=macosx
1318

1419
// SIL-LABEL: // pgo_repeatwhile.guessWhile

test/Profiler/pgo_switchenum.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11

22
// RUN: %empty-directory(%t)
33
// RUN: %target-build-swift %s -Xfrontend -enable-sil-ownership -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_switchenum -o %t/main
4-
// RUN: env LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
4+
5+
// This unusual use of 'sh' allows the path of the profraw file to be
6+
// substituted by %target-run.
7+
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
8+
59
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
610
// need to move counts attached to expr for this
711
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -enable-sil-ownership -emit-sorted-sil -emit-sil -module-name pgo_switchenum -o - | %FileCheck %s --check-prefix=SIL
@@ -13,6 +17,7 @@
1317
// %target-swift-frontend -enable-sil-ownership %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -O -emit-ir -module-name pgo_switchenum -o - | %FileCheck %s --check-prefix=IR-OPT
1418

1519
// REQUIRES: profile_runtime
20+
// REQUIRES: executable_test
1621
// REQUIRES: OS=macosx
1722

1823
public enum MaybePair {

test/Profiler/pgo_while.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_while -o %t/main
3-
// RUN: env LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
3+
4+
// This unusual use of 'sh' allows the path of the profraw file to be
5+
// substituted by %target-run.
6+
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
7+
48
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
59
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -emit-sorted-sil -emit-sil -module-name pgo_while -o - | %FileCheck %s --check-prefix=SIL
610
// RUN: %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -emit-ir -module-name pgo_while -o - | %FileCheck %s --check-prefix=IR
@@ -9,6 +13,7 @@
913
// %target-swift-frontend %s -Xllvm -sil-full-demangle -profile-use=%t/default.profdata -O -emit-ir -module-name pgo_while -o - | %FileCheck %s --check-prefix=IR-OPT
1014

1115
// REQUIRES: profile_runtime
16+
// REQUIRES: executable_test
1217
// REQUIRES: OS=macosx
1318

1419
// SIL-LABEL: // pgo_while.guessWhile

test/SILOptimizer/pgo_si_inlinelarge.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_si_inlinelarge -o %t/main
3-
// RUN: env LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
3+
4+
// This unusual use of 'sh' allows the path of the profraw file to be
5+
// substituted by %target-run.
6+
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
7+
48
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
59
// RUN: %target-swift-frontend %s -profile-use=%t/default.profdata -emit-sorted-sil -emit-sil -module-name pgo_si_inlinelarge -o - | %FileCheck %s --check-prefix=SIL
610
// RUN: %target-swift-frontend %s -profile-use=%t/default.profdata -O -emit-sorted-sil -emit-sil -module-name pgo_si_inlinelarge -o - | %FileCheck %s --check-prefix=SIL-OPT
711

812
// REQUIRES: profile_runtime
13+
// REQUIRES: executable_test
914
// REQUIRES: OS=macosx
1015

1116
public func bar(_ x: Int64) -> Int64 {

test/SILOptimizer/pgo_si_reduce.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -profile-generate -Xfrontend -disable-incremental-llvm-codegen -module-name pgo_si_reduce -o %t/main
3-
// RUN: env LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main
3+
4+
// This unusual use of 'sh' allows the path of the profraw file to be
5+
// substituted by %target-run.
6+
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
7+
48
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
59
// RUN: %target-swift-frontend %s -profile-use=%t/default.profdata -emit-sorted-sil -emit-sil -module-name pgo_si_reduce -o - | %FileCheck %s --check-prefix=SIL
610
// RUN: %target-swift-frontend %s -profile-use=%t/default.profdata -O -emit-sorted-sil -emit-sil -module-name pgo_si_reduce -o - | %FileCheck %s --check-prefix=SIL-OPT
711

812
// REQUIRES: profile_runtime
13+
// REQUIRES: executable_test
914
// REQUIRES: OS=macosx
1015

1116
public func bar(_ x: Int32) -> Int32 {

test/Sanitizers/sanitizer_coverage.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// REQUIRES: asan_runtime
99
// For now restrict this test to platforms where we know this test will pass
1010
// REQUIRES: CPU=x86_64
11+
// UNSUPPORTED: remote_run
1112

1213
// XFAIL: linux
1314

test/SwiftSyntax/DiagnosticTest.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// REQUIRES: executable_test
33
// REQUIRES: OS=macosx
44
// REQUIRES: objc_interop
5+
// UNSUPPORTED: remote_run
56

67
import Foundation
78
import StdlibUnittest

test/lit.cfg

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -962,31 +962,39 @@ if (not getattr(config, 'target_run', None) and
962962
lit_config.note(
963963
"Uploading dylibs to {0} on {1}".format(remote_lib_dir,
964964
remote_run_host))
965-
sdk_lib_dir = os.path.join(test_resource_dir, config.target_sdk_name)
966-
glob_pattern = os.path.join(sdk_lib_dir,
967-
'*.' + config.target_dylib_extension)
968-
libs = glob.glob(glob_pattern)
969-
subprocess.check_call(
970-
[
971-
os.path.join(config.swift_utils, 'remote-run'),
972-
'--remote-dir', remote_tmp_dir,
973-
'--input-prefix', sdk_lib_dir,
974-
'--remote-input-prefix', 'stdlib/'
975-
] + remote_run_extra_args + [
976-
remote_run_host,
977-
'--',
978-
'true' # A dummy command that ignores its arguments.
979-
] + libs)
965+
def upload_dylibs(dylib_dir):
966+
glob_pattern = os.path.join(dylib_dir,
967+
'*.' + config.target_dylib_extension)
968+
libs = glob.glob(glob_pattern)
969+
subprocess.check_call(
970+
[
971+
os.path.join(config.swift_utils, 'remote-run'),
972+
'--remote-dir', remote_tmp_dir,
973+
'--input-prefix', dylib_dir,
974+
'--remote-input-prefix', 'stdlib/'
975+
] + remote_run_extra_args + [
976+
remote_run_host,
977+
'--',
978+
'true' # A dummy command that ignores its arguments.
979+
] + libs)
980+
upload_dylibs(os.path.join(test_resource_dir, config.target_sdk_name))
981+
# FIXME: This could be more principled.
982+
upload_dylibs(os.path.join(test_resource_dir, "clang", "lib", "darwin"))
983+
upload_dylibs(os.path.join(test_resource_dir, "clang", "lib", "linux"))
980984

981985
config.target_run = (
982986
"/usr/bin/env "
983987
"REMOTE_RUN_CHILD_DYLD_LIBRARY_PATH='{0}' " # Apple option
984988
"REMOTE_RUN_CHILD_LD_LIBRARY_PATH='{0}' " # Linux option
985-
"%utils/remote-run --input-prefix %S --output-prefix %t "
986-
"--remote-dir '{1}'%t {2} {3}".format(remote_lib_dir, remote_tmp_dir,
989+
"'{1}'/remote-run --input-prefix '{2}' --output-prefix %t "
990+
"--remote-dir '{3}'%t {4} {5}".format(remote_lib_dir,
991+
config.swift_utils,
992+
config.swift_src_root,
993+
remote_tmp_dir,
987994
' '.join(remote_run_extra_args),
988995
remote_run_host))
989996
TARGET_ENV_PREFIX = 'REMOTE_RUN_CHILD_'
997+
config.available_features.add('remote_run')
990998

991999
config.substitutions.append(('%env-', TARGET_ENV_PREFIX))
9921000
config.substitutions.append(("%target-sdk-name", config.target_sdk_name))

test/stdlib/StringBridge.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func expectCocoa(_ str: String,
4040
}
4141

4242
StringBridgeTests.test("Tagged NSString") {
43-
guard #available(iOS 11.0, *) else { return }
43+
guard #available(macOS 10.13, iOS 11.0, tvOS 11.0, *) else { return }
4444
#if arch(i386) || arch(arm)
4545
#else
4646
// Bridge tagged strings as small

utils/rth

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from __future__ import print_function
1313

1414
import argparse
15+
import glob
1516
import os
1617
import pipes
1718
import shlex
@@ -164,7 +165,8 @@ class ResilienceTest(object):
164165
config2_lower = config2.lower()
165166
output_obj = os.path.join(self.tmp_dir,
166167
config1_lower + '_' + config2_lower)
167-
command = self.target_run + [output_obj, self.tmp_dir]
168+
tmp_dir_contents = glob.glob(os.path.join(self.tmp_dir, '*', '*'))
169+
command = self.target_run + [output_obj] + tmp_dir_contents
168170
verbose_print_command(command)
169171
returncode = subprocess.call(command)
170172
assert returncode == 0, str(command)

validation-test/Reflection/existentials.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/existentials
33
// RUN: %target-codesign %t/existentials
4-
// RUN: %target-run %target-swift-reflection-test %t/existentials | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
4+
5+
// Link %target-swift-reflection-test into %t to convince %target-run to copy
6+
// it.
7+
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
8+
// RUN: %target-run %t/swift-reflection-test %t/existentials | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
9+
510
// REQUIRES: objc_interop
611
// REQUIRES: executable_test
712

validation-test/Reflection/functions.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/functions
33
// RUN: %target-codesign %t/functions
4-
// RUN: %target-run %target-swift-reflection-test %t/functions | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
4+
5+
// Link %target-swift-reflection-test into %t to convince %target-run to copy
6+
// it.
7+
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
8+
// RUN: %target-run %t/swift-reflection-test %t/functions | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
59

610
// FIXME: Should not require objc_interop -- please put Objective-C-specific
711
// testcases in functions_objc.swift

0 commit comments

Comments
 (0)