import os,sys,json
from pathlib import Path
sys.path[:0]=['/out/head_source/tests','/out/head_source','/opt/contextra']
os.chdir('/out/head_source')
import pytest
class Report:
 def __init__(self):self.passed=0;self.failed=[]
 def pytest_runtest_logreport(self,report):
  if report.failed:self.failed.append(dict(test=report.nodeid,phase=report.when))
  elif report.when=='call' and report.passed:self.passed+=1
r=Report()
code=pytest.main(['-q','-p','no:cacheprovider','/out/head_source/tests/test_fall_integration.py'],plugins=[r])
Path('/out/reports/baseline_unit_result.json').write_text(json.dumps(dict(exit_code=int(code),passed=r.passed,failed=r.failed),indent=2))
raise SystemExit(code)
