Make the daw-dev-tools dependency portable #170

Closed
opened 2026-11-29 20:33:53 +01:00 by claude-code · 2 comments
Collaborator

Problem

The test setup depends on files from a developer machine (checked on develop):

  • test/helpers.lua is a committed symlink (mode 120000, added in 9b42dc4) to the absolute path /home/michael/tools/tool-gitea-workflow/src/helpers.lua.
  • tools/run_tests.sh is not in the repo. .gitignore ignores tools/ and whitelists !tools/run_tests.sh, but the file was never committed.
  • Makefile line 48: test: calls tools/run_tests.sh directly; there is no variable for the tool location.

In other environments (cloud session, test server) make test fails (tools/run_tests.sh: not found), and every test file fails on require("helpers").

Proposal

  • Pull helpers.lua and run_tests.sh from DAW/daw-dev-tools via a Makefile variable, e.g. DAW_DEV_TOOLS ?= ../daw-dev-tools (overridable in config/local.mk).
  • Remove the symlink test/helpers.lua and the tools/ entries in .gitignore.
  • Document the setup in README.md (section make test).

Acceptance criteria

  • make test runs after cloning fragjan and daw-dev-tools, without path changes
  • tests pass on Lua 5.1 and 5.4
  • no symlinks to absolute paths left in the repo

Affected files: test/helpers.lua, tools/run_tests.sh, Makefile, .gitignore, README.md
Branch: develop

Refs DAW/fragjan#162

## Problem The test setup depends on files from a developer machine (checked on `develop`): - `test/helpers.lua` is a committed symlink (mode 120000, added in 9b42dc4) to the absolute path `/home/michael/tools/tool-gitea-workflow/src/helpers.lua`. - `tools/run_tests.sh` is not in the repo. `.gitignore` ignores `tools/` and whitelists `!tools/run_tests.sh`, but the file was never committed. - `Makefile` line 48: `test:` calls `tools/run_tests.sh` directly; there is no variable for the tool location. In other environments (cloud session, test server) `make test` fails (`tools/run_tests.sh: not found`), and every test file fails on `require("helpers")`. ## Proposal - Pull `helpers.lua` and `run_tests.sh` from DAW/daw-dev-tools via a Makefile variable, e.g. `DAW_DEV_TOOLS ?= ../daw-dev-tools` (overridable in `config/local.mk`). - Remove the symlink `test/helpers.lua` and the `tools/` entries in `.gitignore`. - Document the setup in `README.md` (section `make test`). ## Acceptance criteria - [ ] `make test` runs after cloning fragjan and daw-dev-tools, without path changes - [ ] tests pass on Lua 5.1 and 5.4 - [ ] no symlinks to absolute paths left in the repo Affected files: `test/helpers.lua`, `tools/run_tests.sh`, `Makefile`, `.gitignore`, `README.md` Branch: `develop` Refs DAW/fragjan#162
Author
Collaborator

Proposal changed: DAW/daw-dev-tools will be added as a git submodule at tools/daw-dev-tools instead of a sibling directory with a DAW_DEV_TOOLS variable. make test calls run_tests.sh from the submodule; test/helpers.lua points into the submodule via a portable path.

Proposal changed: DAW/daw-dev-tools will be added as a git submodule at `tools/daw-dev-tools` instead of a sibling directory with a `DAW_DEV_TOOLS` variable. `make test` calls `run_tests.sh` from the submodule; `test/helpers.lua` points into the submodule via a portable path.
Author
Collaborator

Summary

  • .gitignore: removed tools/ and the !tools/run_tests.sh whitelist (11e7309)
  • .gitmodules: added DAW/daw-dev-tools at tools/daw-dev-tools, same SSH URL pattern as the other submodules, pinned to 085b283 (c45bf7a)
  • test/helpers.lua: now a relative symlink ../tools/daw-dev-tools/test/helpers.lua. A relative symlink fits here: git stores it as-is, and it stays inside the repo (53e687a)
  • Makefile: DAW_DEV_TOOLS ?= tools/daw-dev-tools; test runs $(DAW_DEV_TOOLS)/run_tests.sh and passes DAW_PROJECT (8bbaf63)
  • README.md: clone --recurse-submodules, git submodule update --init, HTTPS fallback via url.insteadOf, make test DAW_LUA_BIN=lua5.1 (876e1b5)

Tests

Fresh clone of the branch with --recurse-submodules over HTTPS, then make test:

  • Lua 5.1: 42/42 files, 2057 tests passed
  • Lua 5.4: 42/42 files, 2057 tests passed

Notes:

  • The test system was Ubuntu, which lua-env.sh does not support, so DAW_LUA_BIN was set on the command line.
  • LuaFileSystem (lfs) had to be installed first. Without it, 11 test files fail. The note in DAW/fragjan#162 calling those failures "unrelated" was correct, and this is the cause.

Branch

claude/issue-170 (based on develop, no PR)

Refs DAW/fragjan#170

## Summary - `.gitignore`: removed `tools/` and the `!tools/run_tests.sh` whitelist (11e7309) - `.gitmodules`: added DAW/daw-dev-tools at `tools/daw-dev-tools`, same SSH URL pattern as the other submodules, pinned to `085b283` (c45bf7a) - `test/helpers.lua`: now a relative symlink `../tools/daw-dev-tools/test/helpers.lua`. A relative symlink fits here: git stores it as-is, and it stays inside the repo (53e687a) - `Makefile`: `DAW_DEV_TOOLS ?= tools/daw-dev-tools`; `test` runs `$(DAW_DEV_TOOLS)/run_tests.sh` and passes `DAW_PROJECT` (8bbaf63) - `README.md`: `clone --recurse-submodules`, `git submodule update --init`, HTTPS fallback via `url.insteadOf`, `make test DAW_LUA_BIN=lua5.1` (876e1b5) ## Tests Fresh clone of the branch with `--recurse-submodules` over HTTPS, then `make test`: - Lua 5.1: 42/42 files, 2057 tests passed - Lua 5.4: 42/42 files, 2057 tests passed Notes: - The test system was Ubuntu, which `lua-env.sh` does not support, so `DAW_LUA_BIN` was set on the command line. - LuaFileSystem (lfs) had to be installed first. Without it, 11 test files fail. The note in DAW/fragjan#162 calling those failures "unrelated" was correct, and this is the cause. ## Branch `claude/issue-170` (based on `develop`, no PR) Refs DAW/fragjan#170
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/fragjan#170
No description provided.