Skip to content

Commit

Permalink
tests: don't fail if can't run riscemu (xdslproject#1099)
Browse files Browse the repository at this point in the history
  • Loading branch information
superlopuh authored and s1837624 committed Jun 17, 2023
1 parent fb4ea20 commit 68f36e8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/filecheck/with-riscemu/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

try:
import riscemu
except ImportError:
config.unsupported = True
3 changes: 3 additions & 0 deletions tests/interpreters/test_riscv_emulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
from xdsl.ir import MLContext
from xdsl.transforms.riscv_register_allocation import RISCVRegisterAllocation

import pytest

pytest.importorskip("riscemu", reason="riscemu is an optional dependency")

from xdsl.interpreters.riscv_emulator import RV_Debug, run_riscv

Expand Down

0 comments on commit 68f36e8

Please sign in to comment.