2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2023 Marcel Telka
16 %patch% 01-tox.ini.patch
17 %patch% 02-test-verbose.patch
18 %patch% 03-test-HAS_DISPLAY.patch
19 %patch% 04-test-skip-failing.patch
22 # Testing needs an X server
23 TEST_REQUIRED_PACKAGES += x11/server/xvfb
24 COMPONENT_PRE_TEST_ACTION += /usr/bin/Xvfb :0 >/dev/null 2>&1 &
25 COMPONENT_TEST_ENV += DISPLAY=:0
26 COMPONENT_POST_TEST_ACTION += /usr/bin/pkill -x Xvfb ;
28 # Testing needs the XDG_RUNTIME_DIR variable pointing to own runtime directory
29 # with permissions 0700
30 COMPONENT_PRE_TEST_ACTION += $(MKDIR) $(COMPONENT_TEST_BUILD_DIR)/runtime ;
31 COMPONENT_PRE_TEST_ACTION += $(CHMOD) 0700 $(COMPONENT_TEST_BUILD_DIR)/runtime ;
32 COMPONENT_TEST_ENV += XDG_RUNTIME_DIR=$(COMPONENT_TEST_BUILD_DIR)/runtime
33 COMPONENT_POST_TEST_ACTION += $(RM) -r $(COMPONENT_TEST_BUILD_DIR)/runtime ;
35 # https://github.com/asweigart/pyperclip/issues/246
36 COMPONENT_TEST_TRANSFORMS += "-e 's/TEST//g'"