Skip to content

Commit efc351f

Browse files
authored
Merge pull request #3011 from rintaro/tests-target-simple-run-swiftgyb
[test] Add %target-run-simple-swiftgyb substitution
2 parents 9ad2ea9 + ea2c7a6 commit efc351f

File tree

152 files changed

+306
-868
lines changed

Some content is hidden

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

152 files changed

+306
-868
lines changed

test/1_stdlib/BridgeStorage.swift.gyb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
// distinguish these cases efficiently.
1616
//
1717
//===----------------------------------------------------------------------===//
18-
// RUN: rm -rf %t && mkdir -p %t && %gyb %s -o %t/out.swift
19-
// RUN: %line-directive %t/out.swift -- %target-build-swift -parse-stdlib %t/out.swift -o %t/a.out
20-
// RUN: %line-directive %t/out.swift -- %target-run %t/a.out
18+
// RUN: %target-run-simple-swiftgyb
2119
// REQUIRES: executable_test
2220

2321
// REQUIRES: objc_interop

test/1_stdlib/CastTraps.swift.gyb

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// -*- swift -*-
2-
// RUN: rm -rf %t ; mkdir -p %t
3-
// RUN: %gyb %s -o %t/CastTraps.swift
4-
// RUN: %line-directive %t/CastTraps.swift -- %target-build-swift %t/CastTraps.swift -o %t/a.out
5-
// RUN: %line-directive %t/CastTraps.swift -- %target-run %t/a.out
2+
// RUN: %target-run-simple-swiftgyb
63
// REQUIRES: executable_test
74

85
// FIXME: Casting.cpp has dozens of places to fail a cast. This test does not
@@ -20,26 +17,26 @@ import Foundation
2017
% objectTypes = []
2118
% protocolTypes = []
2219

23-
% types.append(['a.Class1', 'a.Class2'])
24-
% objectTypes.append(['a.Class1', 'a.Class2'])
20+
% types.append(['main.Class1', 'main.Class2'])
21+
% objectTypes.append(['main.Class1', 'main.Class2'])
2522
class Class1 { }
2623
class Class2 { }
2724

28-
% types.append(['a.Struct1', 'a.Struct2'])
25+
% types.append(['main.Struct1', 'main.Struct2'])
2926
struct Struct1 { }
3027
struct Struct2 { }
3128

32-
% types.append(['a.ObjCClass1', 'a.ObjCClass2'])
33-
% objectTypes.append(['a.ObjCClass1', 'a.ObjCClass2'])
29+
% types.append(['main.ObjCClass1', 'main.ObjCClass2'])
30+
% objectTypes.append(['main.ObjCClass1', 'main.ObjCClass2'])
3431
class ObjCClass1 : NSObject { }
3532
class ObjCClass2 : NSObject { }
3633

3734
% types.append(['DateFormatter', 'NumberFormatter'])
3835
% objectTypes.append(['DateFormatter', 'NumberFormatter'])
3936
// non-Swift Objective-C class
4037

41-
% protocolTypes.append('a.Proto1')
42-
% protocolTypes.append('a.Proto2')
38+
% protocolTypes.append('main.Proto1')
39+
% protocolTypes.append('main.Proto2')
4340
protocol Proto1 { }
4441
protocol Proto2 { }
4542
% protocolTypes.append('URLSessionDelegate')

test/1_stdlib/InputStream.swift.gyb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212
// -*- swift -*-
13-
// RUN: rm -rf %t ; mkdir -p %t
14-
// RUN: %gyb %s -o %t/InputStream.swift
15-
// RUN: %line-directive %t/InputStream.swift -- %target-build-swift %t/InputStream.swift -o %t/a.out
16-
// RUN: %line-directive %t/InputStream.swift -- %target-run %t/a.out
13+
// RUN: %target-run-simple-swiftgyb
1714
// REQUIRES: executable_test
1815

1916
// FIXME: The Android test runner is incapable of running this test, which

test/1_stdlib/Inputs/flatMap.gyb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
%import inspect
2-
%import os.path
3-
%import sys
4-
%sys.path = [os.path.split(inspect.getframeinfo(inspect.currentframe()).filename)[0] or '.'] + sys.path
5-
61
% for Kind in Kinds:
72
%Minimal = 'Minimal' + Kind
83

test/1_stdlib/NSStringAPI.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir -p %t
3-
// RUN: %target-build-swift %s -o %t/a.out
4-
// RUN: %target-run %t/a.out
1+
// RUN: %target-run-simple-swift
52
// REQUIRES: executable_test
63

74
// REQUIRES: objc_interop

test/1_stdlib/StringAPI.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir -p %t
3-
// RUN: %target-build-swift %s -o %t/a.out
4-
// RUN: %target-run %t/a.out
1+
// RUN: %target-run-simple-swift
52
// REQUIRES: executable_test
63

74
//

test/1_stdlib/Tuple.swift.gyb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
// RUN: rm -f %t.swift %t.out
2-
3-
// RUN: %gyb %s -o %t.swift
4-
// RUN: %line-directive %t.swift -- %target-build-swift %t.swift -o %t.out
5-
// RUN: %line-directive %t.swift -- %target-run %t.out
1+
// RUN: %target-run-simple-swiftgyb
62
// REQUIRES: executable_test
73

84
import StdlibUnittest

test/1_stdlib/UnsafePointer.swift.gyb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t && %gyb %s -o %t/UnsafePointer.swift
2-
// RUN: %line-directive %t/UnsafePointer.swift -- %target-build-swift %t/UnsafePointer.swift -o %t/a.out
3-
// RUN: %line-directive %t/UnsafePointer.swift -- %target-run %t/a.out
1+
// RUN: %target-run-simple-swiftgyb
42
// REQUIRES: executable_test
53

64
import StdlibUnittest

test/1_stdlib/simd.swift.gyb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
// RUN: rm -f %t.swift %t.out
2-
3-
// RUN: %gyb %s -o %t.swift
4-
// RUN: %line-directive %t.swift -- %target-build-swift %t.swift -o %t.out
5-
// RUN: %line-directive %t.swift -- %target-run %t.out
1+
// RUN: %target-run-simple-swiftgyb
62
// REQUIRES: executable_test
73

84
// FIXME: No simd module on linux rdar://problem/20795411

test/1_stdlib/subString.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir -p %t
3-
// RUN: %target-build-swift %s -o %t/a.out
4-
// RUN: %target-run %t/a.out
1+
// RUN: %target-run-simple-swift
52
// REQUIRES: executable_test
63

74
import StdlibUnittest

0 commit comments

Comments
 (0)