Skip to content

Commit 7594a71

Browse files
committed
[tests] Mark macOS test regressions.
Issue #459.
1 parent edf915b commit 7594a71

File tree

5 files changed

+56
-0
lines changed

5 files changed

+56
-0
lines changed

tests/llvm/datasets/csmith_test.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
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
"""Tests for the Csmith dataset."""
6+
import sys
67
from itertools import islice
78
from pathlib import Path
89

@@ -62,6 +63,11 @@ def test_csmith_from_seed_retry_count_exceeded(csmith_dataset: CsmithDataset):
6263
csmith_dataset.benchmark_from_seed(seed=1, max_retries=3, retry_count=5)
6364

6465

66+
@pytest.mark.xfail(
67+
sys.platform == "darwin",
68+
strict=True,
69+
reason="github.com/facebookresearch/CompilerGym/issues/459",
70+
)
6571
@flaky(rerun_filter=lambda err, *args: issubclass(err[0], ServiceError))
6672
def test_csmith_positive_runtimes(env: LlvmEnv, csmith_dataset: CsmithDataset):
6773
benchmark = next(csmith_dataset.benchmarks())
@@ -71,6 +77,11 @@ def test_csmith_positive_runtimes(env: LlvmEnv, csmith_dataset: CsmithDataset):
7177
assert np.all(np.greater(val, 0))
7278

7379

80+
@pytest.mark.xfail(
81+
sys.platform == "darwin",
82+
strict=True,
83+
reason="github.com/facebookresearch/CompilerGym/issues/459",
84+
)
7485
@flaky(rerun_filter=lambda err, *args: issubclass(err[0], ServiceError))
7586
def test_csmith_positive_buildtimes(env: LlvmEnv, csmith_dataset: CsmithDataset):
7687
benchmark = next(csmith_dataset.benchmarks())

tests/llvm/fresh_environment_observation_reward_test.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
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
"""Integrations tests for the LLVM CompilerGym environments."""
6+
import sys
67

8+
import pytest
79
from flaky import flaky
810

911
from compiler_gym.envs import CompilerEnv
@@ -12,6 +14,11 @@
1214
pytest_plugins = ["tests.pytest_plugins.llvm"]
1315

1416

17+
@pytest.mark.xfail(
18+
sys.platform == "darwin",
19+
strict=True,
20+
reason="github.com/facebookresearch/CompilerGym/issues/459",
21+
)
1522
@flaky # Runtime can timeout
1623
def test_step(env: CompilerEnv, observation_space: str, reward_space: str):
1724
"""Request every combination of observation and reward in a fresh environment."""

tests/llvm/llvm_session_parameters_test.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
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
"""Tests for LLVM session parameter handlers."""
6+
import sys
7+
68
import pytest
79
from flaky import flaky
810

@@ -67,6 +69,11 @@ def test_benchmarks_cache_parameter_invalid_int_type(env: LlvmEnv):
6769
env.send_params(("service.benchmark_cache.set_max_size_in_bytes", "not an int"))
6870

6971

72+
@pytest.mark.xfail(
73+
sys.platform == "darwin",
74+
strict=True,
75+
reason="github.com/facebookresearch/CompilerGym/issues/459",
76+
)
7077
@flaky # Runtime can timeout.
7178
@pytest.mark.parametrize("n", [1, 3, 10])
7279
def test_runtime_observation_parameters(env: LlvmEnv, n: int):

tests/llvm/observation_spaces_test.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,11 @@ def test_object_text_size_observation_spaces(env: LlvmEnv):
12021202
assert value == crc32_code_sizes[sys.platform][2]
12031203

12041204

1205+
@pytest.mark.xfail(
1206+
sys.platform == "darwin",
1207+
strict=True,
1208+
reason="github.com/facebookresearch/CompilerGym/issues/459",
1209+
)
12051210
@flaky # Runtimes can timeout
12061211
def test_runtime_observation_space(env: LlvmEnv):
12071212
env.reset("cbench-v1/crc32")
@@ -1226,6 +1231,11 @@ def test_runtime_observation_space(env: LlvmEnv):
12261231
assert len(set(value)) > 1
12271232

12281233

1234+
@pytest.mark.xfail(
1235+
sys.platform == "darwin",
1236+
strict=True,
1237+
reason="github.com/facebookresearch/CompilerGym/issues/459",
1238+
)
12291239
@flaky # Runtimes can timeout
12301240
def test_runtime_observation_space_different_observation_count(env: LlvmEnv):
12311241
"""Test setting a custom observation count for LLVM runtimes."""
@@ -1247,6 +1257,11 @@ def test_runtime_observation_space_different_observation_count(env: LlvmEnv):
12471257
assert value.shape == (5,)
12481258

12491259

1260+
@pytest.mark.xfail(
1261+
sys.platform == "darwin",
1262+
strict=True,
1263+
reason="github.com/facebookresearch/CompilerGym/issues/459",
1264+
)
12501265
@flaky # Runtimes can timeout
12511266
def test_runtime_observation_space_invalid_observation_count(env: LlvmEnv):
12521267
"""Test setting an invalid custom observation count for LLVM runtimes."""
@@ -1273,6 +1288,11 @@ def test_runtime_observation_space_not_runnable(env: LlvmEnv):
12731288
assert space.space.contains(value)
12741289

12751290

1291+
@pytest.mark.xfail(
1292+
sys.platform == "darwin",
1293+
strict=True,
1294+
reason="github.com/facebookresearch/CompilerGym/issues/459",
1295+
)
12761296
@flaky # Build can timeout
12771297
def test_buildtime_observation_space(env: LlvmEnv):
12781298
env.reset("cbench-v1/crc32")

tests/llvm/runtime_test.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
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
"""Integrations tests for LLVM runtime support."""
6+
import sys
67
from pathlib import Path
78

89
import numpy as np
@@ -16,6 +17,11 @@
1617
pytest_plugins = ["tests.pytest_plugins.llvm"]
1718

1819

20+
@pytest.mark.xfail(
21+
sys.platform == "darwin",
22+
strict=True,
23+
reason="github.com/facebookresearch/CompilerGym/issues/459",
24+
)
1925
@pytest.mark.parametrize("runtime_observation_count", [1, 3, 5])
2026
def test_custom_benchmark_runtime(env: LlvmEnv, tmpdir, runtime_observation_count: int):
2127
env.reset()
@@ -50,6 +56,11 @@ def test_custom_benchmark_runtime(env: LlvmEnv, tmpdir, runtime_observation_coun
5056
assert np.all(runtimes > 0)
5157

5258

59+
@pytest.mark.xfail(
60+
sys.platform == "darwin",
61+
strict=True,
62+
reason="github.com/facebookresearch/CompilerGym/issues/459",
63+
)
5364
@flaky
5465
def test_custom_benchmark_runtimes_differ(env: LlvmEnv, tmpdir):
5566
"""Same as above, but test that runtimes differ from run to run."""

0 commit comments

Comments
 (0)