Skip to content

Commit

Permalink
Mark test regressions introduced in #453.
Browse files Browse the repository at this point in the history
Issue #459.
  • Loading branch information
ChrisCummins committed Oct 11, 2021
1 parent 7c10cff commit edf915b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,23 @@
# LICENSE file in the root directory of this source tree.
"""End-to-end test of //compiler_gym/bin:action_sensitivity_analysis."""

import sys
import tempfile
from pathlib import Path

import pytest
from absl.flags import FLAGS
from sensitivity_analysis.action_sensitivity_analysis import (
run_action_sensitivity_analysis,
)
from sensitivity_analysis.sensitivity_analysis_eval import run_sensitivity_analysis_eval


@pytest.mark.xfail(
sys.platform == "darwin",
strict=True,
reason="github.com/facebookresearch/CompilerGym/issues/459",
)
def test_run_action_sensitivity_analysis():
actions = [0, 1]
env = "llvm-v0"
Expand Down
6 changes: 6 additions & 0 deletions tests/bin/service_bin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""Unit tests for //compiler_gym/bin:service."""
import sys

import gym
import pytest
from absl import flags
Expand All @@ -14,6 +16,10 @@


@pytest.mark.parametrize("env_name", compiler_gym.COMPILER_GYM_ENVS)
@pytest.mark.xfail(
sys.platform == "darwin",
reason="github.com/facebookresearch/CompilerGym/issues/459",
)
def test_print_service_capabilities_smoke_test(env_name: str):
flags.FLAGS(["argv0"])
try:
Expand Down
9 changes: 7 additions & 2 deletions tests/gcc/gcc_env_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from compiler_gym.service.connection import ServiceError
from compiler_gym.spaces import Scalar, Sequence
from tests.pytest_plugins.common import with_docker, without_docker
from tests.pytest_plugins.gcc import with_gcc_support
from tests.pytest_plugins.gcc import docker_is_available, with_gcc_support
from tests.test_main import main

pytest_plugins = ["tests.pytest_plugins.gcc"]
Expand All @@ -35,7 +35,12 @@ def test_docker_default_action_space():
assert env.action_spaces[0].names[0] == "-O0"


def test_observation_spaces(gcc_bin: str):
@pytest.mark.xfail(
not docker_is_available(),
strict=True,
reason="github.com/facebookresearch/CompilerGym/issues/459",
)
def test_observation_spaces_failing_because_of_bug(gcc_bin: str):
"""Test that the environment reports the service's observation spaces."""
with gym.make("gcc-v0", gcc_bin=gcc_bin) as env:
env.reset()
Expand Down

0 comments on commit edf915b

Please sign in to comment.