Skip to content

Commit

Permalink
csmock: use NOCHECK_RPM_OPTS also for %build
Browse files Browse the repository at this point in the history
... when execution of tests is not needed for the requested scan.
This fixes an unnecessary failure while SAST scanning
`jss-4.9.4-1.module+el8.7.0+15532+95bac9ee`

Resolves: https://issues.redhat.com/browse/OSH-697
Closes: #176
  • Loading branch information
kdudka committed Jun 21, 2024
1 parent b8a5553 commit 4248148
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion py/csmock
Original file line number Diff line number Diff line change
Expand Up @@ -1200,8 +1200,11 @@ cd %%s*/ || cd *\n\
if not props.skip_build:
if props.shell_cmd_to_build is None:
# run %build phase with static analyzers plugged-in
rpm_opts = props.rpm_opts
if not props.run_check:
rpm_opts += NOCHECK_RPM_OPTS
build_cmd = "rpmbuild -bc --nodeps --short-circuit %s %s" \
% (props.spec_in, strlist_to_shell_cmd(props.rpm_opts))
% (props.spec_in, strlist_to_shell_cmd(rpm_opts))
else:
# run the above prepared build script
build_cmd = "sh -x '%s'" % build_script
Expand Down

0 comments on commit 4248148

Please sign in to comment.