Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,7 @@ def pytest_configure(config):
"markers",
"pleasefixme: marks test as needing fixes (will be skipped in CI)",
)
config.addinivalue_line(
"markers",
"run_only_on: marks test to run only on specific hardware (CPU/GPU)",
)
12 changes: 7 additions & 5 deletions tests/functional_tests/mcore/recipes/test_dit_pretrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def test_DiT_pretrain_mock(self, tmp_path):
]

# Run the command with a timeout
result = None
try:
# Stream output in real-time instead of capturing it
result = subprocess.run(
cmd,
capture_output=True,
Expand All @@ -73,14 +73,16 @@ def test_DiT_pretrain_mock(self, tmp_path):
check=True,
)

# Print output for debugging if needed
print("STDOUT:", result.stdout)
print("STDERR:", result.stderr)

# Basic verification that the run completed
assert result.returncode == 0, f"Command failed with return code {result.returncode}"

except subprocess.TimeoutExpired:
pytest.fail("DiT pretrain mock run exceeded timeout of 1800 seconds (30 minutes)")
except subprocess.CalledProcessError as e:
result = e
pytest.fail(f"DiT pretrain mock run failed with return code {e.returncode}")
finally:
# Always print output for debugging
if result is not None:
print("STDOUT:", result.stdout)
print("STDERR:", result.stderr)
12 changes: 7 additions & 5 deletions tests/functional_tests/mcore/recipes/test_wan_pretrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ def test_wan_pretrain_mock(self, tmp_path):
]

# Run the command with a timeout
result = None
try:
# Stream output in real-time instead of capturing it
result = subprocess.run(
cmd,
capture_output=True,
Expand All @@ -91,14 +91,16 @@ def test_wan_pretrain_mock(self, tmp_path):
check=True,
)

# Print output for debugging if needed
print("STDOUT:", result.stdout)
print("STDERR:", result.stderr)

# Basic verification that the run completed
assert result.returncode == 0, f"Command failed with return code {result.returncode}"

except subprocess.TimeoutExpired:
pytest.fail("WAN pretrain mock run exceeded timeout of 1800 seconds (30 minutes)")
except subprocess.CalledProcessError as e:
result = e
pytest.fail(f"WAN pretrain mock run failed with return code {e.returncode}")
finally:
# Always print output for debugging
if result is not None:
print("STDOUT:", result.stdout)
print("STDERR:", result.stderr)
Loading