summaryrefslogtreecommitdiff
path: root/unittests/helpers.py
diff options
context:
space:
mode:
authorLei YU <yulei.sh@bytedance.com>2023-09-28 07:26:12 +0000
committerEli Schwartz <eschwartz93@gmail.com>2023-09-28 10:54:39 -0400
commitdac25ba9a8dc3833edbc0d0fd133bc61c706f84a (patch)
tree7d382ffd3bd73427f5cce0d03e7ac7c720a43257 /unittests/helpers.py
parent5ff59f2fb515f47ed61598fed7749982fb20e49f (diff)
downloadmeson-dac25ba9a8dc3833edbc0d0fd133bc61c706f84a.tar.gz
unittest: Fix clang-tidy-fix
The unittest case for `clang-tidy-fix` checks if the whole project is in git or not, and skips if not. Fix this by creating a temporary git repo, copy the test files and run the tests, following how `clang-format` does. It also reverts some help code introduced in the previous test. Tested: Verify the test case passes. Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Diffstat (limited to 'unittests/helpers.py')
-rw-r--r--unittests/helpers.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/unittests/helpers.py b/unittests/helpers.py
index 83327cbad..7483f51b7 100644
--- a/unittests/helpers.py
+++ b/unittests/helpers.py
@@ -12,7 +12,7 @@ from contextlib import contextmanager
from mesonbuild.compilers import detect_c_compiler, compiler_from_language
from mesonbuild.mesonlib import (
MachineChoice, is_osx, is_cygwin, EnvironmentException, OptionKey, MachineChoice,
- OrderedSet, quiet_git
+ OrderedSet
)
from run_tests import get_fake_env
@@ -135,9 +135,6 @@ def is_tarball():
return True
return False
-def is_git_repo():
- return quiet_git(['branch'], '.')[0]
-
@contextmanager
def chdir(path: str):
curdir = os.getcwd()