[ci] Retry flaky tests only on PRs (#5492)
[mono.git] / scripts / ci / run-jenkins.sh
index fcc26b7eff6e02dcbe4470a76569be0cae8c8109..bdecfae3efb974b15ed2b08a787f2b04716aa4ab 100755 (executable)
@@ -29,6 +29,10 @@ else
     export CFLAGS="-ggdb3 -O2"
 fi
 
+if [[ $CI_TAGS == *'retry-flaky-tests'* ]]; then
+    export MONO_FLAKY_TEST_RETRIES=5
+fi
+
 if [[ ${label} == 'osx-i386' ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-libgdiplus=/Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib --build=i386-apple-darwin11.2.0"; fi
 if [[ ${label} == 'osx-amd64' ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-libgdiplus=/Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib "; fi
 if [[ ${label} == 'w32' ]]; then PLATFORM=Win32; EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --host=i686-w64-mingw32"; export MONO_EXECUTABLE="${MONO_REPO_ROOT}/msvc/build/sgen/Win32/bin/Release/mono-sgen.exe"; fi