patch 9.1.0827: CI: tests can be improved

Problem:  CI: tests can be improved
Solution: collect failed indent tests, raise timeout for search()
          functions when using ASAN/Valgrind (Aliaksei Budavei)

ASan-instrumented Vim builds tend to run slower (x2) than
non-instrumented Vim builds and occasionally make indent
tests fail when "search*()" functions time out and give up
further execution.

Reference:
https://github.com/google/sanitizers/wiki/AddressSanitizer

closes: #15974

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index ded3197..9bb500e 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -247,6 +247,11 @@
     let g:timeout_start = localtime()
   endif
 
+  if ValgrindOrAsan()
+    let g:vim_indent = {"searchpair_timeout": 1024}
+    let g:python_indent = {"searchpair_timeout": 1024}
+  endif
+
   " Avoid stopping at the "hit enter" prompt
   set nomore
 
diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim
index 1edf65a..a9b422c 100644
--- a/src/testdir/shared.vim
+++ b/src/testdir/shared.vim
@@ -318,6 +318,14 @@
   return GetVimCommand() =~ '\<valgrind\>'
 endfunc
 
+func RunningAsan()
+  return exists("$ASAN_OPTIONS")
+endfunc
+
+func ValgrindOrAsan()
+  return RunningWithValgrind() || RunningAsan()
+endfun
+
 " Get the command to run Vim, with --clean instead of "-u NONE".
 func GetVimCommandClean()
   let cmd = GetVimCommand()
diff --git a/src/version.c b/src/version.c
index 493de72..4aa4ab7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    827,
+/**/
     826,
 /**/
     825,