Skip to content
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
18 changes: 2 additions & 16 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,7 @@ help-recurse-list:
@echo " which are ones that have been selected as useful tests.)"
@echo ""

# To produce incremental output, invoke make as: make MPARG=-Otarget ...
# To not run in parallel, invoke make as: make MPARG=-j1 ...
ifeq (4.0,$(firstword $(sort ${MAKE_VERSION} 4.0)))
# Version 4.0 or higher
MPARG ?= -Orecurse
else
MPARG ?=
endif

PLUME_SCRIPTS ?= ${DAIKONDIR}/.utils/plume-scripts
include $(dir $(lastword $(MAKEFILE_LIST)))Makefile.jobs

all diffs: txt-diff non-txt-diff dyncomp-tests results

Expand All @@ -51,12 +42,7 @@ esc jml inv txt-daikon-diff txt-esc-diff txt-jml-diff txt-csharpcontract-diff tx
txt-chicory-diff everything-txt-diff stats dyncomp-diff txt-jaif-diff txt-jaif:
${MAKE} pat-daikon-tests-$@
pat-daikon-tests-%:
# Under CI, there are two CPUs, but limit to 1 to avoid out-of-memory error.
if [ -n "$("${PLUME_SCRIPTS}"/is-ci.sh)" ]; then \
${MAKE} -C daikon-tests --jobs=1 ${MPARG} $*; \
else \
${MAKE} -C daikon-tests --jobs=4 ${MPARG} $*; \
fi
${MAKE} -C daikon-tests --jobs=${DAIKON_TEST_JOBS} ${MPARG} $*

list-targets:
${MAKE} -C daikon-tests list-targets
Expand Down
28 changes: 28 additions & 0 deletions tests/Makefile.jobs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This is a -*- makefile -*-, Emacs
#
# Settings shared by the Makefiles that drive a whole test suite:
# tests/Makefile, tests/kvasir-tests/Makefile, and tests/dyncomp-tests/Makefile.
# The including Makefile locates this file via $(lastword $(MAKEFILE_LIST)),
# so its include line must precede any other include in that Makefile.

# To produce incremental output, invoke make as: make MPARG=-Otarget ...
# To not run in parallel, invoke make as: make MPARG=-j1 ...
ifeq (4.0,$(firstword $(sort ${MAKE_VERSION} 4.0)))
# Version 4.0 or higher
MPARG ?= -Orecurse
else
MPARG ?=
endif

ifndef PLUME_SCRIPTS
PLUME_SCRIPTS := $(or ${DAIKONDIR},$(realpath $(dir $(lastword $(MAKEFILE_LIST)))..))/.utils/plume-scripts
endif

# DAIKON_TEST_JOBS is the number of tests to run in parallel.
# Under CI, limit to 1 to avoid out-of-memory errors.
# To override it, set DAIKON_TEST_JOBS on the command line or in the environment.
# The default is computed only when a recipe uses it, so targets such as
# "clean" and "help" work even if plume-scripts has not been cloned.
ifeq ($(strip ${DAIKON_TEST_JOBS}),)
override DAIKON_TEST_JOBS = $(if $(wildcard ${PLUME_SCRIPTS}/is-ci.sh),$(if $(shell sh "${PLUME_SCRIPTS}/is-ci.sh"),1,4),$(error ${PLUME_SCRIPTS}/is-ci.sh not found; clone plume-scripts there, or set DAIKON_TEST_JOBS))
endif
8 changes: 2 additions & 6 deletions tests/dyncomp-tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

# Forked from $DAIKONDIR/tests/kvasir-tests/Makefile

PLUME_SCRIPTS ?= ${DAIKONDIR}/.utils/plume-scripts
include $(dir $(lastword $(MAKEFILE_LIST)))../Makefile.jobs

default: summary

Expand Down Expand Up @@ -64,11 +64,7 @@ update-all:

.PHONY: clean-all
clean-all:
if [ -n "$("${PLUME_SCRIPTS}"/is-ci.sh)" ]; then \
${MAKE} --jobs=1 ${MPARG} nightly-tests__clean; \
else \
${MAKE} --jobs=4 ${MPARG} nightly-tests__clean; \
fi
${MAKE} --jobs=${DAIKON_TEST_JOBS} ${MPARG} nightly-tests__clean


default-projects__%: pgbovine-tests__%
Expand Down
21 changes: 3 additions & 18 deletions tests/kvasir-tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,13 @@
# category to contain it.
#

ifeq (4.0,$(firstword $(sort ${MAKE_VERSION} 4.0)))
# Version 4.0 or higher
MPARG ?= -Orecurse
else
MPARG ?=
endif

PLUME_SCRIPTS ?= ${DAIKONDIR}/.utils/plume-scripts
include $(dir $(lastword $(MAKEFILE_LIST)))../Makefile.jobs

default: summary-w-daikon

.PHONY: regression-tests
regression-tests:
if [ -n "$("${PLUME_SCRIPTS}"/is-ci.sh)" ]; then \
${MAKE} --jobs=1 ${MPARG} nightly-tests__diffs-w-daikon-if-working; \
else \
${MAKE} --jobs=4 ${MPARG} nightly-tests__diffs-w-daikon-if-working; \
fi
${MAKE} --jobs=${DAIKON_TEST_JOBS} ${MPARG} nightly-tests__diffs-w-daikon-if-working
${MAKE} nightly-summary-only-w-daikon
@${MAKE} --no-print-directory results

Expand Down Expand Up @@ -80,11 +69,7 @@ update-all:

.PHONY: clean-all
clean-all:
if [ -n "$("${PLUME_SCRIPTS}"/is-ci.sh)" ]; then \
${MAKE} --jobs=1 ${MPARG} nightly-tests__clean; \
else \
${MAKE} --jobs=4 ${MPARG} nightly-tests__clean; \
fi
${MAKE} --jobs=${DAIKON_TEST_JOBS} ${MPARG} nightly-tests__clean

default-projects__%: pgbovine-tests__% smcc-tests__% tiny-real-tests__% tws-tests__%
@
Expand Down
Loading