File tree Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python
2
+ # ===--- build_incremental.py ---------------------------------------------===
3
+ #
4
+ # This source file is part of the Swift.org open source project
5
+ #
6
+ # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
7
+ # Licensed under Apache License v2.0 with Runtime Library Exception
8
+ #
9
+ # See https://swift.org/LICENSE.txt for license information
10
+ # See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
11
+ #
12
+ # ===----------------------------------------------------------------------===
13
+
14
+ """Build a collection of Swift projects in incremental mode, collecting stats."""
15
+
16
+ import argparse
17
+ import json
18
+ import sys
19
+
20
+ import common
21
+ import project
22
+
23
+
24
+ def parse_args ():
25
+ """Return parsed command line arguments."""
26
+ parser = argparse .ArgumentParser ()
27
+ project .add_arguments (parser )
28
+ return parser .parse_args ()
29
+
30
+
31
+ def main ():
32
+ """Execute specified indexed project actions."""
33
+ args = parse_args ()
34
+ index = json .loads (open (args .projects ).read ())
35
+ result = project .ProjectListBuilder (
36
+ args .include_repos ,
37
+ args .exclude_repos ,
38
+ args .verbose ,
39
+ project .ProjectBuilder .factory (
40
+ args .include_actions ,
41
+ args .exclude_actions ,
42
+ args .verbose ,
43
+ project .IncrementalActionBuilder .factory (
44
+ args .swiftc ,
45
+ args .swift_version ,
46
+ args .swift_branch ,
47
+ args .sandbox_profile_xcodebuild ,
48
+ args .sandbox_profile_package ,
49
+ args .add_swift_flags ,
50
+ args .check_stats ,
51
+ args .show_stats
52
+ ),
53
+ ),
54
+ index
55
+ ).build ()
56
+ common .debug_print (str (result ))
57
+ return 0 if result .result in [project .ResultEnum .PASS ,
58
+ project .ResultEnum .XFAIL ] else 1
59
+
60
+ if __name__ == '__main__' :
61
+ sys .exit (main ())
You can’t perform that action at this time.
0 commit comments