Skip to content

Commit bc2a8f4

Browse files
authored
Merge pull request #33354 from apple/shahmishal/codesign-tests
[Tests] Codesign the binary before executing the test
2 parents 8fc778e + 473f55c commit bc2a8f4

File tree

53 files changed

+58
-0
lines changed

Some content is hidden

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

53 files changed

+58
-0
lines changed

test/AutoDiff/stdlib/differential_operators.swift.gyb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %gyb %s -o %t/differential_operators.swift
33
// RUN: %target-build-swift %t/differential_operators.swift -o %t/differential_operators
4+
// RUN: %target-codesign %t/differential_operators
45
// RUN: %target-run %t/differential_operators
56
// REQUIRES: executable_test
67

test/ClangImporter/enum-error-execute.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-clang %S/Inputs/enum-error.m -c -o %t/enum-error.o
33
// RUN: %target-build-swift -import-objc-header %S/Inputs/enum-error.h -Xlinker %t/enum-error.o %s -o %t/a.out
4+
// RUN: %target-codesign %t/a.out
45
// RUN: %target-run %t/a.out | %FileCheck %s
56

67
// REQUIRES: executable_test

test/Driver/SourceRanges/range-incremental-no-build-record.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,5 @@
5151
// RUN: %FileCheck -match-full-lines -check-prefix=CHECK-COMPARE-DISABLED-NO-BUILD-RECORD %s < %t/output1
5252
// CHECK-COMPARE-DISABLED-NO-BUILD-RECORD: *** Incremental build disabled because could not read build record, cannot compare ***
5353

54+
// RUN: %target-codesign %t/main
5455
// RUN: %target-run %t/main | tee run1 | grep Any > /dev/null && rm %t/main

test/Interpreter/SDK/objc_block_consumed.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -import-objc-header %S/Inputs/objc_block_consumed.h -o %t/main
3+
// RUN: %target-codesign %t/main
34
// RUN: %target-run %t/main
45

56
// REQUIRES: executable_test

test/Interpreter/SDK/objc_factory_method.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -module-name FactoryTest %s -o %t/a.out
3+
// RUN: %target-codesign %t/a.out
34
// RUN: %target-run %t/a.out | %FileCheck %s
45
// REQUIRES: executable_test
56
// REQUIRES: OS=macosx

test/Interpreter/SDK/object_literals.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +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-codesign %t/Test.app/Contents/MacOS/main
56
// RUN: %target-run %t/Test.app/Contents/MacOS/main %t/Test.app/Contents/Resources/*
67

78
// REQUIRES: executable_test

test/Interpreter/conditional_conformances_modules.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// RUN: %target-build-swift-dylib(%t/%target-library-name(WithAssoc)) %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/%target-library-name(Subclass)) %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 %target-rpath(%t)
6+
// RUN: %target-codesign %t/conditional_conformances_modules
67
// RUN: %target-run %t/conditional_conformances_modules %t/%target-library-name(Basic) %t/%target-library-name(WithAssoc) %t/%target-library-name(Subclass)
78

89
// REQUIRES: executable_test

test/Interpreter/generic_casts.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -Onone %s -o %t/a.out
33
// RUN: %target-build-swift -O %s -o %t/a.out.optimized
4+
// RUN: %target-codesign %t/a.out
45
// RUN: %target-codesign %t/a.out.optimized
56
//
67
// RUN: %target-run %t/a.out | %FileCheck --check-prefix CHECK %s

test/Interpreter/generic_casts_objc.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -Onone %s -o %t/a.out
3+
// RUN: %target-codesign %t/a.out
34
// RUN: %target-run %t/a.out | %FileCheck --check-prefix CHECK --check-prefix CHECK-ONONE %s
45
// RUN: %target-build-swift -O %s -o %t/a.out.optimized
56
// RUN: %target-codesign %t/a.out.optimized

test/Interpreter/multi_payload_extra_inhabitant.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %empty-directory(%t)
22

33
// RUN: %target-build-swift -parse-stdlib -Xfrontend -verify-type-layout -Xfrontend SpareBitExtraInhabitants -Xfrontend -verify-type-layout -Xfrontend SpareBitSingleExtraInhabitant -Xfrontend -verify-type-layout -Xfrontend SpareBitNoExtraInhabitant -Xfrontend -verify-type-layout -Xfrontend SpareBitNoExtraInhabitant2 -Xfrontend -verify-type-layout -Xfrontend TwoTagExtraInhabitants -Xfrontend -verify-type-layout -Xfrontend ThreeTagExtraInhabitants -Xfrontend -verify-type-layout -Xfrontend NoTagExtraInhabitants -Xfrontend -verify-type-layout -Xfrontend DynamicExtraInhabitantsNever -Xfrontend -verify-type-layout -Xfrontend DynamicExtraInhabitantsZeroBytes -Xfrontend -verify-type-layout -Xfrontend DynamicExtraInhabitantsOneByte -Xfrontend -verify-type-layout -Xfrontend DynamicExtraInhabitantsTwoBytes -Xfrontend -verify-type-layout -Xfrontend MoreSpareBitsThanTagsExtraInhabitants -Xfrontend -verify-type-layout -Xfrontend OptOptMoreSpareBitsThanTagsExtraInhabitants -O -o %t/a.out %s
4+
// RUN: %target-codesign %t/a.out
45
// RUN: %target-run %t/a.out 2>&1
56

67
// Type layout verifier is only compiled into the runtime in asserts builds.

test/Interpreter/objc_class_properties_runtime.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// RUN: %clang -arch %target-cpu -mmacosx-version-min=10.11 -isysroot %sdk -fobjc-arc %S/Inputs/ObjCClasses/ObjCClasses.m -c -o %t/ObjCClasses.o
44

55
// RUN: %swiftc_driver -target $(echo '%target-triple' | sed -E -e 's/macosx10.(9|10).*/macosx10.11/') -sdk %sdk -I %S/Inputs/ObjCClasses/ %t/ObjCClasses.o %s -o %t/a.out
6+
// RUN: %target-codesign %t/a.out
67
// RUN: %target-run %t/a.out
78

89
// REQUIRES: OS=macosx

test/Interpreter/struct_extra_inhabitants.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
// -- run tests
77
// RUN: %target-build-swift -parse-stdlib -Xfrontend -verify-type-layout -Xfrontend PairWithPointerFirst -Xfrontend -verify-type-layout -Xfrontend PairWithPointerSecond -Xfrontend -verify-type-layout -Xfrontend PairWithPointerSecondAndPhantomParam_Int -Xfrontend -verify-type-layout -Xfrontend GenericPairWithPointerFirst_Int -Xfrontend -verify-type-layout -Xfrontend GenericPairWithPointerFirst_AnyObject -Xfrontend -verify-type-layout -Xfrontend GenericPairWithPointerSecond_Int -Xfrontend -verify-type-layout -Xfrontend GenericPairWithPointerSecond_AnyObject -Xfrontend -verify-type-layout -Xfrontend StringAlike32 -Xfrontend -verify-type-layout -Xfrontend StringAlike64 -I %t -o %t/a.out.tests %s %t/ExtraInhabitantResilientTypes.o
8+
// RUN: %target-codesign %t/a.out.tests
89
// RUN: %target-run %t/a.out.tests 2>&1
910

1011
// Type layout verifier is only compiled into the runtime in asserts builds.

test/Interpreter/testable_key_path.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -whole-module-optimization -c -o %t/Module.o -enable-testing -parse-as-library -emit-module -emit-module-path %t/Module.swiftmodule -module-name Module %S/Inputs/testable_key_path_2.swift
33
// RUN: %target-build-swift -o %t/a.out -I %t %s %t/Module.o
4+
// RUN: %target-codesign %t/a.out
45
// RUN: %target-run %t/a.out | %FileCheck %s
56

67
// REQUIRES: executable_test

test/Parse/strange_interpolation.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
// RUN: %empty-directory(%t)
44
// RUN: %target-build-swift -swift-version 4.2 %s -o %t/main
5+
// RUN: %target-codesign %t/main
56
// RUN: %target-run %t/main | %FileCheck %s
67

78
// REQUIRES: executable_test

test/Profiler/coverage_smoke.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
// This unusual use of 'sh' allows the path of the profraw file to be
55
// substituted by %target-run.
6+
// RUN: %target-codesign %t/main
67
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
78

89
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata

test/Profiler/pgo_checked_cast.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
// This unusual use of 'sh' allows the path of the profraw file to be
66
// substituted by %target-run.
7+
// RUN: %target-codesign %t/main
78
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
89

910
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata

test/Profiler/pgo_foreach.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
// This unusual use of 'sh' allows the path of the profraw file to be
55
// substituted by %target-run.
6+
// RUN: %target-codesign %t/main
67
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
78

89
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata

test/Profiler/pgo_guard.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
// This unusual use of 'sh' allows the path of the profraw file to be
55
// substituted by %target-run.
6+
// RUN: %target-codesign %t/main
67
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
78

89
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata

test/Profiler/pgo_if.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
// This unusual use of 'sh' allows the path of the profraw file to be
55
// substituted by %target-run.
6+
// RUN: %target-codesign %t/main
67
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
78

89
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata

test/Profiler/pgo_repeatwhile.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
// This unusual use of 'sh' allows the path of the profraw file to be
55
// substituted by %target-run.
6+
// RUN: %target-codesign %t/main
67
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
78

89
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata

test/Profiler/pgo_switchenum.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
// This unusual use of 'sh' allows the path of the profraw file to be
66
// substituted by %target-run.
7+
// RUN: %target-codesign %t/main
78
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
89

910
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata

test/Profiler/pgo_while.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
// This unusual use of 'sh' allows the path of the profraw file to be
55
// substituted by %target-run.
6+
// RUN: %target-codesign %t/main
67
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
78

89
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata

test/Runtime/stable-bit-backward-deployment.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// -- Deployment target is set to pre-10.14.4 so that we use the "old"
33
// Swift runtime bit in compiler-emitted classes
44
// RUN: %target-build-swift -target %target-cpu-apple-macosx10.9 %s -module-name main -o %t/a.out
5+
// RUN: %target-codesign %t/a.out
56
// RUN: %target-run %t/a.out | %FileCheck %s
67

78
// REQUIRES: executable_test

test/SILGen/property_wrapper_autoclosure.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -o %t/a.out
3+
// RUN: %target-codesign %t/a.out
34
// RUN: %target-run %t/a.out | %FileCheck %s
45

56
// REQUIRES: executable_test

test/SILOptimizer/array_element_propagation_crash.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -O %s -o %t/a.out
3+
// RUN: %target-codesign %t/a.out
34
// RUN: %target-run %t/a.out | %FileCheck %s
45

56
// REQUIRES: executable_test

test/SILOptimizer/cowarray_opt_crash.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -O %s -o %t/a.out
3+
// RUN: %target-codesign %t/a.out
34
// RUN: %target-run %t/a.out | %FileCheck %s
45

56
// REQUIRES: executable_test

test/SILOptimizer/cross-module-optimization-objc.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
// RUN: %target-build-swift -O -wmo -parse-as-library -cross-module-optimization -emit-module -emit-module-path=%t/Test.swiftmodule -module-name=Test -I%t %S/Inputs/cross-module-objc.swift -c -o %t/test.o
55
// RUN: %target-build-swift -O -wmo -module-name=Main -I%t %s -c -o %t/main.o
66
// RUN: %target-swiftc_driver %t/main.o %t/test.o -o %t/a.out
7+
// RUN: %target-codesign %t/a.out
78
// RUN: %target-run %t/a.out | %FileCheck %s -check-prefix=CHECK-OUTPUT
89

910
// Check if it also works if the main module is compiled with -Onone:
1011

1112
// RUN: %target-build-swift -Onone -wmo -module-name=Main -I%t %s -c -o %t/main-onone.o
1213
// RUN: %target-swiftc_driver %t/main-onone.o %t/test.o -o %t/a.out
14+
// RUN: %target-codesign %t/a.out
1315
// RUN: %target-run %t/a.out | %FileCheck %s -check-prefix=CHECK-OUTPUT
1416

1517
// REQUIRES: executable_test

test/SILOptimizer/cross-module-optimization.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
// RUN: %target-build-swift -O -wmo -parse-as-library -cross-module-optimization -emit-module -emit-module-path=%t/Test.swiftmodule -module-name=Test -I%t %S/Inputs/cross-module.swift -c -o %t/test.o
66
// RUN: %target-build-swift -O -wmo -module-name=Main -I%t %s -c -o %t/main.o
77
// RUN: %target-swiftc_driver %t/main.o %t/test.o %t/submodule.o -o %t/a.out
8+
// RUN: %target-codesign %t/a.out
89
// RUN: %target-run %t/a.out | %FileCheck %s -check-prefix=CHECK-OUTPUT
910

1011
// Check if it also works if the main module is compiled with -Onone:
1112

1213
// RUN: %target-build-swift -Onone -wmo -module-name=Main -I%t %s -c -o %t/main-onone.o
1314
// RUN: %target-swiftc_driver %t/main-onone.o %t/test.o %t/submodule.o -o %t/a.out
15+
// RUN: %target-codesign %t/a.out
1416
// RUN: %target-run %t/a.out | %FileCheck %s -check-prefix=CHECK-OUTPUT
1517

1618
// REQUIRES: executable_test

test/SILOptimizer/devirtualize_class_method.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -O -module-name=test %s -o %t/a.out
3+
// RUN: %target-codesign %t/a.out
34
// RUN: %target-run %t/a.out | %FileCheck %s
45
// REQUIRES: executable_test
56

test/SILOptimizer/di_property_wrappers.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -o %t/a.out
3+
// RUN: %target-codesign %t/a.out
34
// RUN: %target-run %t/a.out | %FileCheck %s
45

56
// REQUIRES: executable_test

test/SILOptimizer/dse_with_union.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -O %s -import-objc-header %S/Inputs/dse_with_union.h -o %t/a.out
3+
// RUN: %target-codesign %t/a.out
34
// RUN: %target-run %t/a.out | %FileCheck %s
45

56
// REQUIRES: executable_test

test/SILOptimizer/existential_box_elimination.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
// RUN: %empty-directory(%t)
44
// RUN: %target-build-swift -O -wmo -module-name=test %s -o %t/a.out
5+
// RUN: %target-codesign %t/a.out
56
// RUN: %target-run %t/a.out
67

78
// REQUIRES: executable_test

test/SILOptimizer/global_hoisting_crash.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -O %s -o %t/a.out
3+
// RUN: %target-codesign %t/a.out
34
// RUN: %target-run %t/a.out | %FileCheck %s
45

56
// REQUIRES: executable_test

test/SILOptimizer/lazy_property_getters.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// Also do an end-to-end test to check if the generated code is correct.
44
// RUN: %empty-directory(%t)
55
// RUN: %target-build-swift -O -Xllvm -module-name=test %s -o %t/a.out
6+
// RUN: %target-codesign %t/a.out
67
// RUN: %target-run %t/a.out | %FileCheck %s -check-prefix=CHECK-OUTPUT
78
// REQUIRES: executable_test
89

test/SILOptimizer/licm_and_global_addr.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %S/Inputs/licm_and_global_addr/test.swift -parse-as-library -wmo -enable-library-evolution -module-name=Test -emit-module -emit-module-path=%t/Test.swiftmodule -c -o %t/test.o
33
// RUN: %target-build-swift -O %S/Inputs/licm_and_global_addr/main.swift %s -I%t %t/test.o -o %t/a.out
4+
// RUN: %target-codesign %t/a.out
45
// RUN: %target-run %t/a.out | %FileCheck %s
56

67
// REQUIRES: executable_test

test/SILOptimizer/pgo_si_inlinelarge.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
// This unusual use of 'sh' allows the path of the profraw file to be
55
// substituted by %target-run.
6+
// RUN: %target-codesign %t/main
67
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
78

89
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata

test/SILOptimizer/pgo_si_reduce.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
// This unusual use of 'sh' allows the path of the profraw file to be
55
// substituted by %target-run.
6+
// RUN: %target-codesign %t/main
67
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
78

89
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata

test/SILOptimizer/property_wrappers_and_tuples.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -module-name=a -o %t/a.out
3+
// RUN: %target-codesign %t/a.out
34
// RUN: %target-run %t/a.out | %FileCheck %s
45

56
// REQUIRES: executable_test

test/SILOptimizer/sil_combine_alloc_stack.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -O %s -o %t/a.out
3+
// RUN: %target-codesign %t/a.out
34
// RUN: %target-run %t/a.out | %FileCheck %s
45

56
// REQUIRES: executable_test

test/SILOptimizer/silcombine_aebox_miscompile.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -O -module-name=a %s -o %t/a.out
3+
// RUN: %target-codesign %t/a.out
34
// RUN: %target-run %t/a.out | %FileCheck %s
45

56
// REQUIRES: executable_test

test/SILOptimizer/silcombine_runtime_crash.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -O %s -o %t/a.out
3+
// RUN: %target-codesign %t/a.out
34
// RUN: %target-run %t/a.out | %FileCheck %s
45

56
// REQUIRES: executable_test

test/SILOptimizer/stack_promotion_crash.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -O %s -o %t/a.out
3+
// RUN: %target-codesign %t/a.out
34
// RUN: %target-run %t/a.out | %FileCheck %s
45

56
// REQUIRES: executable_test

test/attr/attr_originally_definedin_backward_compatibility.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
// RUN: %target-rpath(@executable_path/SDK/Frameworks)
2525

2626
// --- Run the executable
27+
// RUN: %target-codesign %t/HighlevelRunner
2728
// RUN: %target-run %t/HighlevelRunner %t/SDK/Frameworks/HighLevel.framework/HighLevel | %FileCheck %s -check-prefix=BEFORE_MOVE
2829

2930
// --- Build low level framework.
@@ -39,6 +40,7 @@
3940
// RUN: %S/Inputs/SymbolMove/HighLevel.swift -F %t/SDK/Frameworks -Xlinker -reexport_framework -Xlinker LowLevel -enable-library-evolution
4041

4142
// --- Run the executable
43+
// RUN: %target-codesign %t/HighlevelRunner
4244
// RUN: %target-run %t/HighlevelRunner %t/SDK/Frameworks/HighLevel.framework/HighLevel %t/SDK/Frameworks/LowLevel.framework/LowLevel | %FileCheck %s -check-prefix=AFTER_MOVE
4345

4446
import HighLevel

test/stdlib/Compatibility50Linking.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-clang %s -all_load %test-resource-dir/%target-sdk-name/libswiftCompatibility50.a %test-resource-dir/%target-sdk-name/libswiftCompatibility51.a -lobjc -o %t/main
3+
// RUN: %target-codesign %t/main
34
// RUN: %target-run %t/main
45
// REQUIRES: objc_interop
56
// REQUIRES: executable_test

test/stdlib/ErrorBridged.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -o %t/ErrorBridged -DPTR_SIZE_%target-ptrsize -module-name main %s
3+
// RUN: %target-codesign %t/ErrorBridged
34
// RUN: %target-run %t/ErrorBridged
45
// REQUIRES: executable_test
56
// REQUIRES: objc_interop

test/stdlib/Integers.swift.gyb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// RUN: %empty-directory(%t)
1313
// RUN: %gyb -DWORD_BITS=%target-ptrsize %s -o %t/Integers.swift
1414
// RUN: %line-directive %t/Integers.swift -- %target-build-swift %t/Integers.swift -swift-version 4 -Onone -o %t/a.out
15+
// RUN: %line-directive %t/Integers.swift -- %target-codesign %t/a.out
1516
// RUN: %line-directive %t/Integers.swift -- %target-run %t/a.out
1617
// REQUIRES: executable_test
1718

test/stdlib/OSLogExecutionTest.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -swift-version 5 -DPTR_SIZE_%target-ptrsize -o %t/OSLogExecutionTest
3+
// RUN: %target-codesign %t/OSLogExecutionTest
34
// RUN: %target-run %t/OSLogExecutionTest
45
//
56
// RUN: %target-build-swift %s -O -swift-version 5 -DPTR_SIZE_%target-ptrsize -o %t/OSLogExecutionTest
7+
// RUN: %target-codesign %t/OSLogExecutionTest
68
// RUN: %target-run %t/OSLogExecutionTest
79
// REQUIRES: executable_test
810
//

test/stdlib/StringBridge.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: cp %s %t/main.swift
33
// RUN: %target-build-swift -Xfrontend -disable-access-control -module-name a %t/main.swift %S/../Inputs/SmallStringTestUtilities.swift -o %t.out -O
4+
// RUN: %target-codesign %t.out
45
// RUN: %target-run %t.out
56

67
// REQUIRES: executable_test

test/stdlib/TestCalendar.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// RUN: %target-clang %S/Inputs/FoundationBridge/FoundationBridge.m -c -o %t/FoundationBridgeObjC.o -g
1212
// RUN: %target-build-swift %s -I %S/Inputs/FoundationBridge/ -Xlinker %t/FoundationBridgeObjC.o -o %t/TestCalendar
1313

14+
// RUN: %target-codesign %t/TestCalendar
15+
1416
// RUN: %target-run %t/TestCalendar > %t.txt
1517
// REQUIRES: executable_test
1618
// REQUIRES: objc_interop

0 commit comments

Comments
 (0)