Commit dbe63ef3 authored by Takuto Ikuta's avatar Takuto Ikuta Committed by Commit Bot

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: default avatarElly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: default avatarMarc-Antoine Ruel <maruel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#737178}
parent b255d1f7
...@@ -153,8 +153,7 @@ for a platform you can't build for locally, does not yet exist. ...@@ -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: You may need to log in to `https://isolateserver.appspot.com` to do this:
``` ```
$ python tools/swarming_client/auth.py login \ $ tools/luci-go/isolate login
--service=https://isolateserver.appspot.com
``` ```
Use your google.com account for this. Use your google.com account for this.
...@@ -164,13 +163,13 @@ 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: 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 https://isolateserver.appspot.com \
-i $outdir/$target.isolate \ -i $outdir/$target.isolate \
-s $outdir/$target.isolated -s $outdir/$target.isolated
``` ```
The `isolate.py` tool will emit something like this: The `isolate` tool will emit something like this:
``` ```
e625130b712096e3908266252c8cd779d7f442f1 unit_tests e625130b712096e3908266252c8cd779d7f442f1 unit_tests
...@@ -185,12 +184,12 @@ Now that the isolate is on the isolate server with hash `$hash` from the ...@@ -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: previous step, you can run on bots of your choice:
``` ```
$ tools/swarming_client/swarming.py trigger \ $ tools/luci-go/swarming trigger \
-S https://chromium-swarm.appspot.com \ -server https://chromium-swarm.appspot.com \
-I https://isolateserver.appspot.com \ -isolate-server https://isolateserver.appspot.com \
-d pool $pool \ -dimension pool=$pool \
$criteria \ $criteria \
-s $hash -isolated $hash
``` ```
There are two more things you need to fill in here. The first is the pool name; 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. ...@@ -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 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 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 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: other dimensions include:
* `-d os Mac10.13.6` to select a specific OS version * `-dimension os=Mac10.13.6` to select a specific OS version
* `-d device_type "Pixel 3"` to select a specific Android device type * `-dimension device_type="Pixel 3"` to select a specific Android device type
* `-d gpu 8086:1912` to select a specific GPU * `-dimension gpu=8086:1912` to select a specific GPU
The [swarming bot list] allows you to see all the dimensions and the values they The [swarming bot list] allows you to see all the dimensions and the values they
can take on. 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 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. after the `--` will be passed directly to the test.
When you invoke `swarming.py trigger`, it will emit two pieces of information: a When you invoke `swarming trigger`, it will emit a piece of information: a
URL for the task it created, and a command you can run to collect the results of command you can run to collect the results of that task. For example:
that task. For example:
``` ```
Triggered task: ellyjones@chromium.org/os=Linux_pool=chromium.tests/e625130b712096e3908266252c8cd779d7f442f1 To collect results use:
To collect results, use: swarming collect -server https://chromium-swarm.appspot.com 4a0e739053fddd10
tools/swarming_client/swarming.py collect -S https://chromium-swarm.appspot.com 46fc393777163310
Or visit:
https://chromium-swarm.appspot.com/user/task/46fc393777163310
``` ```
The 'collect' command given there will block until the task is complete, then The 'collect' command given there will block until the task is complete, then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment