commit | author | age
|
6fb566
|
1 |
# |
MT |
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 |
|
5 |
# 1.0 of the CDDL. |
|
6 |
# |
|
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. |
|
10 |
# |
|
11 |
|
|
12 |
# |
|
13 |
# Copyright 2023 Marcel Telka |
|
14 |
# |
|
15 |
|
|
16 |
%patch% 01-Cython.patch |
|
17 |
%patch% 02-test_attributes.patch |
|
18 |
%patch% 03-no-shebang.patch |
|
19 |
%patch% 04-check_backend-port.patch |
|
20 |
%patch% 05-testFDPassSeparate.patch |
|
21 |
%patch% 06-test-port-8001.patch |
|
22 |
|
|
23 |
%include-3% |
|
24 |
# Do not use test concurrency to get predictable order of test results |
|
25 |
COMPONENT_TEST_ENV += NWORKERS=1 |
|
26 |
|
|
27 |
# Normalize test results |
|
28 |
COMPONENT_TEST_TRANSFORMS += "-e 's/\x1b\[[0-9;]*m//g'" # remove colors |
|
29 |
COMPONENT_TEST_TRANSFORMS += "-e '/^Running tests in parallel with concurrency/d'" # drop concurrency report |
|
30 |
COMPONENT_TEST_TRANSFORMS += "-e 's/0x[0-9a-f]\{12,\}/\$$(POINTER)/g'" # pointers |
|
31 |
COMPONENT_TEST_TRANSFORMS += "-e 's/\(thread_ident=\)0x[0-9a-f]\{1,\}/\1\$$(ID)/g'" # thread_ident |
|
32 |
COMPONENT_TEST_TRANSFORMS += "-e 's/[0-9]\{4\}-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9]Z/\$$(TIMESTAMP)/g'" # timestamps |
|
33 |
COMPONENT_TEST_TRANSFORMS += "-e 's/\[[0-9]\{4\}-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\]/[\$$(TIMESTAMP)]/g'" # timestamps |
|
34 |
COMPONENT_TEST_TRANSFORMS += "-e 's/\(Ran [0-9]\{1,\} tests\{0,1\}\) in [\.0-9]\{1,\}s/\1/'" # timing |
|
35 |
COMPONENT_TEST_TRANSFORMS += "-e 's/^\(Ran [0-9]\{1,\} tests\{0,1\}.* in [0-9]\{1,\} files\{0,1\}\) in .*\$$/\1/'" # timing |
|
36 |
COMPONENT_TEST_TRANSFORMS += "-e 's/\(GET .* HTTP.*\) [\.0-9]\{1,\}\$$/\1/'" # timing |
|
37 |
COMPONENT_TEST_TRANSFORMS += "-e 's/\(reacted\) after [\.0-9]\{1,\} seconds/\1/'" # timing |
|
38 |
COMPONENT_TEST_TRANSFORMS += "-e 's/ \[took [\.0-9]\{1,\}s\]//'" # timing |
|
39 |
COMPONENT_TEST_TRANSFORMS += "-e 's/ \[took [\.0-9]\{1,\}s \([^]]*\)\]/ [\1]/'" # timing |
|
40 |
COMPONENT_TEST_TRANSFORMS += "-e 's/^\( 127\.0\.0\.1:\)[0-9]\{1,\}\([ -]\)/\1\$$(PORT)\2/'" # source port changes |
|
41 |
COMPONENT_TEST_TRANSFORMS += "-e '/New connection from 127\.0\.0\.1:/d'" # could be out of order |
|
42 |
COMPONENT_TEST_TRANSFORMS += "-e '/echoed b/d'" # could be out of order |
|
43 |
COMPONENT_TEST_TRANSFORMS += "-e '/^Longest-running tests:/,/^\$$/d'" # list changes with every run |
|
44 |
|
|
45 |
# This project uses both cpython and abi3 ABI depending on particular library. |
|
46 |
# To deal with this we need to disable automatic ABI library name transforms. |
|
47 |
PY3_CPYTHON_NAMING=\# |
|
48 |
%hook-manifest% |
|
49 |
# ... and use our own transforms. |
d0dd84
|
50 |
printf '<transform file -> edit path "(usr/lib/python3\\.(\\d)+/vendor-packages/.*)\\.so$" "\\1.cpython-3\\2.so">\n' >> "$DISTRIBUTION-PYVER.p5m" |
MT |
51 |
printf '<transform file -> edit path "(usr/lib/python3\\.\\d+/vendor-packages/gevent/lib[eu]v/_corecffi\\.)cpython-3\\d+\\.so$" "\\1abi3.so">\n' >> "$DISTRIBUTION-PYVER.p5m" |