Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing cleanup #7798

Merged
merged 5 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
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
27 changes: 26 additions & 1 deletion .github/workflows/pull-request-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,24 @@ jobs:
make TAGS="[!shouldfail]" -C jbmc/unit test IPASIR=$PWD/riss.git/riss
- name: Run regression tests
run: |
make -C regression test-parallel JOBS=2
make -C regression test-parallel JOBS=2 LIBS="$PWD/riss.git/release/lib/libriss-coprocessor.a -lpthread" IPASIR=$PWD/riss.git/riss
make -C regression/cbmc test-paths-lifo
env PATH=$PATH:`pwd`/src/solvers make -C regression/cbmc test-cprover-smt2
make -C jbmc/regression test-parallel JOBS=2
- name: Check cleanup
run: |
make -C src clean IPASIR=$PWD/riss.git/riss
make -C jbmc/src clean IPASIR=$PWD/riss.git/riss
rm -r riss.git
rm src/goto-cc/goto-ld
make -C unit clean
make -C regression clean
make -C jbmc/unit clean
make -C jbmc/regression clean
if [[ $(git status --ignored --porcelain | grep -v .ccache/) ]] ; then
git status --ignored
exit 1
fi

# This job takes approximately 25 to 34 minutes
check-ubuntu-20_04-make-clang:
Expand Down Expand Up @@ -241,6 +255,17 @@ jobs:
ls *.deb
- name: Run tests
run: cd build; ctest . -V -L CORE -j2
- name: Check cleanup
run: |
rm -r build
rm scripts/bash-autocomplete/cbmc.sh
make -C unit clean
make -C regression clean
make -C jbmc/regression clean
if [[ $(git status --ignored --porcelain | grep -v .ccache/) ]] ; then
git status --ignored
exit 1
fi

# This job takes approximately 34 to 38 minutes
check-ubuntu-22_04-make-clang:
Expand Down
10 changes: 6 additions & 4 deletions regression/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ DIRS = cbmc-shadow-memory \
goto-diff \
test-script \
goto-analyzer-taint \
goto-bmc/goto-bmc-symex-ready-goto \
goto-bmc/goto-bmc-non-symex-ready-goto \
goto-bmc \
goto-gcc \
goto-cl \
goto-cc-cbmc \
Expand Down Expand Up @@ -59,6 +62,7 @@ DIRS = cbmc-shadow-memory \
cbmc-sequentialization \
cpp-linter \
catch-framework \
libcprover-cpp \
# Empty last line

ifeq ($(OS),Windows_NT)
Expand Down Expand Up @@ -110,9 +114,7 @@ test-parallel:

.PHONY: clean
clean:
@for dir in *; do \
if [ -d "$$dir" ]; then \
$(MAKE) -C "$$dir" clean; \
fi; \
@for dir in $(DIRS); do \
$(MAKE) -C "$$dir" clean; \
done;
$(RM) tests.log
2 changes: 1 addition & 1 deletion regression/ansi-c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ build_goto_binaries:
clean:
find . -name '*.out' -execdir $(RM) '{}' \;
find . -name '*.gb' -execdir $(RM) '{}' \;
$(RM) tests.log tests-c++-front-end.log
$(RM) tests*.log
1 change: 1 addition & 0 deletions regression/catch-framework/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ test:
tests.log: ../test.pl test

clean:
find . -name '*.out' -execdir $(RM) '{}' \;
$(RM) tests*.log
2 changes: 1 addition & 1 deletion regression/cbmc-primitives/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ tests.log: ../test.pl

clean:
find . -name '*.out' -execdir $(RM) '{}' \;
$(RM) tests.log
$(RM) tests*.log
1 change: 1 addition & 0 deletions regression/cbmc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ tests.log: ../test.pl test
clean:
find . -name '*.out' -execdir $(RM) '{}' \;
find . -name '*.smt2' -execdir $(RM) '{}' \;
$(RM) export-symex-ready-goto/exported.symex.ready.goto
$(RM) tests*.log
2 changes: 1 addition & 1 deletion regression/contracts-dfcc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ tests.log: ../test.pl test

clean:
@for dir in *; do \
$(RM) tests.log; \
if [ -d "$$dir" ]; then \
cd "$$dir"; \
$(RM) *.out *.gb *.smt2; \
cd ..; \
fi \
done
$(RM) tests*.log
1 change: 1 addition & 0 deletions regression/cprover/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ test-no-p:
@../test.pl -e -c '../../../src/cprover/cprover'

clean:
find . -name '*.out' -execdir $(RM) '{}' \;
$(RM) tests.log
12 changes: 12 additions & 0 deletions regression/goto-bmc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
default: tests.log

test:
@../test.pl -e -p -c ../../../src/goto-bmc/goto-bmc

tests.log: ../test.pl
@../test.pl -e -p -c ../../../src/goto-bmc/goto-bmc

clean:
find . -name '*.out' -execdir $(RM) '{}' \;
find . -name '*.gb' -execdir $(RM) '{}' \;
$(RM) tests.log
25 changes: 25 additions & 0 deletions regression/goto-bmc/goto-bmc-non-symex-ready-goto/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
default: tests.log

include ../../../src/config.inc
include ../../../src/common

GOTO_BMC_EXE=../../../../src/goto-bmc/goto-bmc

ifeq ($(BUILD_ENV_),MSVC)
GOTO_CC_EXE=../../../../src/goto-cc/goto-cl
is_windows=true
else
GOTO_CC_EXE=../../../../src/goto-cc/goto-cc
is_windows=false
endif

test:
@../../test.pl -e -p -c "../chain.sh $(GOTO_CC_EXE) $(GOTO_BMC_EXE) $(is_windows)"

tests.log: ../test.pl
@../../test.pl -e -p -c "../chain.sh $(GOTO_CC_EXE) $(GOTO_BMC_EXE) $(is_windows)"

clean:
find . -name '*.out' -execdir $(RM) '{}' \;
find . -name '*.gb' -execdir $(RM) {} \;
$(RM) tests.log
15 changes: 15 additions & 0 deletions regression/goto-bmc/goto-bmc-symex-ready-goto/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
default: tests.log

CBMC_EXE=../../../../src/cbmc/cbmc
GOTO_BMC_EXE=../../../../src/goto-bmc/goto-bmc

test:
@../../test.pl -e -p -c "../chain.sh $(CBMC_EXE) $(GOTO_BMC_EXE)"

tests.log: ../test.pl
@../../test.pl -e -p -c "../chain.sh $(CBMC_EXE) $(GOTO_BMC_EXE)"

clean:
find . -name '*.out' -execdir $(RM) '{}' \;
find . -name '*.gb' -execdir $(RM) {} \;
$(RM) tests.log
4 changes: 2 additions & 2 deletions regression/goto-bmc/goto-bmc-symex-ready-goto/chain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ options=${*:3:$#-3}
name=${*:$#}
base_name=${name%.c}

"${cbmc}" --export-symex-ready-goto "${base_name}.goto.symex_ready" "${name}"
"${goto_bmc}" "${base_name}.goto.symex_ready" ${options}
"${cbmc}" --export-symex-ready-goto "${base_name}.gb" "${name}"
"${goto_bmc}" "${base_name}.gb" ${options}
1 change: 1 addition & 0 deletions regression/goto-harness/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ tests.log: ../test.pl
clean:
find . -name '*.out' -execdir $(RM) '{}' \;
find . -name '*.gb' -execdir $(RM) {} \;
find . -name '*-harness.c' -execdir $(RM) {} \;
$(RM) tests.log
1 change: 1 addition & 0 deletions regression/goto-instrument/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ clean:
cd ..; \
fi \
done
$(RM) ../cbmc/Recursion6/*.gb
41 changes: 41 additions & 0 deletions regression/libcprover-cpp/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
default: tests.log

SRC = call_bmc.cpp $(wildcard ../../src/libcprover-cpp/*.cpp)

OBJ += ../../src/libcprover-cpp/libcprover-cpp$(LIBEXT)

INCLUDES = -I ../../src/ -I ../../src/goto-programs/

CLEANFILES = api-binary-driver$(EXEEXT)

include ../../src/config.inc
include ../../src/common

api-binary-driver$(EXEEXT): $(OBJ)
$(LINKBIN)

DIRS = \
model_loading

test:
@for dir in $(DIRS); do \
$(MAKE) -C "$$dir" test || exit 1; \
done;

tests.log:
@for dir in $(DIRS); do \
$(MAKE) -C "$$dir" tests.log || exit 1; \
done;

test tests.log: api-binary-driver$(EXEEXT)

clean: regression_clean

.PHONY: regression_clean
regression_clean:
@for dir in *; do \
if [ -d "$$dir" ]; then \
$(MAKE) -C "$$dir" clean; \
fi; \
done;
$(RM) tests.log
12 changes: 12 additions & 0 deletions regression/libcprover-cpp/model_loading/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
default: tests.log

test:
@../../test.pl -e -p -c ../../api-binary-driver

tests.log:
@../../test.pl -e -p -c ../../api-binary-driver

clean:
find . -name '*.out' -execdir $(RM) '{}' \;
find . -name '*.gb' -execdir $(RM) '{}' \;
$(RM) tests.log
1 change: 1 addition & 0 deletions regression/solver-hardness/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ tests.log: ../test.pl test

clean:
find . -name '*.out' -execdir $(RM) '{}' \;
find . -name '*.json' -execdir $(RM) '{}' \;
$(RM) tests.log
1 change: 1 addition & 0 deletions regression/validate-trace-xml-schema/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
# these test for invalid command line handling
['bad_option', 'test_multiple.desc'],
['bad_option', 'test.desc'],
['export-symex-ready-goto', 'test-bad-usage.desc'],
['unknown-argument-suggestion', 'test.desc'],
['sat-solver-error', 'test.desc'],
# this one produces XML intermingled with main XML output when used with --xml-ui
Expand Down
7 changes: 7 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ DIRS = analyses \
cprover \
crangler \
goto-analyzer \
goto-bmc \
goto-cc \
goto-checker \
goto-diff \
Expand All @@ -20,6 +21,7 @@ DIRS = analyses \
json \
json-symtab-language \
langapi \
libcprover-cpp \
linking \
memory-analyzer \
pointer-analysis \
Expand All @@ -34,6 +36,7 @@ all: cbmc.dir \
cprover.dir \
crangler.dir \
goto-analyzer.dir \
goto-bmc.dir \
goto-cc.dir \
goto-diff.dir \
goto-instrument.dir \
Expand Down Expand Up @@ -114,6 +117,10 @@ goto-synthesizer.dir: languages util.dir goto-programs.dir langapi.dir \
json.dir goto-checker.dir \
goto-instrument.dir

goto-bmc.dir: libcprover-cpp.dir

libcprover-cpp.dir: cbmc.dir

# building for a particular directory

$(patsubst %, %.dir, $(DIRS)):
Expand Down
29 changes: 29 additions & 0 deletions src/goto-bmc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
SRC = \
goto_bmc_main.cpp \
goto_bmc_parse_options.cpp \
# Empty last line

OBJ += \
../libcprover-cpp/libcprover-cpp$(LIBEXT) \
# Empty last line

INCLUDES= -I .. -I ../libcprover-cpp

LIBS =

CLEANFILES = goto-bmc$(EXEEXT)

include ../config.inc
include ../common

all: goto-bmc$(EXEEXT)

###############################################################################

goto-bmc$(EXEEXT): $(OBJ)
$(LINKBIN)

.PHONY: goto-bmc-mac-signed

goto-bmc-mac-signed: goto-bmc$(EXEEXT)
codesign -v -s $(OSX_IDENTITY) goto-bmc$(EXEEXT)
61 changes: 61 additions & 0 deletions src/libcprover-cpp/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
SRC = \
api.cpp \
api_options.cpp \
verification_result.cpp \
# Empty last line

OBJ += \
../analyses/analyses$(LIBEXT) \
../ansi-c/ansi-c$(LIBEXT) \
../assembler/assembler$(LIBEXT) \
../big-int/big-int$(LIBEXT) \
../goto-checker/goto-checker$(LIBEXT) \
../goto-instrument/cover$(OBJEXT) \
../goto-instrument/cover_basic_blocks$(OBJEXT) \
../goto-instrument/cover_filter$(OBJEXT) \
../goto-instrument/cover_instrument_assume$(OBJEXT) \
../goto-instrument/cover_instrument_branch$(OBJEXT) \
../goto-instrument/cover_instrument_condition$(OBJEXT) \
../goto-instrument/cover_instrument_decision$(OBJEXT) \
../goto-instrument/cover_instrument_location$(OBJEXT) \
../goto-instrument/cover_instrument_mcdc$(OBJEXT) \
../goto-instrument/cover_instrument_other$(OBJEXT) \
../goto-instrument/cover_util$(OBJEXT) \
../goto-instrument/full_slicer$(OBJEXT) \
../goto-instrument/nondet_static$(OBJEXT) \
../goto-instrument/reachability_slicer$(OBJEXT) \
../goto-instrument/source_lines$(OBJEXT) \
../goto-instrument/unwindset$(OBJEXT) \
../goto-programs/goto-programs$(LIBEXT) \
../goto-symex/goto-symex$(LIBEXT) \
../jsil/jsil$(LIBEXT) \
../json-symtab-language/json-symtab-language$(LIBEXT) \
../json/json$(LIBEXT) \
../langapi/langapi$(LIBEXT) \
../linking/linking$(LIBEXT) \
../pointer-analysis/add_failed_symbols$(OBJEXT) \
../pointer-analysis/goto_program_dereference$(OBJEXT) \
../pointer-analysis/value_set$(OBJEXT) \
../pointer-analysis/value_set_analysis_fi$(OBJEXT) \
../pointer-analysis/value_set_dereference$(OBJEXT) \
../pointer-analysis/value_set_domain_fi$(OBJEXT) \
../pointer-analysis/value_set_fi$(OBJEXT) \
../solvers/solvers$(LIBEXT) \
../statement-list/statement-list$(LIBEXT) \
../util/util$(LIBEXT) \
../xmllang/xmllang$(LIBEXT) \
# Empty last line

INCLUDES = -I ..

include ../config.inc
include ../common

CLEANFILES = libcprover-cpp$(LIBEXT)

all: libcprover-cpp$(LIBEXT)

###############################################################################

libcprover-cpp$(LIBEXT): $(OBJ)
$(LINKLIB)
2 changes: 1 addition & 1 deletion unit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ memory-analyzer/test.inc: memory-analyzer/test.c
memory-analyzer/gdb_api$(OBJEXT): memory-analyzer/input.inc memory-analyzer/test.inc

CLEANFILES = $(CATCH_TEST) testing-utils/testing-utils$(LIBEXT) \
memory-analyzer/input.inc memory-analyzer/test.inc
memory-analyzer/input.inc memory-analyzer/test.inc gdb.txt

# only add a dependency for libraries to avoid triggering implicit rules, which
# would cause unnecessary rebuilds
Expand Down
Loading