File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -389,7 +389,7 @@ def io_engine(request):
389
389
390
390
391
391
@pytest .fixture
392
- def results_dir (request ):
392
+ def results_dir (request , pytestconfig ):
393
393
"""
394
394
Fixture yielding the path to a directory into which the test can dump its results
395
395
@@ -411,9 +411,9 @@ def test_my_file(p, results_dir):
411
411
during doc tests, it will return None.
412
412
"""
413
413
try :
414
- results_dir = (
415
- defs . TEST_RESULTS_DIR / request . node . originalname / request . node . name
416
- )
414
+ report_file = pytestconfig . getoption ( "--json-report-file" )
415
+ parent = Path ( report_file ). parent . absolute ()
416
+ results_dir = parent / request . node . originalname / request . node . name
417
417
except AttributeError :
418
418
return None
419
419
results_dir .mkdir (parents = True , exist_ok = True )
Original file line number Diff line number Diff line change 23
23
# Default test session artifacts path
24
24
LOCAL_BUILD_PATH = FC_WORKSPACE_DIR / "build/"
25
25
26
- # Absolute path to the test results folder
27
- TEST_RESULTS_DIR = FC_WORKSPACE_DIR / "test_results"
28
-
29
26
DEFAULT_BINARY_DIR = (
30
27
LOCAL_BUILD_PATH
31
28
/ "cargo_target"
You can’t perform that action at this time.
0 commit comments