New issue
Advanced search Search tips

Issue 666335 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Remove --shard from swarming.py trigger

Project Member Reported by ehmaldonado@chromium.org, Nov 17 2016

Issue description

Would it be possible to use flags instead of the GTEST_SHARD_INDEX and GTEST_TOTAL_SHARDS environment variables when invoking the tests on swarming.
It would be more transparent and easier to see what is going on.
 

Comment 1 by pbos@chromium.org, Nov 17 2016

Cc: kwiberg@chromium.org
As a minimum, use a layer between sharding and gtest-parallel that handles the environment variables. We don't accept any other environment variables into gtest-parallel, and this is a potential error source.

Something like (but preferably in python):

shard-gtest-parallel.sh (some other repo):

gtest-parallel.py --shard_count=${GTEST_SHARD_COUNT} --shard_index=${GTEST_SHARD_INDEX} "$@"
As background, we have started using gtest-parallel [1] to run our tests in swarming bots, so that the command that we ask swarming to run looks like:

../../testing/test_env.py ../../third_party/gtest-parallel/gtest-parallel ./test_binary -- --asan=0 --msan=1 --tsan=0 

We could add another script between test_env.py and gtest-parallel also, but it might be worth to use flags instead of environment variables.

[1] https://github.com/google/gtest-parallel/blob/master/gtest-parallel
test_env.py might be a good place to make that conversion.

Comment 4 by pbos@chromium.org, Nov 17 2016

I think you should add an in-between script until this bug is fixed so that gtest-parallel can be updated to support shards upstream. It's kind of clunky, but I doubt gtest flags will change in a day.

Comment 5 by pbos@chromium.org, Nov 17 2016

I'm not sure if gtest binaries barf on unrecognized command-line flags, so gtest-parallel might have to be a special case.

What about adding:
$ test_env.py --pass-shard-flags .../gtest-parallel ...

And that'd add --shard_count and --shard_index to the call to gtest-parallel. 

Comment 6 by mar...@chromium.org, Feb 24 2017

Cc: vadimsh@chromium.org iannucci@chromium.org mar...@chromium.org
Status: Available (was: Untriaged)
There's two potential solutions:
- Completely drop --shard flag in "swarming.py trigger" and do the sharding at the recipe level.
- Augment --shard flag to specify argument or environment variable to use.

The end goal is to remove the hardcoded strings GTEST_SHARD_INDEX and GTEST_TOTAL_SHARDS from swarming.py.

The first is logically much simpler. The second is a bit more work but not too much.
Project Member

Comment 7 by sheriffbot@chromium.org, Mar 8 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: -kjellander@chromium.org -mar...@chromium.org
Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)
Summary: Remove --shard from swarming.py trigger (was: Use flags instead of environment variables for swarming)
Cc: -iannucci@chromium.org iannu...@google.com

Sign in to add a comment