Skip to content
Merged
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
9 changes: 9 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import operator
import os
import sys
import time
from pathlib import Path

import pytest
Expand Down Expand Up @@ -113,6 +114,14 @@ def token(request):


def pytest_configure(config):
junitxml_path = config.getoption("junitxml", None)
junitxml_global_dir = os.getenv("JUNITXML_DIR", None)

if not junitxml_path and junitxml_global_dir:
timestamp = time.strftime("%Y%m%d%H%M%S")
os.makedirs(junitxml_global_dir, exist_ok=True)
config.option.xmlpath = os.path.join(junitxml_global_dir, f"result_{timestamp}.xml")

# Bitsandbytes installation for {test_bnb_qlora.py test_bnb_inference.py} tests
# This change will be reverted shortly
bnb_tests = any("bnb" in name for name in config.known_args_namespace.file_or_dir)
Expand Down