0

doc: update debugging-with-swarming.md

python client is deprecated, let me recommend to use go client instead.

Bug: 984869
Change-Id: I93bde0a245510a178bfe5990b074211ba6f45ebd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2029565
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#737178}
This commit is contained in:
Takuto Ikuta
2020-01-31 02:33:52 +00:00
committed by Commit Bot
parent b255d1f7c3
commit dbe63ef392

@ -153,8 +153,7 @@ for a platform you can't build for locally, does not yet exist.
You may need to log in to `https://isolateserver.appspot.com` to do this:
```
$ python tools/swarming_client/auth.py login \
--service=https://isolateserver.appspot.com
$ tools/luci-go/isolate login
```
Use your google.com account for this.
@ -164,13 +163,13 @@ Use your google.com account for this.
You can then upload the resulting isolate to the isolate server:
```
$ tools/swarming_client/isolate.py archive \
$ tools/luci-go/isolate archive \
-I https://isolateserver.appspot.com \
-i $outdir/$target.isolate \
-s $outdir/$target.isolated
```
The `isolate.py` tool will emit something like this:
The `isolate` tool will emit something like this:
```
e625130b712096e3908266252c8cd779d7f442f1 unit_tests
@ -185,12 +184,12 @@ Now that the isolate is on the isolate server with hash `$hash` from the
previous step, you can run on bots of your choice:
```
$ tools/swarming_client/swarming.py trigger \
-S https://chromium-swarm.appspot.com \
-I https://isolateserver.appspot.com \
-d pool $pool \
$ tools/luci-go/swarming trigger \
-server https://chromium-swarm.appspot.com \
-isolate-server https://isolateserver.appspot.com \
-dimension pool=$pool \
$criteria \
-s $hash
-isolated $hash
```
There are two more things you need to fill in here. The first is the pool name;
@ -199,32 +198,33 @@ collection of hosts from which swarming will try to pick bots to run your tasks.
The second is the criteria, which is how you specify which bot(s) you want your
task scheduled on. These are specified via "dimensions", which are specified
with `-d key val` or `--dimension=key val`. In fact, the `-d pool $pool` in the
with `-dimension key=val`. In fact, the `-dimension pool=$pool` in the
command above is selecting based on the "pool" dimension. There are a lot of
possible dimensions; one useful one is "os", like `-d os Linux`. Examples of
possible dimensions; one useful one is "os", like `-dimension os=Linux`. Examples of
other dimensions include:
* `-d os Mac10.13.6` to select a specific OS version
* `-d device_type "Pixel 3"` to select a specific Android device type
* `-d gpu 8086:1912` to select a specific GPU
* `-dimension os=Mac10.13.6` to select a specific OS version
* `-dimension device_type="Pixel 3"` to select a specific Android device type
* `-dimension gpu=8086:1912` to select a specific GPU
The [swarming bot list] allows you to see all the dimensions and the values they
can take on.
And you can pass shard number via env flags, e.g.
* `-env GTEST_SHARD_INDEX=0` to specify which shard to run.
* `-env GTEST_TOTAL_SHARDS=1` to specify total number of shards.
If you need to pass additional arguments to the test, simply add
`-- $extra_args` to the end of the `swarming.py trigger` command line - anything
`-- $extra_args` to the end of the `swarming trigger` command line - anything
after the `--` will be passed directly to the test.
When you invoke `swarming.py trigger`, it will emit two pieces of information: a
URL for the task it created, and a command you can run to collect the results of
that task. For example:
When you invoke `swarming trigger`, it will emit a piece of information: a
command you can run to collect the results of that task. For example:
```
Triggered task: ellyjones@chromium.org/os=Linux_pool=chromium.tests/e625130b712096e3908266252c8cd779d7f442f1
To collect results, use:
tools/swarming_client/swarming.py collect -S https://chromium-swarm.appspot.com 46fc393777163310
Or visit:
https://chromium-swarm.appspot.com/user/task/46fc393777163310
To collect results use:
swarming collect -server https://chromium-swarm.appspot.com 4a0e739053fddd10
```
The 'collect' command given there will block until the task is complete, then