Merge pull request #52264 from bhack:patch-17

PiperOrigin-RevId: 401516209
Change-Id: If9436b5304d1b6232b776dcf0ed2812168ac309d
This commit is contained in:
TensorFlower Gardener 2021-10-07 08:20:48 -07:00
commit d81f0eb0dd

View File

@ -206,6 +206,23 @@ There are two ways to run TensorFlow unit tests.
bazel test ${flags} tensorflow/python/kernel_tests:softmax_op_test
```
For a single/parametrized test e.g. `test_capture_variables` in
`tensorflow/python/saved_model/load_test.py`:
(Requires `python>=3.7`)
```bash
bazel test //tensorflow/python/saved_model:load_test --test_arg=-- --test_arg=-k=*LoadTest.test_capture_variables*
```
**Note:** You can add `--test_sharding_strategy=disabled` to disables the
sharding so that all the test outputs are in one file. However, it may slow
down the tests for not running in parallel and may cause the test to timeout
but it could be useful when you need to execute a single test or more in
general your filtered/selected tests have a very low execution time and the
sharding
[could create an overhead on the test esecution](https://github.com/bazelbuild/bazel/issues/2113#issuecomment-264054799).
2. Using [Docker](https://www.docker.com) and TensorFlow's CI scripts.
```bash