Eldev (2222B)
1 ; -*- mode: emacs-lisp; lexical-binding: t; no-byte-compile: t -*- 2 3 (eldev-require-version "0.6") 4 5 (eldev-use-package-archive 'gnu) 6 ;; For compatibility; e.g. with MELPA Stable one test fails. 7 (eldev-use-package-archive 'melpa-unstable) 8 9 (eldev-use-plugin 'autoloads) 10 11 (eldev-add-loading-roots 'test "test/utils") 12 13 (defvar cider-test-type 'main) 14 (setf eldev-standard-excludes `(:or ,eldev-standard-excludes 15 ;; Avoid including files in test "projects". 16 (eldev-pcase-exhaustive cider-test-type 17 (`main "./test/*/") 18 (`integration '("./test/" "!./test/integration")) 19 (`all '("./test/*/" "!./test/integration"))) 20 "test/integration/projects" 21 ;; This file is _supposed_ to be excluded 22 ;; from automated testing. 23 "test/cider-tests--no-auto.el")) 24 25 (eldev-defoption cider-test-selection (type) 26 "Select tests to run; type can be `main', `integration' or `all'" 27 :options (-T --test-type) 28 :for-command test 29 :value TYPE 30 :default-value cider-test-type 31 (unless (memq (intern type) '(main integration all)) 32 (signal 'eldev-wrong-option-usage `("unknown test type `%s'" ,type))) 33 (setf cider-test-type (intern type))) 34 35 (add-hook 'eldev-test-hook 36 (lambda () 37 (eldev-verbose "Using cider tests of type `%s'" cider-test-type))) 38 (add-hook 'eldev-executing-command-hook 39 (lambda (command) 40 (unless (eq command 'test) 41 ;; So that e.g. byte-compilation works on all tests. 42 (setf cider-test-type 'all)))) 43 44 ;; CIDER cannot be compiled otherwise. 45 (setf eldev-build-load-before-byte-compiling t) 46 47 (setf eldev-lint-default '(elisp)) 48 (with-eval-after-load 'elisp-lint 49 ;; We will byte-compile with Eldev. 50 (setf elisp-lint-ignored-validators '("package-lint" "fill-column" "byte-compile") 51 enable-local-variables :safe))