From 2574d6849f31ebf604f75544329fcd6824154d8d Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Fri, 9 Jun 2023 18:29:48 -0700 Subject: [PATCH] use pytest-output-to-files plugin with pytest==7.3.1 and pytest-xdist==3.3.1 --- .gitignore | 1 + .gitlab-ci.yml | 10 ++++++++-- pyproject.toml | 11 +++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 pyproject.toml diff --git a/.gitignore b/.gitignore index ad440053..6ce67a3b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ dist /crtl*/ /crtl* /formal_test_temp +/test-out/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5550beda..71a8ad1a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,7 +46,7 @@ build: - export CCACHE_COMPILERCHECK=content - ccache --zero-stats || true - ccache --show-stats || true - - python3 -m pip install --user pytest-xdist + - python3 -m pip install --user pytest-xdist==3.3.1 pytest==7.3.1 script: - git clone --depth 1 -b yosys-0.17 https://github.com/YosysHQ/yosys.git yosys - pushd yosys @@ -90,8 +90,14 @@ build: - python3 setup.py develop - popd + - git clone --depth 1 https://git.libre-soc.org/git/pytest-output-to-files.git pytest-output-to-files + - pushd pytest-output-to-files + - git rev-parse HEAD + - python3 setup.py develop + - popd + - python3 setup.py develop - make generate &> generate.log || { cat generate.log; false; } - - SILENCELOG='!*,default' pytest -n auto -v src/openpower --maxfail=10 + - SILENCELOG='!*,default' pytest -v --maxfail=10 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..ce84b6d1 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,11 @@ +[tool.pytest.ini_options] +minversion = "6.0" +python_classes = "" +python_functions = "" +testpaths = ["src/openpower"] +required_plugins = ["pytest-xdist>=1.0.0", "pytest-output-to-files>=0.1.0"] +addopts = [ + "-n", + "auto", + "--shorten-output-dir=test-out", +] -- 2.30.2