You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
516 B
21 lines
516 B
sources = glob(['**/*.c'])
|
|
sources += glob(['**/Makefile'])
|
|
|
|
out = 'out'
|
|
|
|
clean_cmd = ' '.join(['rm', '-rf', out])
|
|
env_cmd = ' '.join(['export', 'REPORT_ASSERTION_FAILURE=1'])
|
|
infer_cmd = ' '.join(['infer', '-o', 'out', '--testing_mode', '--', 'make'])
|
|
copy_cmd = ' '.join(['cp', out + '/report.csv', '$OUT'])
|
|
command = ' && '.join([clean_cmd, env_cmd, infer_cmd, copy_cmd])
|
|
|
|
genrule(
|
|
name = 'analyze',
|
|
srcs = sources,
|
|
out = 'report.csv',
|
|
cmd = command,
|
|
visibility = [
|
|
'PUBLIC',
|
|
],
|
|
)
|