[tests] Fix test compatibility with GCC when docker is not available.
@@ -9,14 +9,18 @@ from absl import flags
import compiler_gym
from compiler_gym.bin.service import print_service_capabilities
+from compiler_gym.service import EnvironmentNotSupported
from tests.test_main import main
@pytest.mark.parametrize("env_name", compiler_gym.COMPILER_GYM_ENVS)
def test_print_service_capabilities_smoke_test(env_name: str):
flags.FLAGS(["argv0"])
+ try:
with gym.make(env_name) as env:
print_service_capabilities(env)
+ except EnvironmentNotSupported:
+ pass # Environment not supported on this test platform.
if __name__ == "__main__":
