@@ -185,6 +185,10 @@ There are two ways to run TensorFlow unit tests.
185
185
Once you have the packages installed, you can run a specific unit test in
186
186
bazel by doing as follows:
187
187
188
+ ``` bash
189
+ export flags=" --config=opt -k"
190
+ ```
191
+
188
192
If the tests are to be run on GPU, add CUDA paths to LD_LIBRARY_PATH and add
189
193
the ` cuda` option flag
190
194
@@ -212,15 +216,15 @@ There are two ways to run TensorFlow unit tests.
212
216
(Requires ` python> =3.7` )
213
217
214
218
` ` ` bash
215
- bazel test //tensorflow/python/saved_model:load_test --test_arg=-- --test_arg=-k =* LoadTest.test_capture_variables*
219
+ bazel test ${flags} //tensorflow/python/saved_model:load_test --test_filter =* LoadTest.test_capture_variables*
216
220
` ` `
217
221
218
- ** Note:** You can add ` --test_sharding_strategy=disabled` to disables the
219
- sharding so that all the test outputs are in one file. However, it may slow
220
- down the tests for not running in parallel and may cause the test to timeout
221
- but it could be useful when you need to execute a single test or more in
222
- general your filtered/selected tests have a very low execution time and the
223
- sharding
222
+ ** Note:** You can add ` --test_sharding_strategy=disabled` to the ` flags ` to
223
+ disable the sharding so that all the test outputs are in one file. However,
224
+ it may slow down the tests for not running in parallel and may cause the
225
+ test to timeout but it could be useful when you need to execute a single
226
+ test or more in general your filtered/selected tests have a very low
227
+ execution time and the sharding
224
228
[could create an overhead on the test esecution](https://github.com/bazelbuild/bazel/issues/2113#issuecomment-264054799).
225
229
226
230
2. Using [Docker](https://www.docker.com) and TensorFlow' s CI scripts.
0 commit comments