Skip to content

Define DAIKONDIR with := in test Makefiles - #898

Closed
mernst wants to merge 3 commits into
codespecs:masterfrom
mernst:daikondir-immediate
Closed

mernst wants to merge 3 commits into
codespecs:masterfrom
mernst:daikondir-immediate

Conversation

@mernst

@mernst mernst commented Oct 10, 2026

Copy link
Copy Markdown
Member

With ?=, DAIKONDIR is recursively expanded, so MAKEFILE_LIST is read when DAIKONDIR is used rather than where it is defined. After a later include, DAIKONDIR can be computed relative to the wrong file.

This also fixes the depth in tests/daikon-tests/Makefile, where .. yielded the tests/ directory rather than the Daikon clone.

Split from #892.

With "?=", DAIKONDIR is recursively expanded, so MAKEFILE_LIST is read when
DAIKONDIR is used rather than where it is defined.  After a later include,
DAIKONDIR can be computed relative to the wrong file.

Also fix the depth in tests/daikon-tests/Makefile, where ".." yielded the
tests/ directory rather than the Daikon clone.
@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

  • Run on-demand review

This review includes 1 billable file and costs up to $0.25.

Or wait 5 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: codespecs/daikon/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 5ddb7c44-124b-4398-80b6-83c9e7ad33eb

📥 Commits

Reviewing files that changed from the base of the PR and between 748ae55 and 155febf.


📒 Files selected for processing (1)
  • tests/daikon-tests/Makefile

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: codespecs/daikon/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 882917f5-44df-472e-a694-1c059e9853d4


📥 Commits

Reviewing files that changed from the base of the PR and between 779e30d and 748ae55.



📒 Files selected for processing (10)
  • tests/Makefile.common
  • tests/chicory-tests/option-tests/Makefile
  • tests/daikon-tests/Makefile
  • tests/daikon-tests/purity/Makefile
  • tests/diff-tests/Makefile.common
  • tests/dyncomp-tests/Makefile.common
  • tests/kvasir-tests/Makefile.common
  • tests/kvasir-tests/rijndael/Makefile
  • tests/merge-invariants-tests/drawlet/Makefile
  • tests/parser-tests/Makefile


💤 Files with no reviewable changes (1)
  • tests/kvasir-tests/rijndael/Makefile


Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.




📝 Walkthrough
📝 Walkthrough

Walkthrough

Several test Makefiles now capture their directory in simply expanded variables and use those values to derive DAIKONDIR defaults. One test Makefile no longer assigns a default for LDAIKONDIR.

Suggested reviewers: markro49



Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 748ae

The test Makefiles now retain their intended root paths despite later includes, and the removed Rijndael variable is not used by its reachable targets. No identified issue blocks merging.

Architecture Summary

Architecture risk: 🔵 Low · up to 748ae

The change affects 1 system.

Changed systems: tests

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — tests (service) was modified; 10 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in tests/Makefile.common: Adds TESTS_COMMON_DIR, captured with simple expansion from the current last MAKEFILE_LIST entry, and uses it to default DAIKONDIR to its parent’s real path via ?=. This replaces the origin check and conditional := assignment that derived the path directly from MAKEFILE_LIST.
  • observed — Modified behavior in tests/chicory-tests/option-tests/Makefile: The Makefile captures its directory with simply expanded OPTION_TESTS_DIR and uses it to set DAIKONDIR only when DAIKONDIR is undefined; the previous unconditional assignment derived the path from MAKEFILE_LIST at that point.
  • observed — Modified behavior in tests/daikon-tests/Makefile: Adds DAIKON_TESTS_DIR as a simply expanded path to the directory of the current Makefile, then sets the default DAIKONDIR to the real path two levels above it. This replaces deriving DAIKONDIR from MAKEFILE_LIST in the variable assignment.
  • observed — Modified behavior in tests/daikon-tests/purity/Makefile: Adds simply expanded PURITY_TEST_DIR to capture the Makefile directory before later includes, then uses it to set DAIKONDIR only when that variable is undefined. This replaces the prior origin check and direct path calculation.


Pre-merge checks | Passed 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.



✨ Finishing Touches 💡 2
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch daikondir-immediate


🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR


🧪 Generate unit tests (beta)
  • Create a new PR



  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Also remove the unused LDAIKONDIR from the rijndael test, and let the
environment override DAIKONDIR in chicory-tests/option-tests.
@mernst

mernst commented Oct 11, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

…mmediate

# Conflicts:
#	tests/chicory-tests/option-tests/Makefile
#	tests/diff-tests/Makefile.common
#	tests/dyncomp-tests/Makefile.common
#	tests/kvasir-tests/Makefile.common
#	tests/kvasir-tests/rijndael/Makefile
#	tests/merge-invariants-tests/drawlet/Makefile
#	tests/parser-tests/Makefile
@mernst

mernst commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

Closing: #904 makes the same change to tests/daikon-tests/Makefile, and master (via #912) already defines DAIKONDIR with := in the other test Makefiles.

@mernst mernst closed this Oct 12, 2026
@mernst
mernst deleted the daikondir-immediate branch October 12, 2026 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant