[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help using `dtach` in override_dh_auto_test (ITP, Bug #808176)



* Víctor Cuadrado Juan <me@viccuad.me>, 2016-02-08, 19:22:
dtmp = /build

This doesn't sound like a right place to store this socket. /build normally doesn't exist; and in build environments where it does exist, it's not writable by normal users.

Please put the sockets somewhere within the package build directory. $(CURDIR)/debian/tmp/tmp is often a convenient place, because dh_clean automatically removes whole debian/tmp.

dtmp = $(CURDIR)

or similar.

override_dh_auto_test:
	# start a detached session with a nvim server:
	export NVIM_LISTEN_ADDRESS=$(dtmp)/nvim-socket
	dtach -n $(dtmp)/dtach-socket env TERM=vt100 nvim
	dh_auto_test

Make runs each line in a separate shell process, so here the export command is essentially no-op.

I'd rewrite it like this:

export NVIM_LISTEN_ADDRESS = $(dtmp)/nvim-socket

override_dh_auto_test:
	# start a detached session with a nvim server:
	dtach -n $(dtmp)/dtach-socket env TERM=vt100 nvim
	dh_auto_test

(This sets NVIM_LISTEN_ADDRESS globally. I'm optimistically assuming it won't have any effect on the rest of the build process...)

--
Jakub Wilk


Reply to: