Skip to content

Commit 01a0de2

Browse files
authored
[test] Update for remote-run-ing tests on a different macOS (swiftlang#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 {

0 commit comments

Comments
 (0)