aboutsummaryrefslogtreecommitdiff
path: root/scripts/incremental_build
diff options
context:
space:
mode:
authorusta <usta@google.com>2023-08-15 11:50:35 -0400
committerusta <usta@google.com>2023-08-21 10:12:21 -0400
commit3392ccbc61e6d9d6d7518e4d55ca690c18096d1a (patch)
tree3635180db659ee7100fbf114a951a80170b16e5f /scripts/incremental_build
parent3e546ee9ced40e993d7511c67cf5132d2db5a49f (diff)
downloadbazel-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.py5
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")