-
Notifications
You must be signed in to change notification settings - Fork 90
/
Makefile
83 lines (71 loc) · 1.84 KB
/
Makefile
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
V ?= 0
SILENT = $(SILENT_$(V))
SILENT_0 = @
SILENT_1 =
SHELL = /bin/bash -o pipefail
VIM = vim -u test/test_vimrc -U NONE -i NONE -T dumb -E --cmd "set runtimepath+=${PWD}"
.PHONY: help test test-fold test-indent test-efm
all: test
test: test-fold test-indent test-efm test-syntax
test-fold:
$(SILENT) $(VIM) \
-c 'source test/functions.vim' \
-c 'source test/run_test.vim' \
-c 'call RunTestFold()'
test-indent:
$(SILENT) $(VIM) \
-c 'source test/functions.vim' \
-c 'source test/run_test.vim' \
-c 'call RunTestIndent()'
test-efm:
ifndef CI
$(SILENT) $(VIM) \
-c 'source test/functions.vim' \
-c 'source test/run_test.vim' \
-c 'call RunTestEfm()' | \
tee test-efm.log | \
grep "^Error format test"
else
$(SILENT) $(VIM) \
-c 'source test/functions.vim' \
-c 'source test/run_test.vim' \
-c 'call RunTestEfm()' | \
tee test-efm.log
endif
test-syntax:
ifndef CI
$(SILENT) $(VIM) \
-c 'source test/functions.vim' \
-c 'source test/run_test.vim' \
-c 'call RunTestSyntax()' | \
tr -d '[]' | \
tee test-syntax.log | \
grep "^Syntax test"
else
$(SILENT) $(VIM) \
-c 'source test/functions.vim' \
-c 'source test/run_test.vim' \
-c 'call RunTestSyntax()' | \
tr -d '[]' | \
tee test-syntax.log
endif
performance:
$(SILENT) time $(VIM) \
--cmd 'silent edit test/indent.sv' \
--cmd 'normal! gg=G' \
--cmd 'quit!'
profile:
$(SILENT) $(VIM) \
--cmd 'profile start verilog_profile.result' \
--cmd 'profile! file indent/verilog_systemverilog.vim' \
-c 'source test/functions.vim' \
-c 'source test/run_test.vim'
help:
@echo "Test targets:"
@echo ""
@echo "make test - Run addon tests"
@echo "make performance - Measure performance"
@echo "make profile - Measure performance using vims built in profiler"
@echo
@echo "Options:"
@echo "V=1 - Enable verbose mode"