File: rules

package info (click to toggle)
neovim 0.11.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 64,320 kB
  • sloc: ansic: 264,714; python: 1,472; lisp: 1,237; sh: 1,137; makefile: 383; xml: 85; ruby: 6
file content (162 lines) | stat: -rwxr-xr-x 6,483 bytes parent folder | download
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
#!/usr/bin/make -f

DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/architecture.mk

# cmake doesn't honor CPPFLAGS
CFLAGS += $(CPPFLAGS) -DDISABLE_LOG
CXXFLAGS += $(CPPFLAGS)

# Work around #1082125
ifeq (s390x,$(DEB_HOST_ARCH))
  CFLAGS += -O1
endif

export CFLAGS CXXFLAGS LDFLAGS

BITOP_DEPENDS = lua-bitop
PREFER_LUA = ON
UNITTEST =
COMPILE_LUA = ON

ifneq (,$(findstring ok installed,$(shell dpkg-query -W -f '$${Status}' luajit 2>&1)))
  BITOP_DEPENDS =
  PREFER_LUA = OFF
  UNITTEST = unittest
  COMPILE_LUA = OFF
endif

TS_C_VER=0.24.1
TS_LUA_VER=0.4.0
TS_QUERY_VER=0.6.2
TS_VIM_VER=0.7.0
TS_VIMDOC_VER=4.0.0
TS_MARKDOWN_VER=0.5.0
TS_MARKDOWN_INLINE_VER=0.5.0

# Default test timeout upstream is 20 minutes.  Extend this to 45 minutes
TIMEOUT=TEST_TIMEOUT=2700

# Arguments to --filter-out are a Lua pattern, so any of the following
# characters need to be escaped with a % to be treated literally:
#   ^$()%.[]*+-?)

# This test causes hangs in Salsa CI and on the buildds, but I haven't been
# able to reproduce it locally to easily debug.
FUNCTEST_FILTER_OUT_ARGS = --filter-out 'vim%-patch:8%.2%.2586'

# Timing related test, which is too susceptible to flakiness on the buildds
FUNCTEST_FILTER_OUT_ARGS += --filter-out 'parser API supports caching queries'
FUNCTEST_FILTER_OUT_ARGS += --filter-out 'memory usage releases memory when closing windows when folds exist'

# Test fails with "process does not own the terminal"
FUNCTEST_FILTER_OUT_ARGS += --filter-out 'TUI paste: terminal mode'
FUNCTEST_FILTER_OUT_ARGS += --filter-out 'TUI forwards :term palette colors with termguicolors'

# Fail on some architectures - https://github.com/neovim/neovim/issues/32230
FUNCTEST_FILTER_OUT_ARGS += --filter-out commenting
FUNCTEST_FILTER_OUT_ARGS += --filter-out 'treesitter language API'
FUNCTEST_FILTER_OUT_ARGS += --filter-out 'treesitter node API'
FUNCTEST_FILTER_OUT_ARGS += --filter-out 'treesitter foldexpr'

# Fails in Salsa CI but haven't been able to reproduce elsewhere
FUNCTEST_FILTER_OUT_ARGS += --filter-out 'quitting swapfile dialog on startup stops TUI'

# Known flaky - https://github.com/neovim/neovim/issues/31818
FUNCTEST_FILTER_OUT_ARGS += --filter-out 'diff mode overlapped diff blocks will be merged'

# Known flaky, maybe will be fixed in 0.12 -- https://github.com/neovim/neovim/issues/34917
FUNCTEST_FILTER_OUT_ARGS += --filter-out 'TUI has no black flicker'

# Known flaky -- https://github.com/neovim/neovim/issues/36250
FUNCTEST_FILTER_OUT_ARGS += --filter-out 'should ring the bell when deleting'

FUNCTEST_FILTER_OUT_ARGS += --filter-out 'swapfile detection redrawing during prompt does not break treesitter'
FUNCTEST_FILTER_OUT_ARGS += --filter-out 'server %-> client connecting to another %(peer%) nvim'

UNITTEST_FILTER_OUT_ARGS =

USER = $(shell id -un)
ID = $(shell id -u)
GID = $(shell id -g)

ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
  BUILD = ninja -v -C build
else
  BUILD = ninja -C build
endif

BUILD_TYPE=Release
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
  BUILD_TYPE=Debug
endif

%:
	dh $@ --buildsystem=cmake+ninja --builddirectory=build

override_dh_auto_configure:
	dh_auto_configure -- -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DPREFER_LUA=$(PREFER_LUA) -DLIBLUV_LIBRARY:FILEPATH=/usr/lib/$(DEB_HOST_MULTIARCH)/lua/5.1/luv.so -DLIBLUV_INCLUDE_DIR:PATH=/usr/include/lua5.1 -DCOMPILE_LUA=$(COMPILE_LUA) -DUSE_BUNDLED_BUSTED=OFF -DENABLE_TRANSLATIONS=ON

override_dh_auto_build:
	@echo 'blhc: ignore-line-regexp: .* -E .* -DDO_NOT_DEFINE_EMPTY_ATTRIBUTES .*'
	$(BUILD)
	mkdir -p runtime/parser/
	make -f /usr/src/tree-sitter/c/$(TS_C_VER)/Makefile
	cp debian/.ts-parser-c/c.so runtime/parser/
	make -f /usr/src/tree-sitter/lua/$(TS_LUA_VER)/Makefile
	cp debian/.ts-parser-lua/lua.so runtime/parser/
	make -f /usr/src/tree-sitter/query/$(TS_QUERY_VER)/Makefile
	cp debian/.ts-parser-query/query.so runtime/parser/
	make -f /usr/src/tree-sitter/vim/$(TS_VIM_VER)/Makefile
	cp debian/.ts-parser-vim/vim.so runtime/parser/
	make -f /usr/src/tree-sitter/vimdoc/$(TS_VIMDOC_VER)/Makefile
	cp debian/.ts-parser-vimdoc/vimdoc.so runtime/parser/
	make -f /usr/src/tree-sitter/markdown/$(TS_MARKDOWN_VER)/Makefile
	cp debian/.ts-parser-markdown/markdown.so runtime/parser/
	make -f /usr/src/tree-sitter/markdown_inline/$(TS_MARKDOWN_INLINE_VER)/Makefile
	cp debian/.ts-parser-markdown_inline/markdown_inline.so runtime/parser/

override_dh_auto_install:
	env DESTDIR=$(CURDIR)/debian/tmp $(BUILD) install

override_dh_install-indep:
	dh_install -i -X.so

override_dh_auto_clean:
	$(MAKE) clean
	dh_auto_clean

override_dh_gencontrol:
	dh_gencontrol -- -Vneovim:Depends=$(BITOP_DEPENDS)

debian/passwd:
	printf -- "$(USER):x:$(ID):$(GID):nvim test:$(CURDIR)/debian/fakehome:/bin/false\n" > debian/passwd
	printf -- "users:x:$(GID):\n" > debian/group

debian/fakehome:
	mkdir -p $@

debian/fakeruntime:
	mkdir -p $@
	chmod 0700 $@

debian/fakehome/locale-stamp:
	mkdir -p debian/fakehome/locale
	localedef -f UTF-8 -i en_US debian/fakehome/locale/en_US.UTF-8
	touch $@

override_dh_auto_test-indep:

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# Force SHELL=/bin/bash so we have a printf that understands \x07
override_dh_auto_test-arch: export SHELL=/bin/bash
override_dh_auto_test-arch: export TEST_COLORS=0
override_dh_auto_test-arch: debian/passwd debian/fakehome debian/fakehome/locale-stamp debian/fakeruntime
	env "LOCPATH=$(CURDIR)/debian/fakehome/locale" "HOME=$(CURDIR)/debian/fakehome" "XDG_RUNTIME_DIR=$(CURDIR)/debian/fakeruntime" $(MAKE) -C test/old/testdir clean
	env "LOCPATH=$(CURDIR)/debian/fakehome/locale" "HOME=$(CURDIR)/debian/fakehome" "XDG_RUNTIME_DIR=$(CURDIR)/debian/fakeruntime" TERM=xterm $(MAKE) -C test/old/testdir "NVIM_PRG=$(CURDIR)/build/bin/nvim"
	env "LOCPATH=$(CURDIR)/debian/fakehome/locale" $(TIMEOUT) BUSTED_ARGS="$(FUNCTEST_FILTER_OUT_ARGS)" TEST_SKIP_FRAGILE=1 "HOME=$(CURDIR)/debian/fakehome" "XDG_RUNTIME_DIR=$(CURDIR)/debian/fakeruntime" LD_PRELOAD=libnss_wrapper.so "NSS_WRAPPER_PASSWD=$(CURDIR)/debian/passwd" "NSS_WRAPPER_GROUP=$(CURDIR)/debian/group" $(BUILD) functionaltest
ifneq (,$(UNITTEST))
	env "LOCPATH=$(CURDIR)/debian/fakehome/locale" BUSTED_ARGS="$(UNITTEST_FILTER_OUT_ARGS)" TEST_SKIP_FRAGILE=1 "HOME=$(CURDIR)/debian/fakehome" "XDG_RUNTIME_DIR=$(CURDIR)/debian/fakeruntime" LD_PRELOAD=libnss_wrapper.so "NSS_WRAPPER_PASSWD=$(CURDIR)/debian/passwd" "NSS_WRAPPER_GROUP=$(CURDIR)/debian/group" $(BUILD) $(UNITTEST)
endif
endif