diff --git a/tools/deps_guard/rules_checker/base_innerapi_rule.py b/tools/deps_guard/rules_checker/base_innerapi_rule.py index a23bd704a0f620c3c186e832539538904c7a15cc..171e8261fec4f67900fc4e322135e5f58724487b 100644 --- a/tools/deps_guard/rules_checker/base_innerapi_rule.py +++ b/tools/deps_guard/rules_checker/base_innerapi_rule.py @@ -55,9 +55,9 @@ class BaseInnerapiRule(BaseRule): all(item in self.__valid_system_tags for item in callee_innerapi_tags): continue else: - self.warn("NEED MODIFY: system only module %s depends on wrong module as %s in %s, dep module path is %s" + self.error("NEED MODIFY: system only module %s depends on wrong module as %s in %s, dep module path is %s" %(mod["name"], callee["name"], mod["labelPath"], callee["path"])) - passed = True + passed = False # mod is vendor only scene elif self.is_only(self.__ignored_tags, mod) == "vendor" and \ all(item in self.__valid_vendor_tags for item in innerapi_tags): @@ -70,5 +70,5 @@ class BaseInnerapiRule(BaseRule): else: self.error("NEED MODIFY: system only module %s depends on wrong module as %s in %s, dep module path is %s" %(mod["name"], callee["name"], mod["labelPath"], callee["path"])) - passed = True + passed = False return passed \ No newline at end of file diff --git a/tools/deps_guard/rules_checker/base_rule.py b/tools/deps_guard/rules_checker/base_rule.py index e4ae0c662be9b989c17f29f9c088b52edd5501a8..b83b488d1ae15a0c9119cc3625d834808c3090e0 100755 --- a/tools/deps_guard/rules_checker/base_rule.py +++ b/tools/deps_guard/rules_checker/base_rule.py @@ -87,14 +87,14 @@ class BaseRule(object): if callee["name"] in white_lists: continue - passed = True + passed = False wrong_tags = [item for item in dep_innerapi_tags if item not in valid_dep_tags] - self.warn("NEED MODIFY: %s's dep file %s with %s contains wrong dep innerapi_tags [%s] in innerapi_tags [%s]" + self.error("NEED MODIFY: %s's dep file %s with %s contains wrong dep innerapi_tags [%s] in innerapi_tags [%s]" %(mod["name"], callee["name"], callee["labelPath"], ",".join(wrong_tags), ",".join(dep_innerapi_tags))) else: wrong_tags = [item for item in innerapi_tags if item not in valid_mod_tags] - self.warn("NEED MODIFY: module %s with %s contains wrong mod innerapi_tags [%s] in innerapi_tags [%s]" + self.error("NEED MODIFY: module %s with %s contains wrong mod innerapi_tags [%s] in innerapi_tags [%s]" %(mod["name"], mod["labelPath"], ",".join(wrong_tags), ",".join(innerapi_tags))) - return True + return False return passed \ No newline at end of file diff --git a/tools/deps_guard/rules_checker/chipsetsdk.py b/tools/deps_guard/rules_checker/chipsetsdk.py index aac7edfef208eac091fa44c91a83a7f25277f11b..566f704d7bdaf89d4ab624fbc33e76e1f68586af 100755 --- a/tools/deps_guard/rules_checker/chipsetsdk.py +++ b/tools/deps_guard/rules_checker/chipsetsdk.py @@ -210,8 +210,8 @@ class ChipsetSDKRule(BaseRule): continue # Not allowed - passed = True - self.warn("NEED MODIFY: chipset module %s in %s depends on non Chipset SDK module %s in %s" + passed = False + self.error("NEED MODIFY: chipset module %s in %s depends on non Chipset SDK module %s in %s" % (mod["name"], mod["labelPath"], callee["name"], mod["labelPath"])) return passed @@ -225,8 +225,8 @@ class ChipsetSDKRule(BaseRule): for mod in self.__modules_with_chipsetsdk_tag: if mod["name"] not in self.get_white_lists(): - passed = True - self.warn('NEED MODIFY: non chipsetsdk module %s with innerapi_tags="chipsetsdk", %s' + passed = False + self.error('NEED MODIFY: non chipsetsdk module %s with innerapi_tags="chipsetsdk", %s' % (mod["name"], mod["labelPath"])) for mod in self.__modules_with_chipsetsdk_indirect_tag: diff --git a/tools/deps_guard/rules_checker/chipsetsdk_sp.py b/tools/deps_guard/rules_checker/chipsetsdk_sp.py index aacff5cf0a7e05e9a9af0d536963fa3662b44652..c331e24bd429d0e59051c541ecd667d1050c4b34 100644 --- a/tools/deps_guard/rules_checker/chipsetsdk_sp.py +++ b/tools/deps_guard/rules_checker/chipsetsdk_sp.py @@ -200,8 +200,8 @@ class ChipsetsdkSPRule(BaseRule): continue # Not allowed - passed = True - self.warn("NEED MODIFY: chipset_sp module %s in %s depends on non ChipsetSDKSP module %s in %s" + passed = False + self.error("NEED MODIFY: chipset_sp module %s in %s depends on non ChipsetSDKSP module %s in %s" % (mod["name"], mod["labelPath"], callee["name"], mod["labelPath"])) return passed @@ -215,8 +215,8 @@ class ChipsetsdkSPRule(BaseRule): for mod in self.__modules_with_chipsetsdk_sp_tag: if mod["name"] not in self.get_white_lists(): - passed = True - self.warn('NEED MODIFY: non chipsetsdk_sp module %s with innerapi_tags="chipsetsdk_sp", %s' + passed = False + self.error('NEED MODIFY: non chipsetsdk_sp module %s with innerapi_tags="chipsetsdk_sp", %s' % (mod["name"], mod["labelPath"])) for mod in self.__modules_with_chipsetsdk_sp_indirect_tag: diff --git a/tools/deps_guard/rules_checker/passthrough.py b/tools/deps_guard/rules_checker/passthrough.py index 3d9115c5538fc7b745888f89ef34c86112873f08..d249fc1e5a14c6c09a8620a26a7bc90a8fc5f923 100644 --- a/tools/deps_guard/rules_checker/passthrough.py +++ b/tools/deps_guard/rules_checker/passthrough.py @@ -205,7 +205,7 @@ class PassthroughRule(BaseRule): continue # Not allowed - passed = True + passed = False self.error("NEED MODIFY: passthrough module %s in %s depends on non passthrough module %s in %s" % (mod["name"], mod["labelPath"], callee["name"], mod["labelPath"])) @@ -220,7 +220,7 @@ class PassthroughRule(BaseRule): for mod in self.__modules_with_passthrough_tag: if mod["name"] not in self.get_white_lists(): - passed = True + passed = False self.error('NEED MODIFY: non passthrough %s with innerapi_tags="passthrough", %s' % (mod["name"], mod["labelPath"]))