@@ -9,8 +9,8 @@ Used to list and bisect nightly snapshots off of swift.org.
9
9
10
10
```
11
11
# xcrun swift run swift_snapshot_tool list
12
- [INFO] Starting to download snapshot information from github.
13
- [INFO] Finished downloading snapshot information from github.
12
+ [INFO] Starting to download snapshot information from github.
13
+ [INFO] Finished downloading snapshot information from github.
14
14
0 swift-DEVELOPMENT-SNAPSHOT-2024-09-06-a
15
15
1 swift-DEVELOPMENT-SNAPSHOT-2024-09-05-a
16
16
2 swift-DEVELOPMENT-SNAPSHOT-2024-09-04-a
@@ -23,11 +23,46 @@ value is at. This allows for one to get a sense of the range of time in between
23
23
two bisect numbers since one can look at the range in between them and how time
24
24
varies.
25
25
26
+ ## Run
27
+
28
+ ```
29
+ xcrun swift run swift_snapshot_tool run --script $SCRIPT_NAME \
30
+ --date YYYY-MM-DD [--invert] [--workspace $DIR_TO_DOWNLOAD_TOOLCHAINS]
31
+ ```
32
+
33
+ run success is defined by ` $SCRIPT_NAME ` returning 0 as an exit code. All other
34
+ exit codes are considered a failure.
35
+
36
+ This command is meant to help one figure out where to start bisecting.
37
+
38
+ Options:
39
+
40
+ - workspace: This is the place where we will download toolchains to. Defaults to
41
+ ` /tmp/swift_snapshot_tool_workspace_v1 ` . We suggest that you use an external
42
+ hard drive or a specified place so that one does not have to redownload
43
+ toolchains in between system restarts.
44
+
45
+ - script: This is the script that should be run. We pass in the environment
46
+ variables ` SWIFT_EXEC ` , ` SWIFT_FRONTEND ` , and ` SWIFT_LIBRARY_PATH ` to the
47
+ script. If the script returns a zero exit code then the run is considered a
48
+ succeess. If the script returns a non-zero exit code, then the run is
49
+ considered a failure.
50
+
51
+ - date: A date in the form YYYY-MM-DD. If a snapshot at date does not exist, we
52
+ choose the first snapshot before that date.
53
+
54
+ - invert: This causes test.sh's result to be inverted. This allows one to bisect
55
+ backwards from a good state to a bad state. This is useful to determine when
56
+ an error was fixed.
57
+
58
+ - branch: This controls the specific branch of snapshots that are downloaded. By
59
+ default uses development. Also supports the options 5.0 and 6.0.
60
+
26
61
## Bisect
27
62
28
63
```
29
- xcrun swift run swift_snapshot_tool bisect --script $SCRIPT_NAME --workspace $DIR_TO_DOWNLOAD_TOOLCHAINS \
30
- --good-tag $OLDER_TAG_NAME_THAT_PASSES --bad-tag $NEWER_TAG_NAME_THAT_FAILS
64
+ xcrun swift run swift_snapshot_tool bisect --script $SCRIPT_NAME --old-date YYYY_MM_DD \
65
+ [--new-date YYYY_MM_DD] [--workspace $DIR_TO_DOWNLOAD_TOOLCHAINS]
31
66
```
32
67
33
68
bisect success is defined by ` $SCRIPT_NAME ` returning 0 as an exit code. All
@@ -36,18 +71,23 @@ other exit codes are considered a failure.
36
71
Options:
37
72
38
73
- workspace: This is the place where we will download toolchains to. Defaults to
39
- ` /tmp/swift_snapshot_tool_workspace_v1 `
74
+ ` /tmp/swift_snapshot_tool_workspace_v1 ` . We suggest that you use an external
75
+ hard drive or a specified place so that one does not have to redownload
76
+ toolchains in between system restarts.
40
77
41
78
- script: This is the script that should be run. We pass in the environment
42
- variables ` SWIFT_EXEC ` and ` SWIFT_FRONTEND ` to the subscript. If the script
43
- returns a zero exit code then the run is considered a succeess. If the script
44
- returns a non-zero exit code, then the run is considered a failure.
45
-
46
- - good_tag: This is the older tag and is assumed to succeed by returning a zero
47
- exit code.
48
-
49
- - bad_tag: This is the newer tag and is assumed to fail by returning a non-zero
50
- exit code.
79
+ variables ` SWIFT_EXEC ` , ` SWIFT_FRONTEND ` , ` SWIFT_LIBRARY_PATH ` to the
80
+ script. If the script returns a zero exit code then the run is considered a
81
+ succeess. If the script returns a non-zero exit code, then the run is
82
+ considered a failure.
83
+
84
+ - old-date: Date in the form of YYYY-MM-DD. This is assumed to succeed by
85
+ returning a zero exit code. If a snapshot does not exist at this date, the
86
+ tool will choose the first snapshot before the date.
87
+
88
+ - new-date: Date in the form of YYYY-MM-DD. This is assumed to fail by returning
89
+ a non-zero exit code. If a snapshot does not exist at this date, the tool will
90
+ choose the first snapshot before the date.
51
91
52
92
- invert: This causes test.sh's result to be inverted. This allows one to bisect
53
93
backwards from a good state to a bad state. This is useful to determine when
0 commit comments