Skip to content

Conversation

@amstewart
Copy link
Contributor

@amstewart amstewart commented Sep 13, 2024

Summary of Changes

The nilrt-snac project now has an integration test suite.

  • nilrt-snac. Add a run-ptest entrypoint and pytest subpackage to run it.
  • packagegroup-ni-ptest-smoke. Add the nilrt-snac-ptest package.

Justification

AB#2776057

Testing

TODO: Detail what testing has been done to ensure this submission meets requirements.

  • I have built the core package feed with this PR in place. (bitbake packagefeed-ni-core)
  • Tested the packagegroup on a cRIO VM.
admin@NI-cRIO-903x-VM-6ebe3712:~# ptest-runner -l
Available ptests:
nilrt-snac	/usr/lib/nilrt-snac/ptest/run-ptest
admin@NI-cRIO-903x-VM-6ebe3712:~# ptest-runner nilrt-snac
START: ptest-runner
2024-09-13T15:27
BEGIN: /usr/lib/nilrt-snac/ptest
============================= test session starts ==============================
platform linux -- Python 3.12.4, pytest-8.0.2, pluggy-1.4.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /usr/lib/nilrt-snac/tests/integration
configfile: pytest.ini
collecting ... collected 9 items

../tests/integration/test_cli.py::test_help PASSED                       [ 11%]
../tests/integration/test_cli.py::test_noargs PASSED                     [ 22%]
../tests/integration/test_cli.py::test_verify PASSED                     [ 33%]
../tests/integration/test_cli.py::test_version PASSED                    [ 44%]
../tests/integration/test_installation.py::test_conflicts_ipk PASSED     [ 55%]
../tests/integration/test_installation.py::test_iptables PASSED          [ 66%]
../tests/integration/test_installation.py::test_opkg_binary PASSED       [ 77%]
../tests/integration/test_installation.py::test_supported_distro PASSED  [ 88%]
../tests/integration/test_installation.py::test_wireguard_conf PASSED    [100%]

============================== 9 passed in 0.60s ===============================
DURATION: 1
END: /usr/lib/nilrt-snac/ptest
2024-09-13T15:27
STOP: ptest-runner
TOTAL: 1 FAIL: 0

Procedure

The nilrt-snac project now has an integration test suite. Add a
run-ptest entrypoint and pytest subpackage to run it.

Signed-off-by: Alex Stewart <[email protected]>
@amstewart amstewart requested review from a team and chaitu236 September 13, 2024 15:40
The ptest.bbclass already adds an RDEPENDS on `nilrt-snac`, but it is
overriden by the nilrt-snac-ptest RDEPENDS bb assignment.

Instead, append the ptest RDEPENDS.

Signed-off-by: Alex Stewart <[email protected]>
@amstewart
Copy link
Contributor Author

Patch V2

  • Changed pytest RDEPENDS to += and dropped the extraneous nilrt-snac RDEPENDS.
    • Rebuilt the recipe and verified that the package dependencies include nilrt-snac.

@amstewart amstewart requested a review from chaitu236 September 13, 2024 17:39
@chaitu236 chaitu236 merged commit 052582b into ni:nilrt/master/next Sep 13, 2024
@amstewart amstewart deleted the dev/nilrt-snac branch September 13, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants