Skip to content

Commit

Permalink
More CI debuggery
Browse files Browse the repository at this point in the history
  • Loading branch information
psakievich committed Dec 1, 2023
1 parent 1053c1d commit e6b7f06
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Run unit tests
run: |
. spack/share/spack/setup-env.sh
spack unit-test --extension manager
spack unit-test --extension manager -k test_find_machine --showlocals
style-checks:
runs-on: ubuntu-latest
strategy:
Expand Down
4 changes: 0 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,14 @@
@pytest.fixture
def mock_manager_config_path(monkeypatch):
""" "Setup to use a testing project repo embedded in the tests"""
print(_test_root)
config_path = os.path.join(_test_root, "mock", "mock_config.yaml")
print("CONFIG PATH:", config_path, os.path.isfile(config_path))
monkeypatch.setattr(
manager, "config_path", config_path
)
print("MOCK CONFIG PATH:", manager.config_path, os.path.isfile(manager.config_path))
manager.populate_config()
manager.load_projects()


@pytest.fixture
def on_moonlight(monkeypatch, mock_manager_config_path):
monkeypatch.setenv("MOONLIGHT", "1")
print(os.environ)
3 changes: 3 additions & 0 deletions tests/test_find_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@
import pytest

import spack.main
import manager

mgrCmd = spack.main.SpackCommand("manager")


def test_find_machine_detects_project_machines(mock_manager_config_path):
print(manager.projects)
print(manager.config_path)
out = mgrCmd("find-machine", "--list")
assert "moonlight" in out

Expand Down

0 comments on commit e6b7f06

Please sign in to comment.