|
22 | 22 | (script "test" |
23 | 23 | (require 'package) |
24 | 24 | (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) |
25 | | - |
26 | 25 | (package-initialize) |
27 | 26 |
|
| 27 | + ;; Bootstrap straight.el |
28 | 28 | (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) |
29 | 29 | (bootstrap-version 5)) |
30 | 30 | (unless (file-exists-p bootstrap-file) |
|
37 | 37 | (load bootstrap-file nil 'nomessage)) |
38 | 38 |
|
39 | 39 | (straight-use-package 'uuidgen) |
40 | | - (require 'uuidgen) |
41 | | - |
42 | 40 | (straight-use-package 'buttercup) |
| 41 | + |
| 42 | + (require 'uuidgen) |
43 | 43 | (require 'buttercup) |
44 | 44 |
|
45 | 45 | ;; TODO: Manually set PATH for the CI environment |
46 | 46 | ;;(setenv "PATH" (concat "/custom/path/to/node/bin:" (getenv "PATH"))) |
47 | 47 |
|
| 48 | + ;; Output the path variables for debugging |
| 49 | + (message "load-path: %s" load-path) |
| 50 | + (message "default-directory: %s" default-directory) |
| 51 | + |
48 | 52 | (message "Starting test loading.") |
49 | 53 | (let* ((default-directory (file-name-directory (or load-file-name buffer-file-name))) |
50 | 54 | (project-root (file-name-directory (locate-dominating-file default-directory "Eask"))) |
51 | 55 | (test-dir (expand-file-name "tests" project-root)) |
52 | | - (buttercup-files (directory-files test-dir t "cody-doc-sync-tests\\.el$")) |
53 | | - (ert-files (directory-files test-dir t "cody-doc-sync-ert-tests\\.el$"))) |
| 56 | + (buttercup-files (directory-files test-dir t "\\.el$"))) |
54 | 57 | (message "Project root: %s" project-root) |
| 58 | + (message "buttercup-files: %s" buttercup-files) |
55 | 59 | (add-to-list 'load-path project-root) |
56 | 60 | (add-to-list 'load-path test-dir) |
57 | 61 |
|
58 | 62 | ;; Load and run Buttercup tests. |
59 | 63 | (dolist (file buttercup-files) |
60 | 64 | (message "Loading Buttercup test file: %s" file) |
61 | 65 | (load file t t t)) |
62 | | - (buttercup-run-discover) |
63 | | - |
64 | | - ;; Load and run ERT tests. |
65 | | - (dolist (file ert-files) |
66 | | - (message "Loading ERT test file: %s" file) |
67 | | - (load file t t t)) |
68 | | - (ert-run-tests-batch-and-exit))) |
| 66 | + (buttercup-run-discover))) |
0 commit comments