diff options
author | usta <usta@google.com> | 2023-08-15 11:50:35 -0400 |
---|---|---|
committer | usta <usta@google.com> | 2023-08-21 10:12:21 -0400 |
commit | 3392ccbc61e6d9d6d7518e4d55ca690c18096d1a (patch) | |
tree | 3635180db659ee7100fbf114a951a80170b16e5f /scripts/incremental_build | |
parent | 3e546ee9ced40e993d7511c67cf5132d2db5a49f (diff) | |
download | bazel-3392ccbc61e6d9d6d7518e4d55ca690c18096d1a.tar.gz |
Add test for find.is_git_repositor()
Bug: NA
Test: run the added test
Change-Id: I9c0935e7eca56d73fe58bcdd03e2cf5d68d1f7f3
Diffstat (limited to 'scripts/incremental_build')
-rw-r--r-- | scripts/incremental_build/finder_test.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/incremental_build/finder_test.py b/scripts/incremental_build/finder_test.py index 72208745..eb7e9508 100644 --- a/scripts/incremental_build/finder_test.py +++ b/scripts/incremental_build/finder_test.py @@ -15,10 +15,15 @@ import os import unittest from finder import any_match +from finder import is_git_repo from util import get_top_dir class UtilTest(unittest.TestCase): + def test_is_git_repo(self): + self.assertFalse(is_git_repo(get_top_dir())) + self.assertTrue(is_git_repo(get_top_dir().joinpath("build/soong"))) + def test_any_match(self): with self.subTest("root.bp"): path, matches = any_match("root.bp") |