From ce8002ff31b0574606bbd2044a1497b77a43c5d7 Mon Sep 17 00:00:00 2001 From: Bernhard Kaindl Date: Thu, 28 Mar 2024 12:00:00 +0100 Subject: [PATCH] GitHub CI: Fix running all tests (GH uses /opt/hostedtoolcache) Signed-off-by: Bernhard Kaindl --- .coveragerc | 2 +- .github/workflows/main.yml | 4 ++-- tests/integration/conftest.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.coveragerc b/.coveragerc index 89fa8df..efa0eba 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,5 +1,5 @@ [run] -command_line = -m pytest --junitxml=.git/pytest.xml --cov-report=term-missing tests/unit +command_line = -m pytest --junitxml=.git/pytest.xml --cov-report=term-missing # Default data file for "coverage run": Store coverage data in .git/.coverage data_file = .git/.coverage relative_files = True diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a94f54c..a701fb5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,7 +71,7 @@ jobs: run: | if [ -f requirements.txt ]; then pip2 install -r requirements.txt; fi if [ -f requirements-dev.txt ]; then pip2 install -r requirements-dev.txt; fi - pip2 install pylint==1.9.4 + pip2 install pylint==1.9.4; sudo mkdir /opt/xensource # mountpoint for tests - name: Run pylint-1.9.4 for pylint --py3k linting (configured in .pylintrc) run: python2 -m pylint xen-bugtool @@ -146,7 +146,7 @@ jobs: python-version: '3.10' cache: 'pip' - - run: pip install -r requirements-dev.txt + - run: pip install -r requirements-dev.txt; sudo mkdir /opt/xensource name: Install the pytest dependencies for running the pytest suite using Python3 - uses: actions/cache@v4 diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index a213cdf..78a3619 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -24,7 +24,7 @@ def create_and_enter_test_environment(mocks_dir): activate_private_test_namespace( BUGTOOL_DOM0_TEMPL, - ["/etc", "/opt", "/usr/sbin", "/usr/lib/systemd"], + ["/etc", "/opt/xensource", "/usr/sbin", "/usr/lib/systemd"], ) # Add the mocks directory to the PYTHONPATH for sub-processes to find the mocks: