image_test.py: fix TestBlockedFileTypes accidentally blocking csh files
TestBlockedFileTypes accidentally blocks csh files because regex text/c
will match text/csh. This CL fixes it.
BUG=b:175095747
TEST=CQ
Change-Id: I5faeb98c264b493461d090fecf04372377a7a3bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2578801
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Boleyn Su <boleynsu@chromium.org>
Tested-by: Boleyn Su <boleynsu@chromium.org>
Auto-Submit: Boleyn Su <boleynsu@chromium.org>
diff --git a/cros/test/image_test.py b/cros/test/image_test.py
index 8fecee7..4e6bb79 100644
--- a/cros/test/image_test.py
+++ b/cros/test/image_test.py
@@ -113,8 +113,8 @@
The allow list has higher precedence than the block list.
"""
blocked_patterns = [re.compile(x) for x in [
- r'text/x-c\+\+',
- r'text/x-c',
+ r'^text/x-c\+\+$',
+ r'^text/x-c$',
]]
allowed_patterns = [re.compile(x) for x in [
r'.*/braille/.*',