Skip to content

Commit

Permalink
Fix flaw on pysymcheck integration
Browse files Browse the repository at this point in the history
  • Loading branch information
priv-kweihmann committed Feb 28, 2019
1 parent 43ceee6 commit 7c545db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion classes/sca-conv-checkstyle-pysymcheck.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def do_sca_conv_pysymcheck(d):
buildpath = d.getVar("SCA_SOURCES_DIR", True)

items = []
pattern = r"^(?P<file>.*):(?P<severity>.*):(?P<id>,*):\s+(?P<message>.*)"
pattern = r"^(?P<file>.*):(?P<severity>.*):(?P<id>.*):\s+(?P<message>.*)"

class SymItem():
File = ""
Expand Down
5 changes: 4 additions & 1 deletion classes/sca-pysymcheck.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SCA_PYSYMCHECK_EXTRA_SUPPRESS ?= ""
## Add ids to lead to a fatal on a recipe level
SCA_PYSYMCHECK_EXTRA_FATAL ?= ""
## Used rule file
SCA_PYSYMCHECK_RULE_FILE ?= "basic-rules.json"
SCA_PYSYMCHECK_RULE_FILE ?= "basic_rules.json"

inherit sca-helper
inherit sca-conv-checkstyle-pysymcheck
Expand All @@ -24,6 +24,9 @@ python do_sca_pysymcheck() {
_args += ["--libpath", ":".join([d.getVar("STAGING_LIBDIR_NATIVE")])]
_args += [os.path.join(d.getVar("STAGING_BINDIR_NATIVE"), "pysymbolcheck", d.getVar("SCA_PYSYMCHECK_RULE_FILE"))]

if not os.path.exists(os.path.join(d.getVar("STAGING_BINDIR_NATIVE"), "pysymbolcheck", d.getVar("SCA_PYSYMCHECK_RULE_FILE"))):
bb.warn("Rule-File {} does not exists - Empty results will be expected".format(d.getVar("SCA_PYSYMCHECK_RULE_FILE")))

_files = get_files_by_mimetype(d, d.getVar("B"), ["application/x-executable", 'application/x-sharedlib'], [])
## Run
cmd_output = ""
Expand Down

0 comments on commit 7c545db

Please sign in to comment.