Skip to content

Commit

Permalink
GitHub CI: Fix running all tests (GH uses /opt/hostedtoolcache)
Browse files Browse the repository at this point in the history
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
  • Loading branch information
bernhardkaindl committed Apr 4, 2024
1 parent f386ad8 commit b50d199
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
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
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b50d199

Please sign in to comment.