Skip to content

Commit

Permalink
Added exception to symlink handling at cppcheck
Browse files Browse the repository at this point in the history
Sometimes the cppcheck-run failed due to symlink
target existing. The previous cleanup didn't help
so it is best to just drop the exception here
  • Loading branch information
priv-kweihmann committed Feb 9, 2019
1 parent acbaa95 commit 7da7005
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions classes/sca-cppcheck.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,18 @@ python do_sca_cppcheck() {
## Run
if os.path.exists("std.cfg"):
os.remove("std.cfg")
os.symlink(os.path.join(d.getVar("STAGING_BINDIR_NATIVE", True), "cfg", "std.cfg"), "std.cfg")
try:
os.symlink(os.path.join(d.getVar("STAGING_BINDIR_NATIVE", True), "cfg", "std.cfg"), "std.cfg")
except FileExistsError:
pass
cur_dir = os.getcwd()
os.chdir(d.getVar("B", True))
if os.path.exists("std.cfg"):
os.remove("std.cfg")
os.symlink(os.path.join(d.getVar("STAGING_BINDIR_NATIVE", True), "cfg", "std.cfg"), "std.cfg")
try:
os.symlink(os.path.join(d.getVar("STAGING_BINDIR_NATIVE", True), "cfg", "std.cfg"), "std.cfg")
except FileExistsError:
pass
cmd_output = ""
try:
cmd_output = subprocess.check_output(_args, universal_newlines=True)
Expand Down

0 comments on commit 7da7005

Please sign in to comment.