# # This file and its contents are supplied under the terms of the # Common Development and Distribution License ("CDDL"), version 1.0. # You may only use this file in accordance with the terms of version # 1.0 of the CDDL. # # A full copy of the text of the CDDL should have accompanied this # source. A copy of the CDDL is also available via the Internet at # http://www.illumos.org/license/CDDL. # # # Copyright 2023 Marcel Telka # %patch% 01-testtools.patch %patch% 02-test-results-sorted.patch %hook-begin% # https://bugs.launchpad.net/subunit/+bug/2136952 DOWNLOAD_URL='https://github.com/testing-cabal/subunit/archive/refs/tags/$(HUMAN_VERSION).tar.gz' # The github tarball does not have proper metadata LICENSE_FILE='COPYING' %hook-no-license% # see the COPYING file LICENSE="(Apache-2.0 OR BSD-3-Clause) AND MIT" %include-2% COMPONENT_SRC = subunit-$(HUMAN_VERSION) # https://bugs.launchpad.net/subunit/+bug/2046453/comments/2 TEST_STYLE = unittest # Python 3.9 is not supported by python-subunit >= 1.4.5 PYTHON_VERSIONS := $(filter-out 3.9,$(PYTHON_VERSIONS)) %include-3% # https://bugs.launchpad.net/subunit/+bug/2046453/comments/2 COMPONENT_TEST_TARGETS += all_tests.test_suite # The SHELL_SHARE is needed so testing is able to find subunit.sh COMPONENT_TEST_ENV += SHELL_SHARE=$(@D)/shell/share/ # Testing expects this file executable COMPONENT_PRE_TEST_ACTION += $(CHMOD) +x $(PROTOPYTHONVENDORDIR)/subunit/tests/sample-script.py # Random temporary file name COMPONENT_TEST_TRANSFORMS += "-e 's|\(/tmp/tmp\)[_a-z0-9]\{8\}|\1XXXXXXXX|'" # This project does not support tox so we need to provide test requirements # manually. TEST_REQUIREMENTS_EXTRAS += test