Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions test/cbmc/proofs/Makefile.template
Original file line number Diff line number Diff line change
Expand Up @@ -119,38 +119,36 @@ goto:
# Ignore the return code for CBMC, so that we can still generate the
# report if the proof failed. If the proof failed, we separately fail
# the entire job using the check-cbmc-result rule.
cbmc.txt: $(ENTRY).goto
-cbmc $(CBMCFLAGS) $(SOLVER) --unwinding-assertions --trace @RULE_INPUT@ > $@ 2>&1
cbmc.xml: $(ENTRY).goto
-cbmc $(CBMCFLAGS) $(SOLVER) --unwinding-assertions --trace --xml-ui @RULE_INPUT@ > $@ 2>&1

property.xml: $(ENTRY).goto
cbmc $(CBMCFLAGS) --unwinding-assertions --show-properties --xml-ui @RULE_INPUT@ > $@ 2>&1

coverage.xml: $(ENTRY).goto
cbmc $(CBMCFLAGS) --cover location --xml-ui @RULE_INPUT@ > $@ 2>&1

cbmc: cbmc.txt
cbmc: cbmc.xml

property: property.xml

coverage: coverage.xml

report: cbmc.txt property.xml coverage.xml
report: cbmc.xml property.xml coverage.xml
$(VIEWER) \
--goto $(ENTRY).goto \
--srcdir $(FREERTOS_PLUS_TCP) \
--blddir $(FREERTOS_PLUS_TCP) \
--htmldir html \
--srcexclude "(.@FORWARD_SLASH@doc|.@FORWARD_SLASH@tests|.@FORWARD_SLASH@vendors)" \
--result cbmc.txt \
--reportdir report \
--result cbmc.xml \
--property property.xml \
--block coverage.xml
--coverage coverage.xml

# This rule depends only on cbmc.txt and has no dependents, so it will
# This rule depends only on cbmc.xml and has no dependents, so it will
# not block the report from being generated if it fails. This rule is
# intended to fail if and only if the CBMC safety check that emits
# cbmc.txt yielded a proof failure.
check-cbmc-result: cbmc.txt
grep -e "^VERIFICATION SUCCESSFUL" $^
# cbmc.xml yielded a proof failure.
check-cbmc-result: cbmc.xml
grep '<cprover-status>SUCCESS</cprover-status>' $^

# ____________________________________________________________________
# Rules
Expand All @@ -160,7 +158,7 @@ check-cbmc-result: cbmc.txt
clean:
@RM@ $(OBJS) $(ENTRY).goto
@RM@ $(ENTRY)[0-9].goto $(ENTRY)[0-9].txt
@RM@ cbmc.txt property.xml coverage.xml TAGS TAGS-*
@RM@ cbmc.xml property.xml coverage.xml TAGS TAGS-*
@RM@ *~ \#*
@RM@ queue_datastructure.h

Expand Down