Skip to content

[test] Fix target-based reflection tests for real #19098

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions validation-test/Reflection/existentials.swift
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
// RUN: %empty-directory(%t)
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/existentials
// RUN: %target-codesign %t/existentials

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/existentials | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/existentials | %FileCheck %s --check-prefix=CHECK-%target-ptrsize

// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

/*
This file pokes at the swift_reflection_projectExistential API
of the SwiftRemoteMirror library.
Expand Down
8 changes: 1 addition & 7 deletions validation-test/Reflection/functions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,14 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/functions
// RUN: %target-codesign %t/functions

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/functions | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/functions | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize

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

// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

/*
This file pokes at the swift_reflection_infoForInstance() API
of the SwiftRemoteMirror library.
Expand Down
8 changes: 1 addition & 7 deletions validation-test/Reflection/functions_objc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,11 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/functions
// RUN: %target-codesign %t/functions

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/functions | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/functions | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize

// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

import SwiftReflectionTest
import Foundation
import CoreGraphics
Expand Down
8 changes: 1 addition & 7 deletions validation-test/Reflection/inherits_NSObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/inherits_NSObject
// RUN: %target-codesign %t/inherits_NSObject

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/inherits_NSObject | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/inherits_NSObject | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize

// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

import Foundation
import simd

Expand Down
8 changes: 1 addition & 7 deletions validation-test/Reflection/inherits_ObjCClasses.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,12 @@
// RUN: %target-build-swift -I %S/Inputs/ObjCClasses/ -lswiftSwiftReflectionTest %t/ObjCClasses.o %s -o %t/inherits_ObjCClasses
// RUN: %target-codesign %t/inherits_ObjCClasses

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/inherits_ObjCClasses | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/inherits_ObjCClasses | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize


// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

import simd
import ObjCClasses
import SwiftReflectionTest
Expand Down
8 changes: 1 addition & 7 deletions validation-test/Reflection/inherits_Swift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,12 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/inherits_Swift
// RUN: %target-codesign %t/inherits_Swift

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/inherits_Swift | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/inherits_Swift | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize


// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

import SwiftReflectionTest

class BaseClass {
Expand Down
10 changes: 10 additions & 0 deletions validation-test/Reflection/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Make a local copy of the substitutions.
config.substitutions = list(config.substitutions)

config.substitutions.insert(0, ("%target-run-reflection-test",
# Link %target-swift-reflection-test into %t to convince %target-run to copy
# it, then use DYLD_LIBRARY_PATH to make sure it can find SwiftRemoteMirrors
# from its new location when /not/ run remotely.
("ln %target-swift-reflection-test %t/swift-reflection-test && "
"env %env-DYLD_LIBRARY_PATH=%platform-module-dir/../ %target-run "
" %t/swift-reflection-test")))
8 changes: 1 addition & 7 deletions validation-test/Reflection/reflect_Array.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/reflect_Array
// RUN: %target-codesign %t/reflect_Array

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/reflect_Array | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/reflect_Array | %FileCheck %s --check-prefix=CHECK-%target-ptrsize

// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

import SwiftReflectionTest

class TestClass {
Expand Down
8 changes: 1 addition & 7 deletions validation-test/Reflection/reflect_Bool.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/reflect_Bool
// RUN: %target-codesign %t/reflect_Bool

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/reflect_Bool | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/reflect_Bool | %FileCheck %s --check-prefix=CHECK-%target-ptrsize

// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

import SwiftReflectionTest

class TestClass {
Expand Down
8 changes: 1 addition & 7 deletions validation-test/Reflection/reflect_Character.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/reflect_Character
// RUN: %target-codesign %t/reflect_Character

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/reflect_Character | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/reflect_Character | %FileCheck %s --check-prefix=CHECK-%target-ptrsize

// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

import SwiftReflectionTest

class TestClass {
Expand Down
8 changes: 1 addition & 7 deletions validation-test/Reflection/reflect_Dictionary.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/reflect_Dictionary
// RUN: %target-codesign %t/reflect_Dictionary

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/reflect_Dictionary | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/reflect_Dictionary | %FileCheck %s --check-prefix=CHECK-%target-ptrsize

// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

import SwiftReflectionTest

class TestClass {
Expand Down
8 changes: 1 addition & 7 deletions validation-test/Reflection/reflect_Double.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/reflect_Double
// RUN: %target-codesign %t/reflect_Double

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/reflect_Double | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/reflect_Double | %FileCheck %s --check-prefix=CHECK-%target-ptrsize

// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

import SwiftReflectionTest

class TestClass {
Expand Down
8 changes: 1 addition & 7 deletions validation-test/Reflection/reflect_Float.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/reflect_Float
// RUN: %target-codesign %t/reflect_Float

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/reflect_Float | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/reflect_Float | %FileCheck %s --check-prefix=CHECK-%target-ptrsize

// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

import SwiftReflectionTest

class TestClass {
Expand Down
8 changes: 1 addition & 7 deletions validation-test/Reflection/reflect_Int.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/reflect_Int
// RUN: %target-codesign %t/reflect_Int

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/reflect_Int | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/reflect_Int | %FileCheck %s --check-prefix=CHECK-%target-ptrsize

// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

import SwiftReflectionTest

class TestClass {
Expand Down
8 changes: 1 addition & 7 deletions validation-test/Reflection/reflect_Int16.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/reflect_Int16
// RUN: %target-codesign %t/reflect_Int16

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/reflect_Int16 | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/reflect_Int16 | %FileCheck %s --check-prefix=CHECK-%target-ptrsize

// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

import SwiftReflectionTest

class TestClass {
Expand Down
8 changes: 1 addition & 7 deletions validation-test/Reflection/reflect_Int32.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/reflect_Int32
// RUN: %target-codesign %t/reflect_Int32

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/reflect_Int32 | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/reflect_Int32 | %FileCheck %s --check-prefix=CHECK-%target-ptrsize

// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

import SwiftReflectionTest

class TestClass {
Expand Down
8 changes: 1 addition & 7 deletions validation-test/Reflection/reflect_Int64.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/reflect_Int64
// RUN: %target-codesign %t/reflect_Int64

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/reflect_Int64 | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/reflect_Int64 | %FileCheck %s --check-prefix=CHECK-%target-ptrsize

// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

import SwiftReflectionTest

class TestClass {
Expand Down
8 changes: 1 addition & 7 deletions validation-test/Reflection/reflect_Int8.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/reflect_Int8
// RUN: %target-codesign %t/reflect_Int8

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/reflect_Int8 | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/reflect_Int8 | %FileCheck %s --check-prefix=CHECK-%target-ptrsize

// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

import SwiftReflectionTest

class TestClass {
Expand Down
8 changes: 1 addition & 7 deletions validation-test/Reflection/reflect_NSArray.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/reflect_NSArray
// RUN: %target-codesign %t/reflect_NSArray

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/reflect_NSArray | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/reflect_NSArray | %FileCheck %s --check-prefix=CHECK-%target-ptrsize

// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

import SwiftReflectionTest
import Foundation

Expand Down
8 changes: 1 addition & 7 deletions validation-test/Reflection/reflect_NSNumber.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/reflect_NSNumber
// RUN: %target-codesign %t/reflect_NSNumber

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/reflect_NSNumber | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/reflect_NSNumber | %FileCheck %s --check-prefix=CHECK-%target-ptrsize

// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

import SwiftReflectionTest
import Foundation

Expand Down
8 changes: 1 addition & 7 deletions validation-test/Reflection/reflect_NSSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/reflect_NSSet
// RUN: %target-codesign %t/reflect_NSSet

// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/reflect_NSSet | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/reflect_NSSet | %FileCheck %s --check-prefix=CHECK-%target-ptrsize

// REQUIRES: objc_interop
// REQUIRES: executable_test

// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx

import SwiftReflectionTest
import Foundation

Expand Down
Loading