Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Update testing.md (#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shruthi42 authored Nov 6, 2020
1 parent 42b0689 commit 363bac9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@
All non-trivial proposed changes to the code base should be accompanied by tests.

Each PullRequest build will run all tests in the repository on CPU machines. One full test run is executed on a Windows
agent, one on a Linux agent.
agent, one on a Linux agent. Tests with the pytest mark `gpu` or `azureml` will not be executed in this run.

In addition, `pytest` will be run as part of the small AzureML job (smoke test) that is part of the PR build.
In that test run, only specific tests will be executed. At present, it will be the tests that are marked
with the `pytest` mark `gpu`. The AzureML job executes on a GPU VM, hence you can have tests for GPU-specific
capabilities.
with the pytest mark `gpu`, `cpu_and_gpu` or `azureml`. The AzureML job executes on a GPU VM, hence you can have
tests for GPU-specific capabilities.

To mark one of your tests for execution on the GPU, prefix the test as follows:
To mark one of your tests as requiring a GPU, prefix the test as follows:

@pytest.mark.gpu
def test_my_gpu_code() -> None:
...
Similarly, use the mark `cpu_and_gpu` for tests that should be run twice, once on the CPU and once on the GPU. For
tests that do not require a GPU, but have longer running times and are better suited to run on the PR build, use the
mark `azureml`.

0 comments on commit 363bac9

Please sign in to comment.