forked from lix-project/nix-eval-jobs
fix ci for infinite recursion case
This commit is contained in:
parent
4d97e5a386
commit
b4f7eb3c77
8
.github/workflows/nix-github-actions.yml
vendored
8
.github/workflows/nix-github-actions.yml
vendored
|
@ -49,7 +49,13 @@ jobs:
|
|||
- name: Build
|
||||
run: nix develop -c bash -c 'meson setup -Db_sanitize=address,undefined build && ninja -C build'
|
||||
- name: Run tests
|
||||
run: nix develop -c pytest ./tests
|
||||
run: nix develop -c pytest ./tests -m 'not infiniterecursion'
|
||||
|
||||
# address sanitizer will lead to out-of-memory in the infinite recursion case
|
||||
- name: Build without sanitizer
|
||||
run: nix develop -c bash -c 'rm -rf build && meson setup build && ninja -C build'
|
||||
- name: Run tests
|
||||
run: nix develop -c pytest ./tests -m 'infiniterecursion'
|
||||
|
||||
collect:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
4
pyproject.toml
Normal file
4
pyproject.toml
Normal file
|
@ -0,0 +1,4 @@
|
|||
[tool.pytest.ini_options]
|
||||
markers = [
|
||||
"infiniterecursion: mark test as infinite recursion",
|
||||
]
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
import json
|
||||
import subprocess
|
||||
import pytest
|
||||
from pathlib import Path
|
||||
from tempfile import TemporaryDirectory
|
||||
from typing import Any, Dict, List
|
||||
|
@ -94,6 +95,7 @@ def test_eval_error() -> None:
|
|||
assert "this is an evaluation error" in attrs["error"]
|
||||
|
||||
|
||||
@pytest.mark.infiniterecursion
|
||||
def test_recursion_error() -> None:
|
||||
with TemporaryDirectory() as tempdir:
|
||||
cmd = [
|
||||
|
|
Loading…
Reference in a new issue