From 7deb56e2123785141e44969937f0ae902ea19c00 Mon Sep 17 00:00:00 2001 From: Lane Kolbly Date: Tue, 7 Dec 2021 16:47:55 -0600 Subject: host: tests: Add unit test for ZBX antenna API --- .../rfnoc_block_tests/x4xx_radio_block_test.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'host/tests/rfnoc_block_tests') diff --git a/host/tests/rfnoc_block_tests/x4xx_radio_block_test.cpp b/host/tests/rfnoc_block_tests/x4xx_radio_block_test.cpp index 5583cec6f..b6c6c21ba 100644 --- a/host/tests/rfnoc_block_tests/x4xx_radio_block_test.cpp +++ b/host/tests/rfnoc_block_tests/x4xx_radio_block_test.cpp @@ -734,6 +734,16 @@ BOOST_FIXTURE_TEST_CASE(zbx_ant_test, x400_radio_fixture) BOOST_CHECK_EQUAL(iter, ret_ant); } } + for (size_t chan = 0; chan < 2; chan++) { + for (auto iter : RX_ANTENNAS) { + UHD_LOG_INFO(log, "Testing Antenna: " << iter); + + test_radio->set_rx_antenna(iter, chan); + + std::string ret_ant = test_radio->get_rx_antenna(chan); + BOOST_CHECK_EQUAL(iter, ret_ant); + } + } log = "ZBX TX ANTENNA TEST"; for (auto fe_path : {fs_path("dboard/tx_frontends/0"), fs_path("dboard/tx_frontends/1")}) { @@ -748,6 +758,16 @@ BOOST_FIXTURE_TEST_CASE(zbx_ant_test, x400_radio_fixture) BOOST_CHECK_EQUAL(iter, ret_ant); } } + for (size_t chan = 0; chan < 2; chan++) { + for (auto iter : TX_ANTENNAS) { + UHD_LOG_INFO(log, "Testing Antenna: " << iter); + + test_radio->set_tx_antenna(iter, chan); + + std::string ret_ant = test_radio->get_tx_antenna(chan); + BOOST_CHECK_EQUAL(iter, ret_ant); + } + } } BOOST_FIXTURE_TEST_CASE(zbx_freq_coercion_test, x400_radio_fixture) -- cgit v1.2.3