File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed
examples/sensitivity_analysis Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 44# LICENSE file in the root directory of this source tree.
55"""End-to-end test of //compiler_gym/bin:action_sensitivity_analysis."""
66
7+ import sys
78import tempfile
89from pathlib import Path
910
11+ import pytest
1012from absl .flags import FLAGS
1113from sensitivity_analysis .action_sensitivity_analysis import (
1214 run_action_sensitivity_analysis ,
1315)
1416from sensitivity_analysis .sensitivity_analysis_eval import run_sensitivity_analysis_eval
1517
1618
19+ @pytest .mark .xfail (
20+ sys .platform == "darwin" ,
21+ strict = True ,
22+ reason = "github.com/facebookresearch/CompilerGym/issues/459" ,
23+ )
1724def test_run_action_sensitivity_analysis ():
1825 actions = [0 , 1 ]
1926 env = "llvm-v0"
Original file line number Diff line number Diff line change 33# This source code is licensed under the MIT license found in the
44# LICENSE file in the root directory of this source tree.
55"""Unit tests for //compiler_gym/bin:service."""
6+ import sys
7+
68import gym
79import pytest
810from absl import flags
1416
1517
1618@pytest .mark .parametrize ("env_name" , compiler_gym .COMPILER_GYM_ENVS )
19+ @pytest .mark .xfail (
20+ sys .platform == "darwin" ,
21+ reason = "github.com/facebookresearch/CompilerGym/issues/459" ,
22+ )
1723def test_print_service_capabilities_smoke_test (env_name : str ):
1824 flags .FLAGS (["argv0" ])
1925 try :
Original file line number Diff line number Diff line change 1414from compiler_gym .service .connection import ServiceError
1515from compiler_gym .spaces import Scalar , Sequence
1616from tests .pytest_plugins .common import with_docker , without_docker
17- from tests .pytest_plugins .gcc import with_gcc_support
17+ from tests .pytest_plugins .gcc import docker_is_available , with_gcc_support
1818from tests .test_main import main
1919
2020pytest_plugins = ["tests.pytest_plugins.gcc" ]
@@ -35,7 +35,12 @@ def test_docker_default_action_space():
3535 assert env .action_spaces [0 ].names [0 ] == "-O0"
3636
3737
38- def test_observation_spaces (gcc_bin : str ):
38+ @pytest .mark .xfail (
39+ not docker_is_available (),
40+ strict = True ,
41+ reason = "github.com/facebookresearch/CompilerGym/issues/459" ,
42+ )
43+ def test_observation_spaces_failing_because_of_bug (gcc_bin : str ):
3944 """Test that the environment reports the service's observation spaces."""
4045 with gym .make ("gcc-v0" , gcc_bin = gcc_bin ) as env :
4146 env .reset ()
You can’t perform that action at this time.
0 commit comments