Skip to content

Commit c26389c

Browse files
Add Makefile variable test-selector
This enables the selection of ert tests to run.
1 parent 4790f0e commit c26389c

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ test unit-test fake-home:
100100
$(emacs) $(load_files) --batch -f run-fsharp-unit-tests
101101

102102
integration-test : $(ac_exe) packages fake-home
103-
$(emacs) $(load_files) --batch -f run-fsharp-integration-tests
103+
ifdef test-selector
104+
$(emacs) $(load_files) --batch --eval "(let ((fsharp--test-selector \"$(test-selector)\"))(run-fsharp-integration-tests))"
105+
else
106+
$(emacs) $(load_files) --batch --eval "(run-fsharp-integration-tests)"
107+
endif
104108

105109
test-all : unit-test integration-test check-compile check-declares
106110

test/test-common.el

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
(require 'package)
33
(require 'cl)
44

5+
6+
(defvar fsharp--test-selector t
7+
"SELECTOR used in ert tests.")
8+
59
(defmacro check (desc &rest body)
610
"Wrap ert-deftest with a simpler interface."
711
(declare (indent 1))
@@ -99,8 +103,8 @@ glob emacs/test/*test.el."
99103
(let ((test-files (if files files fsharp-test-files)))
100104
(mapc 'load-file test-files)
101105
(if noninteractive
102-
(ert-run-tests-batch-and-exit)
103-
(ert-run-tests-interactively t))))
106+
(ert-run-tests-batch-and-exit fsharp--test-selector)
107+
(ert-run-tests-interactively fsharp--test-selector))))
104108

105109
(defconst fsharp-test-files
106110
(directory-files

0 commit comments

Comments
 (0)