Bug 1677432 - mozlint/license: be more precriptive in the tests detection r=linter-reviewers,ahal

We were not managing /testing/ because /test was catching it

Differential Revision: https://phabricator.services.mozilla.com/D97136
This commit is contained in:
Sylvestre Ledru 2020-11-17 02:22:39 +00:00
Родитель bccb437849
Коммит 2b401f7e24
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -26,6 +26,8 @@ license:
- gradle.properties - gradle.properties
# might not work with license # might not work with license
- gradle/wrapper/gradle-wrapper.properties - gradle/wrapper/gradle-wrapper.properties
# tests
- js/src/devtools/rootAnalysis/t/
- mobile/android/components/extensions - mobile/android/components/extensions
- mobile/android/geckoview/src/main/AndroidManifest.xml - mobile/android/geckoview/src/main/AndroidManifest.xml
- mobile/android/geckoview/src/main/res/drawable/ic_generic_file.xml - mobile/android/geckoview/src/main/res/drawable/ic_generic_file.xml
@ -48,6 +50,7 @@ license:
- security/mac/hardenedruntime/production.entitlements.xml - security/mac/hardenedruntime/production.entitlements.xml
- servo/components/hashglobe/src/alloc.rs - servo/components/hashglobe/src/alloc.rs
- servo/components/hashglobe/src/shim.rs - servo/components/hashglobe/src/shim.rs
- testing/marionette/harness/marionette_harness/www/
- toolkit/components/reputationservice/chromium/chrome/common/safe_browsing/csd.pb.cc - toolkit/components/reputationservice/chromium/chrome/common/safe_browsing/csd.pb.cc
- toolkit/components/reputationservice/chromium/chrome/common/safe_browsing/csd.pb.h - toolkit/components/reputationservice/chromium/chrome/common/safe_browsing/csd.pb.h
- toolkit/mozapps/update/updater/crctable.h - toolkit/mozapps/update/updater/crctable.h

Просмотреть файл

@ -84,7 +84,9 @@ def is_test(f):
# For the unit tests # For the unit tests
return False return False
return ( return (
"/test" in f "/tests/" in f
or "/test/" in f
or "/test_" in f
or "/gtest" in f or "/gtest" in f
or "/crashtest" in f or "/crashtest" in f
or "/mochitest" in f or "/mochitest" in f