changeset 36434:0174a9ef2b59 draft v9.1.0827

patch 9.1.0827: CI: tests can be improved Commit: https://github.com/vim/vim/commit/f1d83c4c71dce0edefc9a94b2dfa3ca1c343f837 Author: Aliaksei Budavei <0x000c70@gmail.com> Date: Sat Nov 2 15:51:14 2024 +0100 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>
author Christian Brabandt <cb@256bit.org>
date Sat, 02 Nov 2024 16:00:11 +0100
parents b92acb8bcbe4
children fc72d25bc074
files .cirrus.yml .github/actions/screendump/action.yml .github/actions/test_artifacts/action.yml .github/workflows/ci.yml Filelist src/testdir/runtest.vim src/testdir/shared.vim src/version.c
diffstat 8 files changed, 48 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -22,9 +22,10 @@ freebsd_task:
     - chown -R cirrus:cirrus .
     - sudo -u cirrus make test
   on_failure:
-    screendump_artifacts:
+    test_artifacts:
       name: "Cirrus-CI-freebsd-failed-tests"
       path: |
+        runtime/indent/testdir/*.fail
         runtime/syntax/testdir/failed/*
         src/testdir/failed/*
       type: application/octet-stream
rename from .github/actions/screendump/action.yml
rename to .github/actions/test_artifacts/action.yml
--- a/.github/actions/screendump/action.yml
+++ b/.github/actions/test_artifacts/action.yml
@@ -1,5 +1,5 @@
-name: 'screendump'
-description: "Upload failed screendump tests"
+name: 'test_artifacts'
+description: "Upload failed test artifacts"
 runs:
   using: "composite"
   steps:
@@ -12,6 +12,7 @@ runs:
         # A file, directory or wildcard pattern that describes what
         # to upload.
         path: |
+         ${{ github.workspace }}/runtime/indent/testdir/*.fail
          ${{ github.workspace }}/runtime/syntax/testdir/failed/*
          ${{ github.workspace }}/src/testdir/failed/*
         # The desired behavior if no files are found using the
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -272,7 +272,7 @@ jobs:
           do_test make ${SHADOWOPT} ${TEST}
 
       - if: ${{ !cancelled() }}
-        uses: ./.github/actions/screendump
+        uses: ./.github/actions/test_artifacts
 
       - name: Vim tags
         if: contains(matrix.extra, 'vimtags')
@@ -394,7 +394,7 @@ jobs:
           make ${TEST}
 
       - if: ${{ !cancelled() }}
-        uses: ./.github/actions/screendump
+        uses: ./.github/actions/test_artifacts
 
   windows:
     runs-on: windows-2022
@@ -704,7 +704,7 @@ jobs:
           )
 
       - if: ${{ !cancelled() }}
-        uses: ./.github/actions/screendump
+        uses: ./.github/actions/test_artifacts
 
       - name: Generate gcov files
         if: matrix.coverage
--- a/Filelist
+++ b/Filelist
@@ -10,8 +10,8 @@ SRC_ALL =	\
 		.github/ISSUE_TEMPLATE/feature_request.md \
 		.github/workflows/ci.yml \
 		.github/workflows/codeql-analysis.yml \
-		.github/actions/screendump/action.yml \
 		.github/workflows/coverity.yml \
+		.github/actions/test_artifacts/action.yml \
 		.github/dependabot.yml \
 		.gitignore \
 		.hgignore \
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -247,6 +247,11 @@ func RunTheTest(test)
     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
 
--- a/src/testdir/shared.vim
+++ b/src/testdir/shared.vim
@@ -318,6 +318,14 @@ func RunningWithValgrind()
   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()
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    827,
+/**/
     826,
 /**/
     825,