File: rules

package info (click to toggle)
os-autoinst 4.6.1674476646.0798a03c-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 35,292 kB
  • sloc: perl: 21,646; cpp: 1,584; sh: 243; python: 223; xml: 57; makefile: 45
file content (53 lines) | stat: -rwxr-xr-x 2,350 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
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

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

# Following opensuse .spec : don't require qemu and exclude known flaky tests
tests_excl := t/02-test_ocr.t t/07-commands.t t/13-osutils.t t/14-isotovideo.t t/18-qemu-options.t t/18-backend-qemu.t t/28-signalblocker.t t/99-full-stack.t
# more tests that tend to fail...
tests_excl += t/20-openqa-isotovideo-utils.t t/21-needle-downloader.t t/27-consoles-vnc.t t/27-consoles-local_xvnc.t t/27-consoles-vmware.t t/29-backend-ipmi.t t/30-mmapi.t t/30-make.t
tests_excl += xt/30-make.t
# these fail on single CPU builds (and perhaps some particular archs)
tests_excl += t/10-virtio_terminal.t t/29-backend-generalhw.t
ifneq (,$(filter $(DEB_BUILD_ARCH), armel mipsel))
  tests_extra_settings = OPENQA_TEST_TIMEOUT_SCALE_CI=10
endif
ifneq (,$(filter $(DEB_BUILD_ARCH), mips64el))
  # on mips64el it's soo slow we might as well give up on this test
  tests_excl += 01-test_needle
endif


override_dh_auto_configure:
	cp -a $(CURDIR)/isotovideo $(CURDIR)/isotovideo.orig
	sed -i 's/my $$thisversion =.*/my $$thisversion = "$(DEB_VERSION)";/' $(CURDIR)/isotovideo
	rm -f $(tests_excl)
	dh_auto_configure -- -DOS_AUTOINST_DOC_DIR=/usr/share/doc/$(DEB_SOURCE) \
		-DSYSTEMD_SERVICE_DIR=/lib/systemd/system -DCMAKE_BUILD_TYPE=RelWithDebInfo

override_dh_auto_install:
	dh_auto_install
	find $(CURDIR)/debian/os-autoinst/usr/lib/ -name "*.packlist" -delete

override_dh_fixperms:
	dh_fixperms
	chmod +x $(CURDIR)/debian/os-autoinst/usr/lib/os-autoinst/dmidata/dump

override_dh_auto_test:
	# some of the tests apply themselves to all the source they can find, which
	# during a Debian build includes debris created by quilt in the .pc/
	# directory, causing those tests to fail, so let's just discard the rubbish:
	-rm -rf .pc
	cd build && PROVE_ARGS=-v CI=1 $(tests_extra_settings) ninja -v check-pkg-build
	# discard this file, as it breaks reproducibility on salsa
	-rm doc/backend_vars.asciidoc.newvars

override_dh_auto_clean:
	cd $(CURDIR) && rm -f snd2png/snd2png ppmclibs/blib/arch/auto/tinycv/tinycv.so \
	       	ppmclibs/blib/lib/tinycv.pm debugviewer/debugviewer videoencoder \
	       	doc/backend_vars.asciidoc.newvars
	if [ -f $(CURDIR)/isotovideo.orig ]; then mv $(CURDIR)/isotovideo.orig $(CURDIR)/isotovideo; fi
	dh_auto_clean