]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ab/sanitize-leak-ci' into ab/unpack-trees-leakfix
authorJunio C Hamano <gitster@pobox.com>
Thu, 7 Oct 2021 22:28:38 +0000 (15:28 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 7 Oct 2021 22:28:38 +0000 (15:28 -0700)
* ab/sanitize-leak-ci:
  tests: add a test mode for SANITIZE=leak, run it in CI
  Makefile: add SANITIZE=leak flag to GIT-BUILD-OPTIONS

1  2 
.github/workflows/main.yml
Makefile
t/README
t/test-lib.sh

Simple merge
diff --cc Makefile
Simple merge
diff --cc t/README
Simple merge
diff --cc t/test-lib.sh
index aa1ad8180ed877b51280ff908e30a81aa397715a,3b7acfec23b3d6f924677429dbcc0671746d8b04..8361b5c1c574ed031ec5aaac1332297055450e07
        test_done
  fi
  
+ # skip non-whitelisted tests when compiled with SANITIZE=leak
+ if test -n "$SANITIZE_LEAK"
+ then
+       if test_bool_env GIT_TEST_PASSING_SANITIZE_LEAK false
+       then
+               # We need to see it in "git env--helper" (via
+               # test_bool_env)
+               export TEST_PASSES_SANITIZE_LEAK
+               if ! test_bool_env TEST_PASSES_SANITIZE_LEAK false
+               then
+                       skip_all="skipping $this_test under GIT_TEST_PASSING_SANITIZE_LEAK=true"
+                       test_done
+               fi
+       fi
+ elif test_bool_env GIT_TEST_PASSING_SANITIZE_LEAK false
+ then
+       error "GIT_TEST_PASSING_SANITIZE_LEAK=true has no effect except when compiled with SANITIZE=leak"
+ fi
  # Last-minute variable setup
 +USER_HOME="$HOME"
  HOME="$TRASH_DIRECTORY"
  GNUPGHOME="$HOME/gnupg-home-not-used"
 -export HOME GNUPGHOME
 +export HOME GNUPGHOME USER_HOME
  
  # Test repository
  rm -fr "$TRASH_DIRECTORY" || {