File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ This source file is part of the Swift.org open source project
3
+
4
+ Copyright 2015 - 2016 Apple Inc. and the Swift project authors
5
+ Licensed under Apache License v2.0 with Runtime Library Exception
6
+
7
+ See http://swift.org/LICENSE.txt for license information
8
+ See http://swift.org/CONTRIBUTORS.txt for Swift project authors
9
+ */
10
+
11
+ enum Error : ErrorType {
12
+ case DebugYAMLNotFound
13
+ }
14
+
15
+ extension Error : CustomStringConvertible {
16
+ var description : String {
17
+ switch self {
18
+ case . DebugYAMLNotFound:
19
+ return " build the package using `swift build` before running tests "
20
+ }
21
+ }
22
+ }
Original file line number Diff line number Diff line change 24
24
setenv ( " SPM_INSTALL_PATH " , dir. build, 0 )
25
25
26
26
let yamlPath = Path . join ( dir. build, " debug.yaml " )
27
+ guard yamlPath. exists else { throw Error . DebugYAMLNotFound }
28
+
27
29
try build ( YAMLPath: yamlPath, target: " test " )
28
30
let success = test ( dir. build, " debug " )
29
31
exit ( success ? 0 : 1 )
You can’t perform that action at this time.
0 commit comments