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-test-sorted-list.patch
17 %patch% 02-test_int_pow.patch
18 %patch% 03-gmake.patch
19 %patch% 04-test-no-time.patch
20 %patch% 05-test_beta.patch
23 # Use well known path for Cython cache directory
24 COMPONENT_TEST_ENV += CYTHON_CACHE_DIR=$(@D)/.cython-cache-dir
25 # Testing installs packages using pip so direct it to private directory
26 COMPONENT_TEST_ENV += PYTHONUSERBASE=$(@D)/.python-user-base
28 # Cleanup remnants from previous test run (if any)
29 COMPONENT_PRE_TEST_ACTION += $(RM) -r $(@D)/.cython-cache-dir ;
30 COMPONENT_PRE_TEST_ACTION += $(RM) -r $(@D)/.python-user-base ;
32 # Normalize tmp dir name
33 COMPONENT_TEST_TRANSFORMS += "-e 's|\(TEST_TMP/cycache-test\).\{8\}\(/src\).\{8\}/|\1\2/|g'"
34 COMPONENT_TEST_TRANSFORMS += "-e 's|\(TEST_TMP/recythonize-test\).\{8\}\(/src\).\{8\}/|\1\2/|g'"
36 COMPONENT_TEST_TRANSFORMS += "-e 's/\(Broken object at \)0x[a-f0-9]\{1,\}>/\1\$$(POINTER)>/g'"
37 # Remove line with private path
38 COMPONENT_TEST_TRANSFORMS += "-e '/^libgcov profiling error:/d'"
39 # Remove profiling info
40 COMPONENT_TEST_TRANSFORMS += "-e '/^Most expensive pipeline stages:/d'"
41 # Normalize random temporary file name
42 COMPONENT_TEST_TRANSFORMS += "-e 's|^\(/tmp/tmp\).\{8\}:|\1XXXXXXXX:|'"
43 # Normalize random file name
44 COMPONENT_TEST_TRANSFORMS += "-e 's/\(_cython_inline_\).\{40\}\.pyx/\1XXXXXXXX.pyx/'"
46 # tox.ini does not specify test requirements
47 TEST_REQUIREMENTS += test-requirements.txt