Skip to content

Commit bc2a8f4

Browse files
authored
Merge pull request swiftlang#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.

0 commit comments

Comments
 (0)