diff --git a/Jenkinsfile b/Jenkinsfile index 320db1e0..d838981b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -486,7 +486,7 @@ pipeline { withXTAG(["XCORE-AI-EXPLORER"]) { adapterIDs -> sh "xtagctl reset ${adapterIDs[0]}" dir("test/pipeline") { - sh "python -m pytest -m group0 -n auto --junitxml=pytest_result.xml -rA -v --durations=0 -o junit_logging=all --log-cli-level=INFO --adapter-id " + adapterIDs[0] + sh "python -m pytest -m group0 -n auto --reruns=1 --only-rerun=\"host app exited with error code -15\" --reruns-delay=1 --junitxml=pytest_result.xml -rA -v --durations=0 -o junit_logging=all --log-cli-level=INFO --adapter-id " + adapterIDs[0] } } } @@ -523,7 +523,7 @@ pipeline { withXTAG(["XCORE-AI-EXPLORER"]) { adapterIDs -> sh "xtagctl reset ${adapterIDs[0]}" dir("test/pipeline") { - sh "python -m pytest -m group1 -n auto --junitxml=pytest_result.xml -rA -v --durations=0 -o junit_logging=all --log-cli-level=INFO " + sh "python -m pytest -m group1 -n auto --reruns=1 --only-rerun=\"host app exited with error code -15\" --reruns-delay=1 --junitxml=pytest_result.xml -rA -v --durations=0 -o junit_logging=all --log-cli-level=INFO " } } } diff --git a/requirements.txt b/requirements.txt index 52fb5a68..5644556f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -84,6 +84,7 @@ packaging==24.1 # build # matplotlib # pytest + # pytest-rerunfailures parso==0.8.4 # via jedi pexpect==4.9.0 @@ -121,7 +122,10 @@ pyright==1.1.389 pytest==8.2.2 # via # -r tools/requirements.in + # pytest-rerunfailures # pytest-xdist +pytest-rerunfailures==14.0 + # via -r tools/requirements.in pytest-xdist==3.6.1 # via -r tools/requirements.in python-dateutil==2.9.0.post0 diff --git a/tools/requirements.in b/tools/requirements.in index 7ce65029..9e10911d 100644 --- a/tools/requirements.in +++ b/tools/requirements.in @@ -2,6 +2,7 @@ soundfile pytest pytest-xdist +pytest-rerunfailures pyright ruff filelock