From 3c09a112385dbb7df4d88279f87b7dce1a98977b Mon Sep 17 00:00:00 2001 From: Michael Ernst Date: Sat, 10 Oct 2026 13:40:32 -0700 Subject: [PATCH 1/2] Define DAIKONDIR in the test driver Makefiles tests/Makefile, tests/kvasir-tests/Makefile, and tests/dyncomp-tests/Makefile used ${DAIKONDIR} without defining it, so PLUME_SCRIPTS was wrong unless DAIKONDIR was set in the environment. This also fixes targets in tests/daikon-tests/Makefile that recurse into tests/Makefile. --- tests/Makefile | 6 ++++++ tests/dyncomp-tests/Makefile | 6 ++++++ tests/kvasir-tests/Makefile | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/tests/Makefile b/tests/Makefile index e238ef2bd2..4a536508d1 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -34,6 +34,12 @@ else MPARG ?= endif +# DAIKONDIR is the clone of the 'daikon' project. +# TESTS_MAKEFILE_DIR is simply expanded (":=") so that it is not affected by later +# includes, which change MAKEFILE_LIST. +TESTS_MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST))) +DAIKONDIR ?= $(realpath ${TESTS_MAKEFILE_DIR}..) + PLUME_SCRIPTS ?= ${DAIKONDIR}/.utils/plume-scripts all diffs: txt-diff non-txt-diff dyncomp-tests results diff --git a/tests/dyncomp-tests/Makefile b/tests/dyncomp-tests/Makefile index f3452923af..6bd3d6e819 100644 --- a/tests/dyncomp-tests/Makefile +++ b/tests/dyncomp-tests/Makefile @@ -18,6 +18,12 @@ # Forked from $DAIKONDIR/tests/kvasir-tests/Makefile +# DAIKONDIR is the clone of the 'daikon' project. +# DYNCOMP_DRIVER_DIR is simply expanded (":=") so that it is not affected by later +# includes, which change MAKEFILE_LIST. +DYNCOMP_DRIVER_DIR := $(dir $(lastword $(MAKEFILE_LIST))) +DAIKONDIR ?= $(realpath ${DYNCOMP_DRIVER_DIR}../..) + PLUME_SCRIPTS ?= ${DAIKONDIR}/.utils/plume-scripts default: summary diff --git a/tests/kvasir-tests/Makefile b/tests/kvasir-tests/Makefile index bff779dccc..239a380b34 100644 --- a/tests/kvasir-tests/Makefile +++ b/tests/kvasir-tests/Makefile @@ -20,6 +20,12 @@ else MPARG ?= endif +# DAIKONDIR is the clone of the 'daikon' project. +# KVASIR_DRIVER_DIR is simply expanded (":=") so that it is not affected by later +# includes, which change MAKEFILE_LIST. +KVASIR_DRIVER_DIR := $(dir $(lastword $(MAKEFILE_LIST))) +DAIKONDIR ?= $(realpath ${KVASIR_DRIVER_DIR}../..) + PLUME_SCRIPTS ?= ${DAIKONDIR}/.utils/plume-scripts default: summary-w-daikon From 8d348a6c676f37312e19ee99ee7601cdfec83eb2 Mon Sep 17 00:00:00 2001 From: Michael Ernst Date: Mon, 12 Oct 2026 04:38:09 -0700 Subject: [PATCH 2/2] Use $$ for shell command substitution in recipes; use the existing DAIKONDIR idiom --- tests/Makefile | 7 ++----- tests/dyncomp-tests/Makefile | 7 ++----- tests/kvasir-tests/Makefile | 9 +++------ 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 4a536508d1..5c20ecdf9a 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -35,10 +35,7 @@ else endif # DAIKONDIR is the clone of the 'daikon' project. -# TESTS_MAKEFILE_DIR is simply expanded (":=") so that it is not affected by later -# includes, which change MAKEFILE_LIST. -TESTS_MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST))) -DAIKONDIR ?= $(realpath ${TESTS_MAKEFILE_DIR}..) +DAIKONDIR ?= $(realpath $(dir $(lastword $(MAKEFILE_LIST)))..) PLUME_SCRIPTS ?= ${DAIKONDIR}/.utils/plume-scripts @@ -58,7 +55,7 @@ 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 \ + if [ -n "$$("${PLUME_SCRIPTS}"/is-ci.sh)" ]; then \ ${MAKE} -C daikon-tests --jobs=1 ${MPARG} $*; \ else \ ${MAKE} -C daikon-tests --jobs=4 ${MPARG} $*; \ diff --git a/tests/dyncomp-tests/Makefile b/tests/dyncomp-tests/Makefile index 6bd3d6e819..81a9b56080 100644 --- a/tests/dyncomp-tests/Makefile +++ b/tests/dyncomp-tests/Makefile @@ -19,10 +19,7 @@ # Forked from $DAIKONDIR/tests/kvasir-tests/Makefile # DAIKONDIR is the clone of the 'daikon' project. -# DYNCOMP_DRIVER_DIR is simply expanded (":=") so that it is not affected by later -# includes, which change MAKEFILE_LIST. -DYNCOMP_DRIVER_DIR := $(dir $(lastword $(MAKEFILE_LIST))) -DAIKONDIR ?= $(realpath ${DYNCOMP_DRIVER_DIR}../..) +DAIKONDIR ?= $(realpath $(dir $(lastword $(MAKEFILE_LIST)))../..) PLUME_SCRIPTS ?= ${DAIKONDIR}/.utils/plume-scripts @@ -70,7 +67,7 @@ update-all: .PHONY: clean-all clean-all: - if [ -n "$("${PLUME_SCRIPTS}"/is-ci.sh)" ]; then \ + if [ -n "$$("${PLUME_SCRIPTS}"/is-ci.sh)" ]; then \ ${MAKE} --jobs=1 ${MPARG} nightly-tests__clean; \ else \ ${MAKE} --jobs=4 ${MPARG} nightly-tests__clean; \ diff --git a/tests/kvasir-tests/Makefile b/tests/kvasir-tests/Makefile index 239a380b34..acef44597b 100644 --- a/tests/kvasir-tests/Makefile +++ b/tests/kvasir-tests/Makefile @@ -21,10 +21,7 @@ else endif # DAIKONDIR is the clone of the 'daikon' project. -# KVASIR_DRIVER_DIR is simply expanded (":=") so that it is not affected by later -# includes, which change MAKEFILE_LIST. -KVASIR_DRIVER_DIR := $(dir $(lastword $(MAKEFILE_LIST))) -DAIKONDIR ?= $(realpath ${KVASIR_DRIVER_DIR}../..) +DAIKONDIR ?= $(realpath $(dir $(lastword $(MAKEFILE_LIST)))../..) PLUME_SCRIPTS ?= ${DAIKONDIR}/.utils/plume-scripts @@ -32,7 +29,7 @@ default: summary-w-daikon .PHONY: regression-tests regression-tests: - if [ -n "$("${PLUME_SCRIPTS}"/is-ci.sh)" ]; then \ + 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; \ @@ -86,7 +83,7 @@ update-all: .PHONY: clean-all clean-all: - if [ -n "$("${PLUME_SCRIPTS}"/is-ci.sh)" ]; then \ + if [ -n "$$("${PLUME_SCRIPTS}"/is-ci.sh)" ]; then \ ${MAKE} --jobs=1 ${MPARG} nightly-tests__clean; \ else \ ${MAKE} --jobs=4 ${MPARG} nightly-tests__clean; \