Skip to content

Commit

Permalink
[tests] Increase timeouts for validation tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisCummins committed Mar 3, 2022
1 parent df66293 commit e496f11
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/llvm/validate_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
pytest_plugins = ["tests.pytest_plugins.llvm"]


@pytest.mark.timeout(900) # Validation can take a long time!
def test_validate_state_no_reward():
state = CompilerEnvState(
benchmark="benchmark://cbench-v1/crc32",
Expand All @@ -30,6 +31,7 @@ def test_validate_state_no_reward():
assert str(result) == "✅ cbench-v1/crc32"


@pytest.mark.timeout(900) # Validation can take a long time!
def test_validate_state_with_reward():
state = CompilerEnvState(
benchmark="benchmark://cbench-v1/crc32",
Expand All @@ -46,6 +48,7 @@ def test_validate_state_with_reward():
assert str(result) == "✅ cbench-v1/crc32 0.0000"


@pytest.mark.timeout(900) # Validation can take a long time!
def test_validate_state_invalid_reward():
state = CompilerEnvState(
benchmark="benchmark://cbench-v1/crc32",
Expand All @@ -64,6 +67,7 @@ def test_validate_state_invalid_reward():
)


@pytest.mark.timeout(900) # Validation can take a long time!
def test_validate_state_without_state_reward():
"""Validating state when state has no reward value."""
state = CompilerEnvState(
Expand Down Expand Up @@ -102,6 +106,7 @@ def test_validate_state_without_env_reward():
assert not result.reward_validation_failed


@pytest.mark.timeout(900) # Validation can take a long time!
def test_no_validation_callback_for_custom_benchmark(env: LlvmEnv):
"""Test that a custom benchmark has no validation callback."""
with tempfile.TemporaryDirectory() as d:
Expand Down

0 comments on commit e496f11

Please sign in to comment.