aboutsummaryrefslogtreecommitdiff
path: root/tests/test-bootstrap.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-06 10:31:30 -0500
committerCraig Jennings <c@cjennings.net>2026-06-06 10:31:30 -0500
commit95dbb5abdbb746cf5da9f7926740d17205ac8d55 (patch)
tree0e807d43d8f8ce32b3790efc716c433d35ceca3c /tests/test-bootstrap.el
parent6ecd1e9bf1e3d0cdd3861077318541e193ca4532 (diff)
downloadduet-95dbb5abdbb746cf5da9f7926740d17205ac8d55.tar.gz
duet-95dbb5abdbb746cf5da9f7926740d17205ac8d55.zip
build: add Eask, test harness, and dev tooling
I brought the skeleton up to a working package baseline (Phase 0 in the design spec). Eask defines the package and its dev deps. A root Makefile delegates test targets to tests/Makefile and adds compile, coverage, lint, doctor, and clean, matching the layout the other packages use. deps installs both halves DUET needs: the Emacs Lisp deps via eask, and the transport CLIs (rsync, rclone, lftp, unison) via the system package manager, so a contributor's environment is ready before the code that shells out to them. make complexity runs a small homegrown McCabe branch counter (scripts/duet-complexity.el). No off-the-shelf tool measures Emacs Lisp: lizard doesn't support it and codemetrics is an interactive overlay, so DUET owns one. The counting is pure and covered by Normal/Boundary/Error tests. The budget is soft and the target is advisory. The ERT harness (bootstrap, check-deps, per-file undercover coverage) and a smoke test prove the loop works end to end.
Diffstat (limited to 'tests/test-bootstrap.el')
-rw-r--r--tests/test-bootstrap.el40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/test-bootstrap.el b/tests/test-bootstrap.el
new file mode 100644
index 0000000..a545cea
--- /dev/null
+++ b/tests/test-bootstrap.el
@@ -0,0 +1,40 @@
+;;; test-bootstrap.el --- Common test initialization for duet -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2026 Craig Jennings
+
+;; Author: Craig Jennings <c@cjennings.net>
+
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Shared initialization for all duet test files. Handles package setup,
+;; dependency loading, and loading the package source.
+;;
+;; Usage: (require 'test-bootstrap (expand-file-name "test-bootstrap.el"))
+
+;;; Code:
+
+;; Initialize package system for batch mode
+(when noninteractive
+ (package-initialize))
+
+(require 'ert)
+(require 'cl-lib)
+
+;; Load duet from the parent directory.
+(load (expand-file-name "../duet.el") nil t)
+
+(provide 'test-bootstrap)
+;;; test-bootstrap.el ends here