File: rules

package info (click to toggle)
send2trash 1.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 196 kB
  • sloc: python: 816; sh: 13; makefile: 10
file content (20 lines) | stat: -rwxr-xr-x 699 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/make -f

%:
	dh $@ --buildsystem=pybuild

# Setting HOME may not be necessary, but it will help when the HOME
# directory does not exist, for example in some setups when using a
# chroot for building.
# Some of these tests do not work on overlay filesystems, which are
# typically used by sbuild; see my failed attempts at addressing this at
# https://github.com/arsenetar/send2trash/issues/67
# So we just skip all of the tests in such an environment.
override_dh_auto_test:
	if mount | grep -q "on / type overlay"; then \
	    echo "In an overlay environment; skipping tests"; \
	else \
	    TMPHOME=$$(mktemp -d) && \
	    HOME=$$TMPHOME dh_auto_test && \
	    rm -rf $$TMPHOME; \
	fi