forked from rmagatti/auto-session
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (25 loc) · 1.62 KB
/
Makefile
File metadata and controls
34 lines (25 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
NVIM = nvim
FILES := $(wildcard tests/*_spec.lua)
.PHONY: test ${FILES} plenary-tests mini-tests lazy
# test: plenary-tests mini-tests
test tests: plenary-tests mini-tests
# Plugin dependencies are in scripts/lazy_init.lua
PLUGINS := .test/plugins
# It's faster to run the tests via PlenaryBustedDirectory because it only needs one overall, managing nvim process and then one per spec.
# PlenaryBustedFile, on the other hand, starts two processes per spec (one to manage running the spec and then one to actually run the spec)
# But it's very convenient to be able to run a single spec when test/developing
plenary-tests: $(PLUGINS)
# DEBUG_PLENARY=1 $(NVIM) --clean --headless -u scripts/minimal_init.lua +"PlenaryBustedDirectory tests {minimal_init = 'scripts/minimal_init.lua', sequential=true}"
$(NVIM) --clean --headless -u scripts/minimal_init.lua +"PlenaryBustedDirectory tests {minimal_init = 'scripts/minimal_init.lua', sequential=true}"
# Rule that lets you run an individual spec. Currently requires my Plenary fork above
$(FILES): $(PLUGINS)
# $(NVIM) --clean --headless -u scripts/minimal_init.lua +"PlenaryBustedFile $@ {minimal_init = 'scripts/minimal_init.lua'}"
$(NVIM) --clean --headless -u scripts/minimal_init.lua +"PlenaryBustedFile $@ {minimal_init = 'scripts/minimal_init.lua'}"
# We use mini.test for some end to end UI testing of session lens
mini-tests: $(PLUGINS)
$(NVIM) --headless --noplugin -u scripts/minimal_init_mini.lua -c "lua MiniTest.run()"
# Use lazy.nvim to download the plugins. The actual tests don't use lazy.nvim
lazy $(PLUGINS):
$(NVIM) --headless -u scripts/lazy_init.lua +"qa!"
clean:
rm -rf .test