#
# 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
#

%include-2%
# see tox.ini
TEST_STYLE = unittest
%include-3%
# see tox.ini
COMPONENT_TEST_TARGETS = tests.test_suite

# Normalize pointers
COMPONENT_TEST_TRANSFORMS += "-e 's/0x[0-9a-f]\{12\}/\$$(POINTER)/g'"
# Normalize timetstamps that change with every run
COMPONENT_TEST_TRANSFORMS += "-e 's|\[../.../.... ..:..:..\]|[XX/XXX/XXXX XX:XX:XX]|'"
# Remove line that could be out of order and contains random port number
COMPONENT_TEST_TRANSFORMS += "-e '/^Push to /d'"
# Normalize port
COMPONENT_TEST_TRANSFORMS += "-e 's/\(laddr=('\''127.0.0.1'\'', \)[0-9]\{1,\})/\1\$$(PORT))/'"