README.md: simplify sharded test command line use xargs to keep the command in the foreground allowing it to be stopped easily. Change-Id: I6b4963b14fb6bff37542a3c5f7a23acc85f6a24d
diff --git a/README.md b/README.md index 9de9c88..533a1da 100644 --- a/README.md +++ b/README.md
@@ -249,11 +249,8 @@ # Set the environment variable GTEST_TOTAL_SHARDS to 9 to run 10 test shards # (GTEST shard indexing is 0 based). $ export GTEST_TOTAL_SHARDS=9 - $ for shard in $(seq 0 ${GTEST_TOTAL_SHARDS}); do \ - [ ${shard} -lt ${GTEST_TOTAL_SHARDS} ] \ - && GTEST_SHARD_INDEX=${shard} ./test_libaom & \ - done - + $ seq 0 $(( $GTEST_TOTAL_SHARDS - 1 )) \ + | xargs -n 1 -P 0 -I{} env GTEST_SHARD_INDEX={} ./test_libaom ~~~ To create a test shard for each CPU core available on the current system set