Page MenuHomeFreeBSD

testing: provide meaningful error when pytest is not available
ClosedPublic

Authored by melifaro on Jul 6 2022, 7:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 4:04 PM
Unknown Object (File)
Mon, Nov 11, 10:56 PM
Unknown Object (File)
Mon, Nov 11, 10:56 PM
Unknown Object (File)
Sep 28 2024, 10:09 AM
Unknown Object (File)
Sep 28 2024, 9:19 AM
Unknown Object (File)
Sep 27 2024, 1:00 PM
Unknown Object (File)
Sep 27 2024, 8:57 AM
Unknown Object (File)
Sep 24 2024, 6:23 PM
Subscribers

Details

Summary

Provide meaningful error for pytest-based test when pytest is not available on the system.

Unfortunately, atf format does not provide any way of signalling any error message back to the atf runner when listing tests.
Work this around by reporting "test_cases_list_pytest_binary_not_found" test instead.

Test Plan

OLD behaviour:

7:40 [0] m@devel0 s kyua list -k /usr/tests/sys/net/routing/Kyuafile test_rtsock_multipath.py
test_rtsock_multipath.py:__test_cases_list__
7:40 [0] m@devel0 s kyua test -k /usr/tests/sys/net/routing/Kyuafile test_rtsock_multipath.py
test_rtsock_multipath.py:__test_cases_list__  ->  broken: Test program did not exit cleanly  [0.001s]

NEW behaviour:

7:43 [1] m@devel2 s kyua list -k /usr/tests/sys/netinet6/Kyuafile test_ip6_output.py
test_ip6_output.py:__test_cases_list_pytest_binary_not_found__
7:44 [1] m@devel2 s kyua test -k /usr/tests/sys/netinet6/Kyuafile test_ip6_output.py
test_ip6_output.py:__test_cases_list_pytest_binary_not_found__  ->  skipped: Required program 'pytest' not found in PATH  [0.001s]

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable