3
3
import numpy as np
4
4
import pytest
5
5
import torch
6
- from common_utils import CIRCLECI_GPU_NO_CUDA_MSG , CUDA_NOT_AVAILABLE_MSG , IN_CIRCLE_CI , IN_FBCODE , IN_RE_WORKER
6
+ from common_utils import CUDA_NOT_AVAILABLE_MSG , IN_FBCODE , IN_OSS_CI , IN_RE_WORKER , OSS_CI_GPU_NO_CUDA_MSG
7
7
8
8
9
9
def pytest_configure (config ):
@@ -18,7 +18,7 @@ def pytest_collection_modifyitems(items):
18
18
#
19
19
# Typically, here, we try to optimize CI time. In particular, the GPU CI instances don't need to run the
20
20
# tests that don't need CUDA, because those tests are extensively tested in the CPU CI instances already.
21
- # This is true for both CircleCI and the fbcode internal CI.
21
+ # This is true for both OSS CI and the fbcode internal CI.
22
22
# In the fbcode CI, we have an additional constraint: we try to avoid skipping tests. So instead of relying on
23
23
# pytest.mark.skip, in fbcode we literally just remove those tests from the `items` list, and it's as if
24
24
# these tests never existed.
@@ -49,12 +49,12 @@ def pytest_collection_modifyitems(items):
49
49
# TODO: something more robust would be to do that only in a sandcastle instance,
50
50
# so that we can still see the test being skipped when testing locally from a devvm
51
51
continue
52
- elif IN_CIRCLE_CI :
52
+ elif IN_OSS_CI :
53
53
# Here we're not in fbcode, so we can safely collect and skip tests.
54
54
if not needs_cuda and torch .cuda .is_available ():
55
- # Similar to what happens in RE workers: we don't need the CircleCI GPU machines
55
+ # Similar to what happens in RE workers: we don't need the OSS CI GPU machines
56
56
# to run the CPU-only tests.
57
- item .add_marker (pytest .mark .skip (reason = CIRCLECI_GPU_NO_CUDA_MSG ))
57
+ item .add_marker (pytest .mark .skip (reason = OSS_CI_GPU_NO_CUDA_MSG ))
58
58
59
59
if item .get_closest_marker ("dont_collect" ) is not None :
60
60
# currently, this is only used for some tests we're sure we don't want to run on fbcode
0 commit comments