unit-test: don't find files in meson subprojects

Support running against source trees with populated meson subprojects.

Avoid running ci scripts and code formatters from subprojects since they
are not the repository under test.

Change-Id: I753915926b06fdebfbe77c3157432ff07077b742
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/scripts/unit-test.py b/scripts/unit-test.py
index e56389a..d0be4c7 100755
--- a/scripts/unit-test.py
+++ b/scripts/unit-test.py
@@ -1097,6 +1097,12 @@
 
     filepaths = []
     for root, dirs, files in os.walk(basedir):
+        if os.path.split(root)[-1] == 'subprojects':
+            for f in files:
+                subproject = '.'.join(f.split('.')[0:-1])
+                if f.endswith('.wrap') and subproject in dirs:
+                    # don't find files in meson subprojects with wraps
+                    dirs.remove(subproject)
         for f in filename:
             if f in files:
                 filepaths.append(os.path.join(root, f))