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
F95989602: D35721.diff
Mon, Sep 23, 6:31 AM
Unknown Object (File)
Sat, Sep 21, 12:52 AM
Unknown Object (File)
Fri, Sep 20, 2:49 AM
Unknown Object (File)
Wed, Sep 18, 7:29 PM
Unknown Object (File)
Wed, Sep 18, 7:36 AM
Unknown Object (File)
Wed, Sep 18, 5:58 AM
Unknown Object (File)
Wed, Sep 18, 12:41 AM
Unknown Object (File)
Fri, Sep 6, 2:04 AM
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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 46277
Build 43166: arc lint + arc unit