binman: Exclude dist-packages and site-packages
authorSimon Glass <sjg@chromium.org>
Thu, 10 Apr 2025 12:42:59 +0000 (06:42 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 11 Apr 2025 20:29:52 +0000 (14:29 -0600)
Newer versions of the python3-coverage tool require a directory
separator before and after the directory name. Add this so that system
package are not included in the coverage report.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/u_boot_pylib/test_util.py

index dd67196..ed216c4 100644 (file)
@@ -56,7 +56,7 @@ def run_test_coverage(prog, filter_fname, exclude_list, build_dir,
     else:
         glob_list = []
     glob_list += exclude_list
-    glob_list += ['*libfdt.py', '*site-packages*', '*dist-packages*']
+    glob_list += ['*libfdt.py', '*/site-packages/*', '*/dist-packages/*']
     glob_list += ['*concurrencytest*']
     test_cmd = 'test' if 'binman' in prog or 'patman' in prog else '-t'
     prefix = ''